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 D1382A0588; Thu, 16 Apr 2020 10:55:40 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2D4511D9ED; Thu, 16 Apr 2020 10:55:40 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id BF9771D9C1 for ; Thu, 16 Apr 2020 10:55:38 +0200 (CEST) IronPort-SDR: CChBs/xG1MlEM9NUr0HalmbmiSJI7FXwYHZFTAMCHdIQzUcPJ7t8eKD7A5RlSKG6YoPXd8nKGC NaQdDKJLykOA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Apr 2020 01:55:37 -0700 IronPort-SDR: E87L8NTFBvXPhQBhlPZb291aZ/X+CboY1iwUHI7Ar+W2H38aJE/T9rp8MJveldgBM+ohbwoG1l 1DgF1E9jD27w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,390,1580803200"; d="scan'208";a="299248919" Received: from jguo15x-mobl.ccr.corp.intel.com (HELO [10.67.68.153]) ([10.67.68.153]) by FMSMGA003.fm.intel.com with ESMTP; 16 Apr 2020 01:55:35 -0700 To: Stephen Hemminger , Ori Kam Cc: "bernard.iremonger@intel.com" , "xiaolong.ye@intel.com" , "qi.z.zhang@intel.com" , "dev@dpdk.org" , "jingjing.wu@intel.com" , "yahui.cao@intel.com" , "simei.su@intel.com" References: <20200318170401.7938-5-jia.guo@intel.com> <20200414174225.64120-1-jia.guo@intel.com> <20200414174225.64120-4-jia.guo@intel.com> <20200415093116.2c0c4da8@hermes.lan> From: Jeff Guo Message-ID: Date: Thu, 16 Apr 2020 16:55:34 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <20200415093116.2c0c4da8@hermes.lan> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Subject: Re: [dpdk-dev] [dpdk-dev v4 3/3] app/testpmd: add new types to RSS hash commands 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" hi, stephen On 4/16/2020 12:31 AM, Stephen Hemminger wrote: > On Tue, 14 Apr 2020 09:48:31 +0000 > Ori Kam wrote: > >>> @@ -2299,6 +2299,22 @@ cmd_config_rss_parsed(void *parsed_result, >>> rss_conf.rss_hf = ETH_RSS_L4_SRC_ONLY; >>> else if (!strcmp(res->value, "l4-dst-only")) >>> rss_conf.rss_hf = ETH_RSS_L4_DST_ONLY; >>> + else if (!strcmp(res->value, "eth-src-only")) >>> + rss_conf.rss_hf = ETH_RSS_ETH_SRC_ONLY; >>> + else if (!strcmp(res->value, "eth-dst-only")) >>> + rss_conf.rss_hf = ETH_RSS_ETH_DST_ONLY; >>> + else if (!strcmp(res->value, "s-vlan")) >>> + rss_conf.rss_hf = ETH_RSS_S_VLAN; >>> + else if (!strcmp(res->value, "c-vlan")) >>> + rss_conf.rss_hf = ETH_RSS_C_VLAN; >>> + else if (!strcmp(res->value, "l2tpv3")) >>> + rss_conf.rss_hf = ETH_RSS_L2TPV3; >>> + else if (!strcmp(res->value, "esp")) >>> + rss_conf.rss_hf = ETH_RSS_ESP; >>> + else if (!strcmp(res->value, "ah")) >>> + rss_conf.rss_hf = ETH_RSS_AH; >>> + else if (!strcmp(res->value, "pfcp")) >>> + rss_conf.rss_hf = ETH_RSS_PFCP; > Hasn't this grown big enough that it should be a table with lookup function, > versus a cascade of strcmp's. I suppose what you said is make sense, but would you mind if a next coming specific patch to fix it but not involve in this feature patch set?