From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id B2C77A0548; Fri, 2 Apr 2021 03:53:56 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 31DEB40F35; Fri, 2 Apr 2021 03:53:56 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id 1FC6240150 for ; Fri, 2 Apr 2021 03:53:54 +0200 (CEST) IronPort-SDR: Urj86rbVE1h3f8teZkR3wKckXRvz1W2zMd923E1k21Xpg/Dh7N7pJQdUaHr+vFYPYNzNEi3DY/ Qw2lW7JWnPJQ== X-IronPort-AV: E=McAfee;i="6000,8403,9941"; a="190139818" X-IronPort-AV: E=Sophos;i="5.81,298,1610438400"; d="scan'208";a="190139818" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Apr 2021 18:53:54 -0700 IronPort-SDR: VAjs6uRpBpxHQ40rCXRn0h5EH5ofPc5pQGCxQFlxyJyPRdQ7Knz31hKNkahgJruyvdsjR36caN FGiM4/dfIdQg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.81,298,1610438400"; d="scan'208";a="412965496" Received: from fmsmsx606.amr.corp.intel.com ([10.18.126.86]) by fmsmga008.fm.intel.com with ESMTP; 01 Apr 2021 18:53:54 -0700 Received: from shsmsx605.ccr.corp.intel.com (10.109.6.215) by fmsmsx606.amr.corp.intel.com (10.18.126.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Thu, 1 Apr 2021 18:53:53 -0700 Received: from shsmsx601.ccr.corp.intel.com (10.109.6.141) by SHSMSX605.ccr.corp.intel.com (10.109.6.215) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Fri, 2 Apr 2021 09:53:51 +0800 Received: from shsmsx601.ccr.corp.intel.com ([10.109.6.141]) by SHSMSX601.ccr.corp.intel.com ([10.109.6.141]) with mapi id 15.01.2106.013; Fri, 2 Apr 2021 09:53:51 +0800 From: "Guo, Jia" To: "Xu, Ting" , "Yang, Qiming" , "Zhang, Qi Z" CC: "dev@dpdk.org" Thread-Topic: [PATCH v2 3/3] net/ice: support FDIR for IP fragment packet Thread-Index: AQHXILXGq71wTkHROEuCgSLD7Jq/RKqecD4AgAIUQSA= Date: Fri, 2 Apr 2021 01:53:51 +0000 Message-ID: <4ee2fce459a44689adaa05adb0b7f08f@intel.com> References: <20210317034335.31974-1-jia.guo@intel.com> <20210324135407.60637-1-jia.guo@intel.com> <20210324135407.60637-4-jia.guo@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.5.1.3 x-originating-ip: [10.239.127.36] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v2 3/3] net/ice: support FDIR for IP fragment packet X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi, ting > -----Original Message----- > From: Xu, Ting > Sent: Thursday, April 1, 2021 10:08 AM > To: Guo, Jia ; Yang, Qiming ; > Zhang, Qi Z > Cc: dev@dpdk.org > Subject: RE: [PATCH v2 3/3] net/ice: support FDIR for IP fragment packet >=20 > Hi, Jeff >=20 > See inline >=20 > Best Regards, > Xu Ting >=20 > > -----Original Message----- > > From: Guo, Jia > > Sent: Wednesday, March 24, 2021 9:54 PM > > To: Yang, Qiming ; Zhang, Qi Z > > > > Cc: Xu, Ting ; dev@dpdk.org; Guo, Jia > > > > Subject: [PATCH v2 3/3] net/ice: support FDIR for IP fragment packet > > > > New FDIR parsing are added to handle the fragmented IPv4/IPv6 packet. > > > > Signed-off-by: Jeff Guo > > --- > > drivers/net/ice/ice_fdir_filter.c | 96 > > +++++++++++++++++++++++++++---- > > 1 file changed, 85 insertions(+), 11 deletions(-) > > > > diff --git a/drivers/net/ice/ice_fdir_filter.c > > b/drivers/net/ice/ice_fdir_filter.c > > index 3af5812660..3504d3c6c2 100644 > > --- a/drivers/net/ice/ice_fdir_filter.c > > +++ b/drivers/net/ice/ice_fdir_filter.c > > @@ -24,7 +24,7 @@ > > #define ICE_FDIR_INSET_ETH_IPV4 (\ > > ICE_FDIR_INSET_ETH | \ > > ICE_INSET_IPV4_SRC | ICE_INSET_IPV4_DST | ICE_INSET_IPV4_TOS | \ > > -ICE_INSET_IPV4_TTL | ICE_INSET_IPV4_PROTO) > > +ICE_INSET_IPV4_TTL | ICE_INSET_IPV4_PROTO | ICE_INSET_IPV4_PKID) > > >=20 > Skip... >=20 > > @@ -1700,8 +1719,6 @@ ice_fdir_parse_pattern(__rte_unused struct > > ice_adapter *ad, > > /* Check IPv4 mask and update input set */ if > > (ipv4_mask->hdr.version_ihl || > > ipv4_mask->hdr.total_length || > > - ipv4_mask->hdr.packet_id || > > - ipv4_mask->hdr.fragment_offset || > > ipv4_mask->hdr.hdr_checksum) { > > rte_flow_error_set(error, EINVAL, > > > > RTE_FLOW_ERROR_TYPE_ITEM, > > @@ -1710,6 +1727,20 @@ ice_fdir_parse_pattern(__rte_unused struct > > ice_adapter *ad, return -rte_errno; } > > >=20 > May need to check if ipv4_last exists before using it. >=20 Sure, will add the check in next version. > > +if (ipv4_last->hdr.version_ihl || > > + ipv4_last->hdr.type_of_service || > > + ipv4_last->hdr.time_to_live || > > + ipv4_last->hdr.total_length | > > + ipv4_last->hdr.next_proto_id || > > + ipv4_last->hdr.hdr_checksum || > > + ipv4_last->hdr.src_addr || > > + ipv4_last->hdr.dst_addr) { > > +rte_flow_error_set(error, EINVAL, > > + > > RTE_FLOW_ERROR_TYPE_ITEM, > > + item, "Invalid IPv4 last."); > > +return -rte_errno; > > +} > > + > > if (ipv4_mask->hdr.dst_addr =3D=3D UINT32_MAX) *input_set |=3D > > ICE_INSET_IPV4_DST; if (ipv4_mask->hdr.src_addr =3D=3D UINT32_MAX) @@ = - >=20 > Skip... >=20 > > 2.20.1 >=20