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 EF111A0471 for ; Mon, 9 Sep 2019 05:09:05 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C90161EAB5; Mon, 9 Sep 2019 05:09:04 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id CF7CE1EA9E for ; Mon, 9 Sep 2019 05:09:02 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Sep 2019 20:09:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,483,1559545200"; d="scan'208";a="188892926" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga006.jf.intel.com with ESMTP; 08 Sep 2019 20:09:01 -0700 Received: from fmsmsx122.amr.corp.intel.com (10.18.125.37) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sun, 8 Sep 2019 20:09:00 -0700 Received: from shsmsx107.ccr.corp.intel.com (10.239.4.96) by fmsmsx122.amr.corp.intel.com (10.18.125.37) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sun, 8 Sep 2019 20:09:00 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.92]) by SHSMSX107.ccr.corp.intel.com ([169.254.9.89]) with mapi id 14.03.0439.000; Mon, 9 Sep 2019 11:08:59 +0800 From: "Yang, Qiming" To: "Ye, Xiaolong" , "Wang, Ying A" CC: "Zhang, Qi Z" , "dev@dpdk.org" , "Zhao1, Wei" Thread-Topic: [PATCH 1/4] net/ice: add devargs to control pipeline mode Thread-Index: AQHVYus4h4r3LH6pjkiCO2+61bOjCaca7iaAgAe/ykA= Date: Mon, 9 Sep 2019 03:08:58 +0000 Message-ID: References: <20190903221522.151382-1-ying.a.wang@intel.com> <20190903221522.151382-2-ying.a.wang@intel.com> <20190904123409.GB54897@intel.com> In-Reply-To: <20190904123409.GB54897@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNTM0NjMwNzYtOGQ2Ny00MDFiLWI1NmItNTYzNGUwYWQzNGRkIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiSFZPeXFOYzJHd3Y2YXdWK2FCVHluRVNoQ25uN21ySnh3TWR4alJHbmllQ3pQTVI4TFAyWUhsZUlRMFFkc1wvenAifQ== 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 1/4] net/ice: add devargs to control pipeline mode 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: Ye, Xiaolong > Sent: Wednesday, September 4, 2019 8:34 PM > To: Wang, Ying A > Cc: Zhang, Qi Z ; Yang, Qiming > ; dev@dpdk.org; Zhao1, Wei > > Subject: Re: [PATCH 1/4] net/ice: add devargs to control pipeline mode >=20 > On 09/04, Ying Wang wrote: > >From: Qiming Yang > > > >Added a devarg to control the mode in generic flow API. > >We use none-pipeline mode by default. > > > >Signed-off-by: Qiming Yang > >--- > > doc/guides/nics/ice.rst | 11 +++++++++++ > > drivers/net/ice/ice_ethdev.c | 16 +++++++++++++++- > >drivers/net/ice/ice_ethdev.h | 1 + > > 3 files changed, 27 insertions(+), 1 deletion(-) > > > >diff --git a/doc/guides/nics/ice.rst b/doc/guides/nics/ice.rst index > >03819d29f..a8429a535 100644 > >--- a/doc/guides/nics/ice.rst > >+++ b/doc/guides/nics/ice.rst > >@@ -61,6 +61,17 @@ Runtime Config Options > > NOTE: In Safe mode, only very limited features are available, feature= s like > RSS, > > checksum, fdir, tunneling ... are all disabled. > > > >+- ``Generic Flow Pipeline Mode Support`` (default ``0``) > >+ > >+ In pipeline mode, a flow can be setted at one specific stage by > >+ setting parameter >=20 > s/setted/set Got >=20 > >+ ``priority``. Currently, we support two stages, priority 0 for > >+ permission and 1 for distributor. For none-pipeline mode, all flows > >+ are assumed to be at the same pipeline >=20 > Can we have more description of the 'permission' and 'distributor' in the= doc? > And we also need update in 19.11 release note, maybe in Ying's patch. >=20 I think you can ignore these concepts, just our design used, user will only= know we have two stages. I'll delete this sentence. > >+ stage, priority is ignored. Default, generic flow API is enabled in > >+ none pipeline mode, >=20 > s/Default/By default >=20 Got > >+ user can choose to use pipeline mode by set ``devargs`` parameter > >+ ``pipeline-mode-support``, >=20 > s/set/setting >=20 Got > >+ for example:: > >+ > >+ -w 80:00.0, pipleline-mode-support=3D1 > >+ > > Driver compilation and testing > > ------------------------------ > > > >diff --git a/drivers/net/ice/ice_ethdev.c > >b/drivers/net/ice/ice_ethdev.c index 9aa7506ba..4e0645db1 100644 > >--- a/drivers/net/ice/ice_ethdev.c > >+++ b/drivers/net/ice/ice_ethdev.c > >@@ -19,9 +19,11 @@ > > > > /* devargs */ > > #define ICE_SAFE_MODE_SUPPORT_ARG "safe-mode-support" > >+#define ICE_PIPELINE_MODE_SUPPORT_ARG "pipeline-mode-support" > > > > static const char * const ice_valid_args[] =3D { > > ICE_SAFE_MODE_SUPPORT_ARG, > >+ ICE_PIPELINE_MODE_SUPPORT_ARG, > > NULL > > }; > > > >@@ -1510,7 +1512,18 @@ static int ice_parse_devargs(struct rte_eth_dev > >*dev) > > > > ret =3D rte_kvargs_process(kvlist, ICE_SAFE_MODE_SUPPORT_ARG, > > &parse_bool, &ad- > >devargs.safe_mode_support); > >+ if (ret) > >+ goto err_devargs; > >+ > >+ ret =3D rte_kvargs_process(kvlist, ICE_PIPELINE_MODE_SUPPORT_ARG, > >+ &parse_bool, &ad- > >devargs.pipeline_mode_support); > >+ if (ret) > >+ goto err_devargs; > >+ > >+ rte_kvargs_free(kvlist); > >+ return ret; > > >=20 > These 2 lines are duplicated with below code. Not duplicated, one for normal case, one for error case. If no this two lin= es, the first argument's return value will be covered by the second one. >=20 > >+err_devargs: > > rte_kvargs_free(kvlist); > > return ret; > > } > >@@ -3925,7 +3938,8 @@ RTE_PMD_REGISTER_PCI(net_ice, rte_ice_pmd); > >RTE_PMD_REGISTER_PCI_TABLE(net_ice, pci_id_ice_map); > >RTE_PMD_REGISTER_KMOD_DEP(net_ice, "* igb_uio | uio_pci_generic | > >vfio-pci"); RTE_PMD_REGISTER_PARAM_STRING(net_ice, > >- ICE_SAFE_MODE_SUPPORT_ARG "=3D<0|1>"); > >+ ICE_SAFE_MODE_SUPPORT_ARG "=3D<0|1>" > >+ ICE_PIPELINE_MODE_SUPPORT_ARG "=3D<0|1>"); > > > > RTE_INIT(ice_init_log) > > { > >diff --git a/drivers/net/ice/ice_ethdev.h > >b/drivers/net/ice/ice_ethdev.h index 926db23d2..9bf5de08d 100644 > >--- a/drivers/net/ice/ice_ethdev.h > >+++ b/drivers/net/ice/ice_ethdev.h > >@@ -285,6 +285,7 @@ struct ice_pf { > > */ > > struct ice_devargs { > > int safe_mode_support; > >+ int pipeline_mode_support; > > }; > > > > /** > >-- > >2.15.1 > >