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 69212A04B1; Sat, 29 Aug 2020 02:49:02 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 8B5022C2D; Sat, 29 Aug 2020 02:49:01 +0200 (CEST) Received: from mail-oi1-f196.google.com (mail-oi1-f196.google.com [209.85.167.196]) by dpdk.org (Postfix) with ESMTP id F031ACF3 for ; Sat, 29 Aug 2020 02:48:59 +0200 (CEST) Received: by mail-oi1-f196.google.com with SMTP id j18so2241795oig.5 for ; Fri, 28 Aug 2020 17:48:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=jYPu0lMoPUqwXQyrhLEBml1qQFlui689WjLYa7msnD8=; b=akw/kBNgVfYenX0klpeFxUuDMId0UoQv5xm/0fwTSVknYeKeffzMj92pC9hsk17C4a XucbJGEuKKRre0xH0Jq17FQs29kr62TDT8PBl5jmuVtgnOzvDnotWKUlcmW0E6isLd8I T3wkPk39wAPiYOqVPce65VUZCgahU42Cn/+kU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=jYPu0lMoPUqwXQyrhLEBml1qQFlui689WjLYa7msnD8=; b=CnvuR6Excj+2T4We6+Hf6FmDuZgfh/oZMjI9zP83QL7Euv1Ve82JkZm6fEJRUMF+Ou PZLG6yf/aDkzjOPcFdbFFDL08eN6xj69pTb+1rmy3URZRCbm2o1aToBl1cPEukFV7dko SxX3yg8lXPKQ+25U1QRWnjrIr9AKx3PRT1oh2zNvgP0bulSl4ewRtzIQo/Qu6FyRA/Li eYiFeyayANFWnOgiaUjc4D4JlDVAjajas7xwmY9yGFwP4sp+0tVf/Vu2NvNdIiKI4mSJ zEK5UQEuf04Hfc+8igyz8iM3F0W+3Y4bmjS6IgUQb8MuH0OjthT+9Oi5TdtPgqdrQKt/ tFxg== X-Gm-Message-State: AOAM530Zsk3Y+v3/yNfIFmw75TP6y9iB0YZWPnSNxapuLRBZ2Hs2TngD e9HFnbclYkRx9pfokNoT7nf+kFmkWEwj4LyTW+9+Eg== X-Google-Smtp-Source: ABdhPJzKk2l31rmxlS61ySF0QSt5QgxpZS03MfOfh9ukcKgyswQUUE8t9I0nJ/OOuaq+8zLkddq/gQBgvIZryMK0kbg= X-Received: by 2002:a05:6808:919:: with SMTP id w25mr960514oih.168.1598662138981; Fri, 28 Aug 2020 17:48:58 -0700 (PDT) MIME-Version: 1.0 References: <20200819060446.2264111-1-kirankumark@marvell.com> <20200821110330.214931-1-kirankumark@marvell.com> <20200821110330.214931-2-kirankumark@marvell.com> In-Reply-To: <20200821110330.214931-2-kirankumark@marvell.com> From: Ajit Khaparde Date: Fri, 28 Aug 2020 17:48:42 -0700 Message-ID: To: Kiran Kumar K Cc: Wenzhuo Lu , Beilei Xing , Bernard Iremonger , dpdk-dev , Jerin Jacob Kollanukkaran , Thomas Monjalon , Ferruh Yigit , Andrew Rybchenko , Ori Kam , Ziyang Xuan , Xiaoyun Wang , Guoyang Zhou , Rosen Xu , jia.guo@intel.com, Rasesh Mody , Shahed Shaikh , Nithin Dabilpuram , Qiming Yang , Qi Zhang , "Wiles, Keith" , Hemant Agrawal , Sachin Saxena , "Zhao1, Wei" , John Daley , Hyong Youb Kim , Chas Williams , Matan Azrad , Shahaf Shuler , Viacheslav Ovsiienko , Rahul Lakkireddy , Gaetan Rivet , lironh@marvell.com, Jingjing Wu , "Wei Hu (Xavier" , humin29@huawei.com, yisen.zhuang@huawei.com, Somnath Kotur , "Singh, Jasvinder" , "Dumitrescu, Cristian" Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH v6 2/3] app/testpmd: support ethdev rss level config 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 Fri, Aug 21, 2020 at 4:04 AM wrote: > From: Kiran Kumar K > > Adding support to set RSS level from ethdev config. > level-inner is default and will set the RSS level to inner layers. > level-outer will set the RSS level to outer layers. > level-inner-outer will set the RSS level to both inner and outer > layers. > Signed-off-by: Kiran Kumar K > --- > app/test-pmd/cmdline.c | 11 ++++++++++- > app/test-pmd/parameters.c | 6 ++++++ > 2 files changed, 16 insertions(+), 1 deletion(-) > > diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c > index 0a6ed85f3..4eafee8c8 100644 > --- a/app/test-pmd/cmdline.c > +++ b/app/test-pmd/cmdline.c > @@ -2334,7 +2334,16 @@ cmd_config_rss_parsed(void *parsed_result, > rss_conf.rss_hf = ETH_RSS_GTPU; > else if (!strcmp(res->value, "none")) > rss_conf.rss_hf = 0; > - else if (!strcmp(res->value, "default")) > + else if (!strcmp(res->value, "level-inner")) { > + rss_hf &= (~ETH_RSS_LEVEL_MASK); > + rss_conf.rss_hf = (rss_hf | ETH_RSS_LEVEL_INNER); > + } else if (!strcmp(res->value, "level-outer")) { > + rss_hf &= (~ETH_RSS_LEVEL_MASK); > + rss_conf.rss_hf = (rss_hf | ETH_RSS_LEVEL_OUTER); > + } else if (!strcmp(res->value, "level-inner-outer")) { > + rss_hf &= (~ETH_RSS_LEVEL_MASK); > + rss_conf.rss_hf = (rss_hf | ETH_RSS_LEVEL_INNER_OUTER); > + } else if (!strcmp(res->value, "default")) > Thanks for this. But I think You will have to add these options to cmd_help_long_parsed() under port config all rss (all|.... level-outer|level-inner|level-inner-outer Also cmd_config_rss.help_str needs to be extended to show the new options. level-inner|inner-outer|level-inner-outer > use_default = 1; > else if (isdigit(res->value[0]) && atoi(res->value) > 0 && > atoi(res->value) < 64) > diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c > index 7cb0e3d6e..5f669ff24 100644 > --- a/app/test-pmd/parameters.c > +++ b/app/test-pmd/parameters.c > @@ -632,6 +632,8 @@ launch_args_parse(int argc, char** argv) > { "forward-mode", 1, 0, 0 }, > { "rss-ip", 0, 0, 0 }, > { "rss-udp", 0, 0, 0 }, > + { "rss-outer", 0, 0, 0 }, > + { "rss-inner-outer", 0, 0, 0 }, > You will have to add the new args to usage() "--rss-ip | --rss-udp | --rss-outer | --rss-inner-outer | " and add some description for the new options.. printf(" --rss-outer: set RSS hash level to outer"); printf(" --rss-inner-outer: set RSS hash level to default"); > { "rxq", 1, 0, 0 }, > { "txq", 1, 0, 0 }, > { "rxd", 1, 0, 0 }, > @@ -1051,6 +1053,10 @@ launch_args_parse(int argc, char** argv) > rss_hf = ETH_RSS_IP; > if (!strcmp(lgopts[opt_idx].name, "rss-udp")) > rss_hf = ETH_RSS_UDP; > + if (!strcmp(lgopts[opt_idx].name, "rss-outer")) > + rss_hf |= ETH_RSS_LEVEL_OUTER; > + if (!strcmp(lgopts[opt_idx].name, > "rss-inner-outer")) > + rss_hf |= ETH_RSS_LEVEL_INNER_OUTER; > if (!strcmp(lgopts[opt_idx].name, "rxq")) { > n = atoi(optarg); > if (n >= 0 && check_nb_rxq((queueid_t)n) > == 0) > -- > 2.25.1 > >