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 905BBA3160 for ; Thu, 10 Oct 2019 05:07:12 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id EB3741E864; Thu, 10 Oct 2019 05:07:11 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 19F3D1E537 for ; Thu, 10 Oct 2019 05:07:09 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Oct 2019 20:07:08 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,278,1566889200"; d="scan'208";a="207094255" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga001.fm.intel.com with ESMTP; 09 Oct 2019 20:07:08 -0700 Received: from fmsmsx102.amr.corp.intel.com (10.18.124.200) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 9 Oct 2019 20:07:08 -0700 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by FMSMSX102.amr.corp.intel.com (10.18.124.200) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 9 Oct 2019 20:07:07 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.96]) by shsmsx102.ccr.corp.intel.com ([169.254.2.176]) with mapi id 14.03.0439.000; Thu, 10 Oct 2019 11:07:05 +0800 From: "Yang, Qiming" To: "Zhang, Qi Z" , "Lu, Wenzhuo" CC: "dev@dpdk.org" , "Ye, Xiaolong" , "Nowlin, Dan" , "Stillwell Jr, Paul M" Thread-Topic: [PATCH v3 09/12] net/ice/base: fix flow raw field vector extraction Thread-Index: AQHVfXph/FbstFrfmEGqN1eGtoEi7adTNJBQ Date: Thu, 10 Oct 2019 03:07:05 +0000 Message-ID: References: <20190902035551.16852-1-qi.z.zhang@intel.com> <20191008015018.17086-1-qi.z.zhang@intel.com> <20191008015018.17086-10-qi.z.zhang@intel.com> In-Reply-To: <20191008015018.17086-10-qi.z.zhang@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 v3 09/12] net/ice/base: fix flow raw field vector extraction 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: Zhang, Qi Z=20 Sent: Tuesday, October 8, 2019 09:50 To: Lu, Wenzhuo ; Yang, Qiming Cc: dev@dpdk.org; Ye, Xiaolong ; Zhang, Qi Z ; Nowlin, Dan ; Stillwell Jr, Paul M <= paul.m.stillwell.jr@intel.com> Subject: [PATCH v3 09/12] net/ice/base: fix flow raw field vector extractio= n Correct the ordering of raw field extraction in the field vector by taking = into account the ordering setting for requesting block. Fixes: aa1cd410fa64 ("net/ice/base: add flow module") Signed-off-by: Dan Nowlin Signed-off-by: Paul M Stillwell Jr Signed-off-by: Qi Zhang --- drivers/net/ice/base/ice_flow.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/drivers/net/ice/base/ice_flow.c b/drivers/net/ice/base/ice_flo= w.c index 370ad9ba3..38c7c42f7 100644 --- a/drivers/net/ice/base/ice_flow.c +++ b/drivers/net/ice/base/ice_flow.c @@ -806,6 +806,7 @@ static enum ice_status ice_flow_xtract_raws(struct ice= _hw *hw, struct ice_flow_prof_params *params, u8 seg) { + u16 fv_words; u16 hdrs_sz; u8 i; =20 @@ -821,6 +822,8 @@ ice_flow_xtract_raws(struct ice_hw *hw, struct ice_flow= _prof_params *params, if (!hdrs_sz) return ICE_ERR_PARAM; =20 + fv_words =3D hw->blk[params->blk].es.fvw; + for (i =3D 0; i < params->prof->segs[seg].raws_cnt; i++) { struct ice_flow_seg_fld_raw *raw; u16 off, cnt, j; @@ -853,6 +856,8 @@ ice_flow_xtract_raws(struct ice_hw *hw, struct ice_flow= _prof_params *params, BITS_PER_BYTE)); off =3D raw->info.xtrct.off; for (j =3D 0; j < cnt; j++) { + u16 idx; + /* Make sure the number of extraction sequence required * does not exceed the block's capability */ @@ -860,8 +865,14 @@ ice_flow_xtract_raws(struct ice_hw *hw, struct ice_flo= w_prof_params *params, params->es_cnt >=3D ICE_MAX_FV_WORDS) return ICE_ERR_MAX_LIMIT; =20 - params->es[params->es_cnt].prot_id =3D ICE_PROT_PAY; - params->es[params->es_cnt].off =3D off; + /* some blocks require a reversed field vector layout */ + if (hw->blk[params->blk].es.reverse) + idx =3D fv_words - params->es_cnt - 1; + else + idx =3D params->es_cnt; + + params->es[idx].prot_id =3D ICE_PROT_PAY; + params->es[idx].off =3D off; params->es_cnt++; off +=3D ICE_FLOW_FV_EXTRACT_SZ; } -- 2.13.6 Acked-by: Qiming Yang