From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 180FB567C for ; Tue, 6 Jun 2017 09:46:15 +0200 (CEST) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Jun 2017 00:46:14 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.39,305,1493708400"; d="scan'208";a="977266684" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga003.jf.intel.com with ESMTP; 06 Jun 2017 00:46:14 -0700 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 6 Jun 2017 00:46:14 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.146]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.56]) with mapi id 14.03.0319.002; Tue, 6 Jun 2017 15:46:11 +0800 From: "Lu, Wenzhuo" To: "Xing, Beilei" , "Zhang, Helin" , "Wu, Jingjing" CC: "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH 1/3] net/i40e: support flexible payload parsing for FDIR Thread-Index: AQHS1FUPddx66MFBoU2cGq/oQXM+IqIXiK3Q Date: Tue, 6 Jun 2017 07:46:10 +0000 Message-ID: <6A0DE07E22DDAD4C9103DF62FEBC09093B5CC583@shsmsx102.ccr.corp.intel.com> References: <1495606206-72739-1-git-send-email-beilei.xing@intel.com> <1495606206-72739-2-git-send-email-beilei.xing@intel.com> In-Reply-To: <1495606206-72739-2-git-send-email-beilei.xing@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: 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 1/3] net/i40e: support flexible payload parsing for FDIR 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: , X-List-Received-Date: Tue, 06 Jun 2017 07:46:16 -0000 Hi Beilei, > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Beilei Xing > Sent: Wednesday, May 24, 2017 2:10 PM > To: Zhang, Helin; Wu, Jingjing > Cc: dev@dpdk.org > Subject: [dpdk-dev] [PATCH 1/3] net/i40e: support flexible payload parsin= g > for FDIR >=20 > This patch adds flexible payload parsing support for flow director filter= . >=20 > Signed-off-by: Beilei Xing > --- > drivers/net/i40e/i40e_ethdev.h | 23 ++++ > drivers/net/i40e/i40e_fdir.c | 19 --- > drivers/net/i40e/i40e_flow.c | 298 > ++++++++++++++++++++++++++++++++++++++++- > 3 files changed, 317 insertions(+), 23 deletions(-) > + > +static int > +i40e_flow_store_flex_pit(struct i40e_pf *pf, > + struct i40e_fdir_flex_pit *flex_pit, > + enum i40e_flxpld_layer_idx layer_idx, > + uint8_t raw_id) > +{ > + uint8_t field_idx; > + > + field_idx =3D layer_idx * I40E_MAX_FLXPLD_FIED + raw_id; > + /* Check if the configuration is conflicted */ > + if (pf->fdir.flex_pit_flag[layer_idx] && > + (pf->fdir.flex_set[field_idx].src_offset !=3D flex_pit->src_offset = || > + pf->fdir.flex_set[field_idx].size !=3D flex_pit->size || > + pf->fdir.flex_set[field_idx].dst_offset !=3D flex_pit->dst_offset)= ) > + return -1; > + > + if (pf->fdir.flex_pit_flag[layer_idx] && > + (pf->fdir.flex_set[field_idx].src_offset =3D=3D flex_pit->src_offse= t && > + pf->fdir.flex_set[field_idx].size =3D=3D flex_pit->size && > + pf->fdir.flex_set[field_idx].dst_offset =3D=3D flex_pit->dst_offse= t)) > + return 1; Is this check necessary? Don't find a specific handling for this return val= ue. If it's necessary, would you like to add some comments about this check? > + > + pf->fdir.flex_set[field_idx].src_offset =3D > + flex_pit->src_offset; > + pf->fdir.flex_set[field_idx].size =3D > + flex_pit->size; > + pf->fdir.flex_set[field_idx].dst_offset =3D > + flex_pit->dst_offset; > + > + return 0; > +}