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 087B0A0563; Wed, 15 Apr 2020 18:31:27 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 76D8B1D6DE; Wed, 15 Apr 2020 18:31:27 +0200 (CEST) Received: from mail-pj1-f52.google.com (mail-pj1-f52.google.com [209.85.216.52]) by dpdk.org (Postfix) with ESMTP id 2C7231D6D9 for ; Wed, 15 Apr 2020 18:31:26 +0200 (CEST) Received: by mail-pj1-f52.google.com with SMTP id q16so165373pje.1 for ; Wed, 15 Apr 2020 09:31:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=7Sbs3ZjKmDdCG5mf+5JRep9IKMFa6p5l0U2AoMgM3JM=; b=C8iMIyWL4DQNRfaO+ApBBIyT42YbAoiYLRLZeI1z+TL9pK33ZvIVet52/FPeuXfeh8 KoM2Kt/1Q56GX1kXJude+4NTNvEzHImP/NdWJ8awj1ax7Tf4auhUbUAbZuF6ir5CM0aB y8I1uQmuDLK+eSlbUo6omKedAQ4+4fOkeb+mRik8oIwevqASkUUekLKoSkIaM0/bmz0d PDQy6NPP2Vhgy6C6RxTdERncdhrgS98PaOYYToYtA1O7cEtqrUQ0iu34Ol1fWvjhZZmI /DUuHKoxy3FXk5b8sAuZrRY+ZSI7x7d4Vj3Dla+FBV7BHUAEaPY+dNtSh232qjajS3IY Weuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=7Sbs3ZjKmDdCG5mf+5JRep9IKMFa6p5l0U2AoMgM3JM=; b=kauHCENWvMNy7+/fZOiNuzyLYlIdB381URNgu2nSvw3kOYXdfPFR9vEbP3i9Gb25wC gfF8678CetQB+Q7eJq47ym/wHij7nIvy4XOkyMS+4j2hVmQC3JfsIDHhWEgxYnIGHiU4 I4uIdrlFJfT5El0jGXxcNSpuN1cIWzhy5oJbTy6SoDmhBF4MrgaQu6W30f87kHEiZ1+Y K6c0s3FfETNXS8020t8KAGLifhVhmRiBbsZHqWkFApWeNoxQid8Nkc9hv//hX9C4n6MF xOSU6tuXAx3cbx0BZPwcqvwD2pyA9HVrEF2kdiK6oi2ZQhrLM24ktp27HFi0mdKg6eIe wEqg== X-Gm-Message-State: AGi0Pub9AoZ7dRtYWRWDuFeYovQ3ZXvpQC/5jaKrpG0VHtNf5gGSbFMP fyllruCkAgAp1izsE5gef459Kw== X-Google-Smtp-Source: APiQypKD7lV+6NbosFR6xdBVUOZReUfj2A0I2mWRQ05dCjRG1lZheh1RlNFwytUnBQ3WOpsE395CJg== X-Received: by 2002:a17:90b:109:: with SMTP id p9mr97264pjz.18.1586968285272; Wed, 15 Apr 2020 09:31:25 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id q19sm8378833pfh.34.2020.04.15.09.31.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Apr 2020 09:31:25 -0700 (PDT) Date: Wed, 15 Apr 2020 09:31:16 -0700 From: Stephen Hemminger To: Ori Kam Cc: Jeff Guo , "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" Message-ID: <20200415093116.2c0c4da8@hermes.lan> In-Reply-To: References: <20200318170401.7938-5-jia.guo@intel.com> <20200414174225.64120-1-jia.guo@intel.com> <20200414174225.64120-4-jia.guo@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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" 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.