Message ID | 20230615051717.2906443-1-junfeng.guo@intel.com (mailing list archive) |
---|---|
Headers |
Return-Path: <dev-bounces@dpdk.org> X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id EB1A442CC0; Thu, 15 Jun 2023 07:17:30 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6C2C040FDF; Thu, 15 Jun 2023 07:17:30 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id 7800840DDA; Thu, 15 Jun 2023 07:17:28 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1686806248; x=1718342248; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=Q5WNwgpNQhCc7NbRR+gGwGAC376ZDjWW1RiRcSRlkAQ=; b=muM11GqeY/P+fufFM7xoblP9JWALpwiPQkAgPRDnjuCGRuExJOFO8BtP K/1rVlTpw7aIWYUZKWY9uH/SisBPE7zFB2sZ4Nfg25HEb2BRduMwTO4oO SfFK2Jnc/164k9HMzkckp7LDlgFGh2h2vqjqSCEzyWbzCG6QOkOM7Yt2N kWNvSEzO/3WqzeLYjOJf1Bp8SlmDKMiCLK4GOQKhBRlgTWTeptL2mSx7u KmODst1yvQm/dIn3+8tMTWBxzVu1+uwBfxUoAEg5O1W1dSfxzxa6FBaki WwC/0C+GnLHcbJTTlT6c+L8hs75Ct/dTrpHBRK4TXCTBVQGLTTaPOMXHs Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10741"; a="348482457" X-IronPort-AV: E=Sophos;i="6.00,244,1681196400"; d="scan'208";a="348482457" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Jun 2023 22:17:27 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10741"; a="1042491878" X-IronPort-AV: E=Sophos;i="6.00,244,1681196400"; d="scan'208";a="1042491878" Received: from dpdk-jf-ntb-v2.sh.intel.com ([10.67.119.19]) by fmsmga005.fm.intel.com with ESMTP; 14 Jun 2023 22:17:25 -0700 From: Junfeng Guo <junfeng.guo@intel.com> To: qi.z.zhang@intel.com, qiming.yang@intel.com Cc: dev@dpdk.org, stable@dpdk.org, ting.xu@intel.com, Junfeng Guo <junfeng.guo@intel.com> Subject: [PATCH 0/2] fix variable type in pattern parsing for raw flow Date: Thu, 15 Jun 2023 13:17:15 +0800 Message-Id: <20230615051717.2906443-1-junfeng.guo@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions <dev.dpdk.org> List-Unsubscribe: <https://mails.dpdk.org/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://mails.dpdk.org/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <https://mails.dpdk.org/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org |
Series |
fix variable type in pattern parsing for raw flow
|
|
Message
Junfeng Guo
June 15, 2023, 5:17 a.m. UTC
In current pattern parsing function for protocol agnostic flow offloading (raw flow), some of the variables of packet length are defined as uint8_t, which are too small for some large-size packets, such as srv6 (Segment Routing over IPv6 dataplane) type. Change the type to uint16_t. For example, the length of below srv6 paket is 268 B, larger than the max of uint8_t type (i.e., 256). "mac()/ipv6(nextheader=43)/ipv6srh(headerextlength=4,nextheader=41)\ /ipv6(dst=2001:2:0:0:0:0:0:2)" Junfeng Guo (2): net/ice: fix variable type in pattern parsing for raw flow net/iavf: fix variable type in pattern parsing for raw flow drivers/net/iavf/iavf_hash.c | 2 +- drivers/net/ice/ice_fdir_filter.c | 2 +- drivers/net/ice/ice_hash.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
Comments
> -----Original Message----- > From: Guo, Junfeng <junfeng.guo@intel.com> > Sent: Thursday, June 15, 2023 1:17 PM > To: Zhang, Qi Z <qi.z.zhang@intel.com>; Yang, Qiming > <qiming.yang@intel.com> > Cc: dev@dpdk.org; stable@dpdk.org; Xu, Ting <ting.xu@intel.com>; Guo, > Junfeng <junfeng.guo@intel.com> > Subject: [PATCH 0/2] fix variable type in pattern parsing for raw flow > > In current pattern parsing function for protocol agnostic flow offloading (raw > flow), some of the variables of packet length are defined as uint8_t, which > are too small for some large-size packets, such as srv6 (Segment Routing over > IPv6 dataplane) type. Change the type to uint16_t. > > For example, the length of below srv6 paket is 268 B, larger than the max of > uint8_t type (i.e., 256). > "mac()/ipv6(nextheader=43)/ipv6srh(headerextlength=4,nextheader=41)\ > /ipv6(dst=2001:2:0:0:0:0:0:2)" > > Junfeng Guo (2): > net/ice: fix variable type in pattern parsing for raw flow > net/iavf: fix variable type in pattern parsing for raw flow > > drivers/net/iavf/iavf_hash.c | 2 +- > drivers/net/ice/ice_fdir_filter.c | 2 +- > drivers/net/ice/ice_hash.c | 2 +- > 3 files changed, 3 insertions(+), 3 deletions(-) > > -- > 2.25.1 Acked-by: Ting Xu <ting.xu@intel.com>
On Thu, Jun 15, 2023 at 7:17 AM Junfeng Guo <junfeng.guo@intel.com> wrote: > > In current pattern parsing function for protocol agnostic flow > offloading (raw flow), some of the variables of packet length are > defined as uint8_t, which are too small for some large-size packets, > such as srv6 (Segment Routing over IPv6 dataplane) type. Change the > type to uint16_t. > > For example, the length of below srv6 paket is 268 B, larger than the > max of uint8_t type (i.e., 256). > "mac()/ipv6(nextheader=43)/ipv6srh(headerextlength=4,nextheader=41)\ > /ipv6(dst=2001:2:0:0:0:0:0:2)" > > Junfeng Guo (2): > net/ice: fix variable type in pattern parsing for raw flow > net/iavf: fix variable type in pattern parsing for raw flow In the commit title, it is better to describe a functional impact rather than repeat the implementation of a fix. This makes it easier for people looking for a fix for their specific issue they are investigating. And, on the contrary, it also makes it easier when looking for a regression on a specific feature. Here, "fix variable type" gives no clue that it is linked to packet length or the protocol agnostic/raw pattern offloading feature. So, I don't understand this part of the code, but I think a better title would be: net/ice: fix protocol agnostic offloading with big packets Does it sound ok to you? > > drivers/net/iavf/iavf_hash.c | 2 +- > drivers/net/ice/ice_fdir_filter.c | 2 +- > drivers/net/ice/ice_hash.c | 2 +- > 3 files changed, 3 insertions(+), 3 deletions(-) > > -- > 2.25.1 >
> -----Original Message----- > From: David Marchand <david.marchand@redhat.com> > Sent: Thursday, June 15, 2023 3:28 PM > To: Guo, Junfeng <junfeng.guo@intel.com> > Cc: Zhang, Qi Z <qi.z.zhang@intel.com>; Yang, Qiming > <qiming.yang@intel.com>; dev@dpdk.org; stable@dpdk.org; Xu, Ting > <ting.xu@intel.com> > Subject: Re: [PATCH 0/2] fix variable type in pattern parsing for raw flow > > On Thu, Jun 15, 2023 at 7:17 AM Junfeng Guo <junfeng.guo@intel.com> > wrote: > > > > In current pattern parsing function for protocol agnostic flow > > offloading (raw flow), some of the variables of packet length are > > defined as uint8_t, which are too small for some large-size packets, > > such as srv6 (Segment Routing over IPv6 dataplane) type. Change the > > type to uint16_t. > > > > For example, the length of below srv6 paket is 268 B, larger than the > > max of uint8_t type (i.e., 256). > > "mac()/ipv6(nextheader=43)/ipv6srh(headerextlength=4,nextheader=41)\ > > /ipv6(dst=2001:2:0:0:0:0:0:2)" > > > > Junfeng Guo (2): > > net/ice: fix variable type in pattern parsing for raw flow > > net/iavf: fix variable type in pattern parsing for raw flow > > In the commit title, it is better to describe a functional impact rather than > repeat the implementation of a fix. > > This makes it easier for people looking for a fix for their specific issue they > are investigating. > And, on the contrary, it also makes it easier when looking for a regression on > a specific feature. > > Here, "fix variable type" gives no clue that it is linked to packet length or the > protocol agnostic/raw pattern offloading feature. > > So, I don't understand this part of the code, but I think a better title would > be: > net/ice: fix protocol agnostic offloading with big packets > > Does it sound ok to you? +1 Junfeng, could you comment, if no concern, I will merge patch with the suggested title. > > > > > > drivers/net/iavf/iavf_hash.c | 2 +- > > drivers/net/ice/ice_fdir_filter.c | 2 +- > > drivers/net/ice/ice_hash.c | 2 +- > > 3 files changed, 3 insertions(+), 3 deletions(-) > > > > -- > > 2.25.1 > > > > > -- > David Marchand
> -----Original Message----- > From: Zhang, Qi Z <qi.z.zhang@intel.com> > Sent: Friday, June 16, 2023 13:49 > To: David Marchand <david.marchand@redhat.com>; Guo, Junfeng > <junfeng.guo@intel.com> > Cc: Yang, Qiming <qiming.yang@intel.com>; dev@dpdk.org; > stable@dpdk.org; Xu, Ting <ting.xu@intel.com> > Subject: RE: [PATCH 0/2] fix variable type in pattern parsing for raw flow > > > > > -----Original Message----- > > From: David Marchand <david.marchand@redhat.com> > > Sent: Thursday, June 15, 2023 3:28 PM > > To: Guo, Junfeng <junfeng.guo@intel.com> > > Cc: Zhang, Qi Z <qi.z.zhang@intel.com>; Yang, Qiming > > <qiming.yang@intel.com>; dev@dpdk.org; stable@dpdk.org; Xu, Ting > > <ting.xu@intel.com> > > Subject: Re: [PATCH 0/2] fix variable type in pattern parsing for raw flow > > > > On Thu, Jun 15, 2023 at 7:17 AM Junfeng Guo <junfeng.guo@intel.com> > > wrote: > > > > > > In current pattern parsing function for protocol agnostic flow > > > offloading (raw flow), some of the variables of packet length are > > > defined as uint8_t, which are too small for some large-size packets, > > > such as srv6 (Segment Routing over IPv6 dataplane) type. Change the > > > type to uint16_t. > > > > > > For example, the length of below srv6 paket is 268 B, larger than the > > > max of uint8_t type (i.e., 256). > > > > "mac()/ipv6(nextheader=43)/ipv6srh(headerextlength=4,nextheader=41)\ > > > /ipv6(dst=2001:2:0:0:0:0:0:2)" > > > > > > Junfeng Guo (2): > > > net/ice: fix variable type in pattern parsing for raw flow > > > net/iavf: fix variable type in pattern parsing for raw flow > > > > In the commit title, it is better to describe a functional impact rather > than > > repeat the implementation of a fix. > > > > This makes it easier for people looking for a fix for their specific issue > they > > are investigating. > > And, on the contrary, it also makes it easier when looking for a > regression on > > a specific feature. > > > > Here, "fix variable type" gives no clue that it is linked to packet length or > the > > protocol agnostic/raw pattern offloading feature. > > > > So, I don't understand this part of the code, but I think a better title > would > > be: > > net/ice: fix protocol agnostic offloading with big packets > > > > Does it sound ok to you? > > +1 > Junfeng, could you comment, if no concern, I will merge patch with the > suggested title. Sure, that sounds good to me! Please go ahead with the suggested title. Thanks David for the comment! Yes, it's more reasonable to describe patch with more specific and valid words. > > > > > > > > > > > drivers/net/iavf/iavf_hash.c | 2 +- > > > drivers/net/ice/ice_fdir_filter.c | 2 +- > > > drivers/net/ice/ice_hash.c | 2 +- > > > 3 files changed, 3 insertions(+), 3 deletions(-) > > > > > > -- > > > 2.25.1 > > > > > > > > > -- > > David Marchand
> -----Original Message----- > From: Guo, Junfeng <junfeng.guo@intel.com> > Sent: Friday, June 16, 2023 2:22 PM > To: Zhang, Qi Z <qi.z.zhang@intel.com>; David Marchand > <david.marchand@redhat.com> > Cc: Yang, Qiming <qiming.yang@intel.com>; dev@dpdk.org; stable@dpdk.org; > Xu, Ting <ting.xu@intel.com> > Subject: RE: [PATCH 0/2] fix variable type in pattern parsing for raw flow > > > > > -----Original Message----- > > From: Zhang, Qi Z <qi.z.zhang@intel.com> > > Sent: Friday, June 16, 2023 13:49 > > To: David Marchand <david.marchand@redhat.com>; Guo, Junfeng > > <junfeng.guo@intel.com> > > Cc: Yang, Qiming <qiming.yang@intel.com>; dev@dpdk.org; > > stable@dpdk.org; Xu, Ting <ting.xu@intel.com> > > Subject: RE: [PATCH 0/2] fix variable type in pattern parsing for raw > > flow > > > > > > > > > -----Original Message----- > > > From: David Marchand <david.marchand@redhat.com> > > > Sent: Thursday, June 15, 2023 3:28 PM > > > To: Guo, Junfeng <junfeng.guo@intel.com> > > > Cc: Zhang, Qi Z <qi.z.zhang@intel.com>; Yang, Qiming > > > <qiming.yang@intel.com>; dev@dpdk.org; stable@dpdk.org; Xu, Ting > > > <ting.xu@intel.com> > > > Subject: Re: [PATCH 0/2] fix variable type in pattern parsing for > > > raw flow > > > > > > On Thu, Jun 15, 2023 at 7:17 AM Junfeng Guo <junfeng.guo@intel.com> > > > wrote: > > > > > > > > In current pattern parsing function for protocol agnostic flow > > > > offloading (raw flow), some of the variables of packet length are > > > > defined as uint8_t, which are too small for some large-size > > > > packets, such as srv6 (Segment Routing over IPv6 dataplane) type. > > > > Change the type to uint16_t. > > > > > > > > For example, the length of below srv6 paket is 268 B, larger than > > > > the max of uint8_t type (i.e., 256). > > > > > > "mac()/ipv6(nextheader=43)/ipv6srh(headerextlength=4,nextheader=41)\ > > > > /ipv6(dst=2001:2:0:0:0:0:0:2)" > > > > > > > > Junfeng Guo (2): > > > > net/ice: fix variable type in pattern parsing for raw flow > > > > net/iavf: fix variable type in pattern parsing for raw flow > > > > > > In the commit title, it is better to describe a functional impact > > > rather > > than > > > repeat the implementation of a fix. > > > > > > This makes it easier for people looking for a fix for their specific > > > issue > > they > > > are investigating. > > > And, on the contrary, it also makes it easier when looking for a > > regression on > > > a specific feature. > > > > > > Here, "fix variable type" gives no clue that it is linked to packet > > > length or > > the > > > protocol agnostic/raw pattern offloading feature. > > > > > > So, I don't understand this part of the code, but I think a better > > > title > > would > > > be: > > > net/ice: fix protocol agnostic offloading with big packets > > > > > > Does it sound ok to you? > > > > +1 > > Junfeng, could you comment, if no concern, I will merge patch with > > the suggested title. > > Sure, that sounds good to me! > Please go ahead with the suggested title. > > Thanks David for the comment! > Yes, it's more reasonable to describe patch with more specific and valid > words. Acked-by: Qi Zhang <qi.z.zhang@intel.com> Applied to dpdk-next-net-intel. Thanks Qi > > > > > > > > > > > > > > > > > drivers/net/iavf/iavf_hash.c | 2 +- > > > > drivers/net/ice/ice_fdir_filter.c | 2 +- > > > > drivers/net/ice/ice_hash.c | 2 +- > > > > 3 files changed, 3 insertions(+), 3 deletions(-) > > > > > > > > -- > > > > 2.25.1 > > > > > > > > > > > > > -- > > > David Marchand