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 349BBA0471 for ; Mon, 9 Sep 2019 11:19:37 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E6B061EB53; Mon, 9 Sep 2019 11:19:35 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 6AF0D1EB52 for ; Mon, 9 Sep 2019 11:19:34 +0200 (CEST) X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Sep 2019 02:19:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,484,1559545200"; d="scan'208";a="384897859" Received: from yexl-server.sh.intel.com (HELO localhost) ([10.67.117.5]) by fmsmga006.fm.intel.com with ESMTP; 09 Sep 2019 02:19:31 -0700 Date: Mon, 9 Sep 2019 17:17:21 +0800 From: Ye Xiaolong To: "Yang, Qiming" Cc: "Wang, Ying A" , "Zhang, Qi Z" , "dev@dpdk.org" , "Zhao1, Wei" Message-ID: <20190909091721.GB20737@intel.com> References: <20190903221522.151382-1-ying.a.wang@intel.com> <20190903221522.151382-2-ying.a.wang@intel.com> <20190904123409.GB54897@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) 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" On 09/09, Yang, Qiming wrote: >> 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. >> > >I think you can ignore these concepts, just our design used, user will only know we have two stages. I'll delete this sentence. At least we'll still need to tell user how to use these two stages in practice. > >> >+ stage, priority is ignored. Default, generic flow API is enabled in >> >+ none pipeline mode, >> >> s/Default/By default >> > >Got > >> >+ user can choose to use pipeline mode by set ``devargs`` parameter >> >+ ``pipeline-mode-support``, >> >> s/set/setting >> >Got > >> >+ for example:: >> >+ >> >+ -w 80:00.0, pipleline-mode-support=1 >> >+ >> > 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[] = { >> > 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 = rte_kvargs_process(kvlist, ICE_SAFE_MODE_SUPPORT_ARG, >> > &parse_bool, &ad- >> >devargs.safe_mode_support); >> >+ if (ret) >> >+ goto err_devargs; >> >+ >> >+ ret = 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; >> > >> >> These 2 lines are duplicated with below code. > >Not duplicated, one for normal case, one for error case. If no this two lines, the first argument's return value will be covered by the second one. I don't get it, they are literally the same thing, it's a normal case or a error case depends on the ret value obtained. What do you mean by "will be covered by the second one"? If the first argument process succeeds, the ret is 0, it will continue to parse the second one, if ret is non-zero, it just goes out by the `goto` statement. Thanks, Xiaolong > >> >> >+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 "=<0|1>"); >> >+ ICE_SAFE_MODE_SUPPORT_ARG "=<0|1>" >> >+ ICE_PIPELINE_MODE_SUPPORT_ARG "=<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 >> >