From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2C7B6A0613 for ; Fri, 27 Sep 2019 08:22:16 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C8F5628EE; Fri, 27 Sep 2019 08:22:14 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 13B151DB9 for ; Fri, 27 Sep 2019 08:22:11 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Sep 2019 23:22:11 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,554,1559545200"; d="scan'208";a="365053633" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by orsmga005.jf.intel.com with ESMTP; 26 Sep 2019 23:22:10 -0700 Received: from fmsmsx163.amr.corp.intel.com (10.18.125.72) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 26 Sep 2019 23:22:10 -0700 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by fmsmsx163.amr.corp.intel.com (10.18.125.72) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 26 Sep 2019 23:22:10 -0700 Received: from shsmsx105.ccr.corp.intel.com ([169.254.11.23]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.53]) with mapi id 14.03.0439.000; Fri, 27 Sep 2019 14:22:07 +0800 From: "Zhang, Qi Z" To: "Yang, Qiming" , "Lu, Wenzhuo" CC: "dev@dpdk.org" , "Ye, Xiaolong" , "Nowlin, Dan" , "Stillwell Jr, Paul M" Thread-Topic: [PATCH 5/8] net/ice/base: improvements to Flow Director masking Thread-Index: AQHVdOoBOz5cFbd/0ESjx5NP7OtNAqc+eJMAgACVRkA= Date: Fri, 27 Sep 2019 06:22:07 +0000 Message-ID: <039ED4275CED7440929022BC67E7061153D9EE08@SHSMSX105.ccr.corp.intel.com> References: <20190902035551.16852-1-qi.z.zhang@intel.com> <20190927041646.34712-1-qi.z.zhang@intel.com> <20190927041646.34712-6-qi.z.zhang@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNGE5MTE5NGUtNjYzMS00Y2E5LWE5NjctNDRjMWU2YTU1OGIwIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiczc1RWcxZWRQWVBBMlcrcFpJc1wvXC9aK1lZQ2lVbWJQeEt0S1FuZkl2akxFeXNpUDRvT0xRMDI1cjZXZGEyTVFLIn0= x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH 5/8] net/ice/base: improvements to Flow Director masking X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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" > -----Original Message----- > From: Yang, Qiming > Sent: Friday, September 27, 2019 1:28 PM > To: Zhang, Qi Z ; Lu, Wenzhuo > Cc: dev@dpdk.org; Ye, Xiaolong ; Nowlin, Dan > ; Stillwell Jr, Paul M > Subject: RE: [PATCH 5/8] net/ice/base: improvements to Flow Director > masking >=20 > Hi, Qi >=20 > > -----Original Message----- > > From: Zhang, Qi Z > > Sent: Friday, September 27, 2019 12:17 PM > > To: Lu, Wenzhuo ; Yang, Qiming > > > > Cc: dev@dpdk.org; Ye, Xiaolong ; Zhang, Qi Z > > ; Nowlin, Dan ; Stillwell > > Jr, Paul M > > Subject: [PATCH 5/8] net/ice/base: improvements to Flow Director > > masking > > > > Currently, 3-tuple FD matching is implemented using masking. However, > > this is using up twenty-four of the thirty-two FD masks available. > > This patch uses the swap register more efficiently to implement the > > 3-tuple matches, which saves all FD masks for other uses. > > > > Added IPV6 versions of DSCP, TTL and Protocol fields for FD use. > > > > Signed-off-by: Dan Nowlin > > Signed-off-by: Paul M Stillwell Jr > > Signed-off-by: Qi Zhang > > --- > > drivers/net/ice/base/ice_flex_pipe.c | 71 +++++++++------------ > > drivers/net/ice/base/ice_flex_type.h | 4 +- > > drivers/net/ice/base/ice_flow.c | 118 > ++++++++++++++++++++--------------- > > drivers/net/ice/base/ice_flow.h | 10 ++- > > 4 files changed, 108 insertions(+), 95 deletions(-) > > > > diff --git a/drivers/net/ice/base/ice_flex_pipe.c > > b/drivers/net/ice/base/ice_flex_pipe.c > > index 75bb87079..8f8cab86e 100644 > > --- a/drivers/net/ice/base/ice_flex_pipe.c > > +++ b/drivers/net/ice/base/ice_flex_pipe.c > > @@ -1248,25 +1248,6 @@ void ice_free_seg(struct ice_hw *hw) } > > > [snip] >=20 > > @@ -4342,29 +4321,39 @@ ice_update_fd_swap(struct ice_hw *hw, u16 > > prof_id, struct ice_fv_word *es) > > si -=3D indexes_used; > > } > > > > - /* for each set of 4 swap indexes, write the appropriate register */ > > + /* for each set of 4 swap and 4 inset indexes, write the appropriate > > + * register > > + */ > > for (j =3D 0; j < hw->blk[ICE_BLK_FD].es.fvw / 4; j++) { > > - u32 raw_entry =3D 0; > > + u32 raw_swap =3D 0; > > + u32 raw_in =3D 0; > > > > for (k =3D 0; k < 4; k++) { > > u8 idx; > > > > idx =3D (j * 4) + k; > > - if (used[idx]) > > - raw_entry |=3D used[idx] << (k * > > BITS_PER_BYTE); > > + if (used[idx] && !(mask_sel & BIT(idx))) { > > + raw_swap |=3D used[idx] << (k * > > BITS_PER_BYTE); #define > > +ICE_INSET_DFLT 0x9f >=20 > Is this macro defined within this function? Yes, because its only be used in this function :) >=20 > > + raw_in |=3D ICE_INSET_DFLT << (k * > > BITS_PER_BYTE); > > + } > > } > > > [snip] >=20 >=20 > Qiming