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 92654A0547; Wed, 27 Oct 2021 04:18:03 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0D8BF40DDA; Wed, 27 Oct 2021 04:18:03 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id 0C116407FF for ; Wed, 27 Oct 2021 04:18:00 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10149"; a="290894070" X-IronPort-AV: E=Sophos;i="5.87,184,1631602800"; d="scan'208";a="290894070" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Oct 2021 19:17:58 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,184,1631602800"; d="scan'208";a="529450982" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by orsmga001.jf.intel.com with ESMTP; 26 Oct 2021 19:17:58 -0700 Received: from shsmsx602.ccr.corp.intel.com (10.109.6.142) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Tue, 26 Oct 2021 19:17:57 -0700 Received: from shsmsx601.ccr.corp.intel.com (10.109.6.141) by SHSMSX602.ccr.corp.intel.com (10.109.6.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Wed, 27 Oct 2021 10:17:55 +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.2242.012; Wed, 27 Oct 2021 10:17:55 +0800 From: "Zhang, Qi Z" To: "Guo, Junfeng" , "Wu, Jingjing" , "Xing, Beilei" CC: "dev@dpdk.org" , "Yigit, Ferruh" , "Wang, Haiyue" , "Yan, Zhirun" Thread-Topic: [PATCH v4 2/4] net/ice/base: add function to set HW profile for raw flow Thread-Index: AQHXymEv8V3A5psOF0Oe03Wxsc1aD6vmBWGQ//+L+oCAAIcqMA== Date: Wed, 27 Oct 2021 02:17:55 +0000 Message-ID: <805636af8f454523b64f456a8436c068@intel.com> References: <20211014153705.3301663-6-junfeng.guo@intel.com> <20211026120056.1442501-1-junfeng.guo@intel.com> <20211026120056.1442501-3-junfeng.guo@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-reaction: no-action dlp-version: 11.6.200.16 dlp-product: dlpe-windows 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 v4 2/4] net/ice/base: add function to set HW profile for raw flow 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" > -----Original Message----- > From: Guo, Junfeng > Sent: Wednesday, October 27, 2021 9:58 AM > To: Zhang, Qi Z ; Wu, Jingjing ; > Xing, Beilei > Cc: dev@dpdk.org; Yigit, Ferruh ; Wang, Haiyue > ; Yan, Zhirun > Subject: RE: [PATCH v4 2/4] net/ice/base: add function to set HW profile = for > raw flow >=20 >=20 >=20 > > -----Original Message----- > > From: Zhang, Qi Z > > Sent: Wednesday, October 27, 2021 08:58 > > To: Guo, Junfeng ; Wu, Jingjing > > ; Xing, Beilei > > Cc: dev@dpdk.org; Yigit, Ferruh ; Wang, Haiyue > > ; Yan, Zhirun > > Subject: RE: [PATCH v4 2/4] net/ice/base: add function to set HW > > profile for raw flow > > > > > > > > > -----Original Message----- > > > From: Guo, Junfeng > > > Sent: Tuesday, October 26, 2021 8:01 PM > > > To: Zhang, Qi Z ; Wu, Jingjing > > ; > > > Xing, Beilei > > > Cc: dev@dpdk.org; Yigit, Ferruh ; Wang, > > Haiyue > > > ; Yan, Zhirun ; Guo, > > Junfeng > > > > > > Subject: [PATCH v4 2/4] net/ice/base: add function to set HW profile > > > for > > raw > > > flow > > > > > > Based on the parser library, we can directly set HW profile and > > > associate > > the > > > main/ctrl vsi. > > > > > > Signed-off-by: Junfeng Guo > > > --- > > > drivers/net/ice/base/ice_flex_pipe.c | 55 ++++++++++++++++++ > > > drivers/net/ice/base/ice_flex_pipe.h | 4 ++ > > > drivers/net/ice/base/ice_flow.c | 85 > > ++++++++++++++++++++++++++++ > > > drivers/net/ice/base/ice_flow.h | 4 ++ > > > 4 files changed, 148 insertions(+) > > > > > > diff --git a/drivers/net/ice/base/ice_flex_pipe.c > > > b/drivers/net/ice/base/ice_flex_pipe.c > > > index 06a233990f..030655f3f0 100644 > > > --- a/drivers/net/ice/base/ice_flex_pipe.c > > > +++ b/drivers/net/ice/base/ice_flex_pipe.c > > > @@ -6365,3 +6365,58 @@ ice_rem_prof_id_flow(struct ice_hw *hw, > > enum > > > ice_block blk, u16 vsi, u64 hdl) > > > > > > return status; > > > } > > > + > > > +/** > > > + * ice_flow_assoc_hw_prof - add profile id flow for main/ctrl VSI > > > +flow entry > > > + * @hw: pointer to the HW struct > > > + * @blk: HW block > > > + * @dest_vsi_handle: dest VSI handle > > > + * @fdir_vsi_handle: fdir programming VSI handle > > > + * @id: profile id (handle) > > > + * @fv_found: found fv in fdir fv list > > > + * > > > + * Calling this function will update the hardware tables to enable > > > +the > > > + * profile indicated by the ID parameter for the VSIs specified in > > > +the VSI > > > + * array. Once successfully called, the flow will be enabled. > > > + */ > > > +enum ice_status > > > +ice_flow_assoc_hw_prof(struct ice_hw *hw, enum ice_block blk, > > > + u16 dest_vsi_handle, u16 fdir_vsi_handle, int id, > > > + bool fv_found) > > > > Do we really need this fv_found parameter? >=20 > The value of fv_found is set based on the maintained profile info list in= the PMD. > So we need this parameter to add profile id flow for FDIR in the shared c= ode. I mean if we parse fv_found =3D true into ice_flow_assoc_hw_prof, nothing w= ill happen, So why not just remove the parameter and we can do below=20 If (!fv_found) ice_flow_assoc_hw_prof(...) its always better to reduce unnecessary context for simple purpose in a fun= ction. =09 >=20 > > > > If fv_found is true, seems nothing has been done in this function, why > > not just check the flag outside the function? >=20 > Yes, ice_add_prof_id_flow should be processed after ice_add_prof. > It's ok if we just move the ice_add_prof_id_flow processing into func > ice_flow_set_hw_prof, and delete the func ice_flow_assoc_hw_prof to reduc= e > the code size. >=20 > For RSS, the ice_add_prof_id_flow for adding dest_vsi_handle should alway= s be > processed. > So this function has other RSS logic to add soon. >=20 > > > > > > >=20