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 B2ECDA0353; Tue, 18 Aug 2020 19:39:42 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7AB832BE3; Tue, 18 Aug 2020 19:39:41 +0200 (CEST) Received: from mail-oo1-f65.google.com (mail-oo1-f65.google.com [209.85.161.65]) by dpdk.org (Postfix) with ESMTP id E28242B94 for ; Tue, 18 Aug 2020 19:39:39 +0200 (CEST) Received: by mail-oo1-f65.google.com with SMTP id a6so4318314oog.9 for ; Tue, 18 Aug 2020 10:39:39 -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=6f6fiZWO0SeGanqQZz4/NXIBOAzppC7fpDTbC2l//Zo=; b=bOimJmx26US9M0OQ3K+h8CQVVKHIxnHtd+8mGNNRX+3BroK7SoGqmGSjrPCxdHxFzl R0LlBrqYZZeRLxiBTUamXiSmh9aH2rn5yLDYJI7AcwhLURMdelXYYb8nCnf7BdmSFLGx og8XVYo6/x+ioyh7tbm20Xt3sonCxt6+C3w18= 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=6f6fiZWO0SeGanqQZz4/NXIBOAzppC7fpDTbC2l//Zo=; b=eMoQqKm3+bLtNpXRJ4QQb2ftgLzoKPlGhm2ut+hF06CCOoHJiYf36ip2tKEMhrE9QV 5jEfnCSh5DJyZAppvRuQceGlyCpZ6ikxQkl2s/p3HzPQ1d3Iiw0NgMju7GeA3L5gCZir YyGq1cFIuffTkwQJlynFLNdXvWG0AUmTVoTgRBmjxCQiDpbtLGKln5dBsGe+F7sCP7HK zswqQbdxLNvt3Uq9iLIbu+wdvgqh/yXXxGkcRi93EBsnXjsYQNAQqo0w2s3Aq8SlSPcY NRdu3JlaZDwJe5trXIDttH0MulJ4Nt8qhSxI0jKz3zX7CIeR2dSt0NkY0ebyIn6LeFHx 2tmA== X-Gm-Message-State: AOAM533mXrAYH+pxdUUtqIT8CvuqQ0pNaGpG6bxYp8VYrqbWLmF5VXHZ h8PnRgMOb2Cv3ARWkfoQ/cE5/GEa1dnpZrmgHyTH6g== X-Google-Smtp-Source: ABdhPJxsoxGKHA/BR/IOlZjIU0G6Rizu+krNcZy+ZEfvECEQggSdcT1tc6Fqn17JZ5t3OeSCQgP3o6RDFrVoW6IWtlc= X-Received: by 2002:a4a:c3c5:: with SMTP id e5mr15988805ooq.52.1597772378846; Tue, 18 Aug 2020 10:39:38 -0700 (PDT) MIME-Version: 1.0 References: <20200808143631.1704756-1-kirankumark@marvell.com> <20200818072143.2189928-1-kirankumark@marvell.com> In-Reply-To: <20200818072143.2189928-1-kirankumark@marvell.com> From: Ajit Khaparde Date: Tue, 18 Aug 2020 10:39:22 -0700 Message-ID: To: Kiran Kumar K Cc: Wenzhuo Lu , Beilei Xing , Bernard Iremonger , Thomas Monjalon , Ferruh Yigit , Andrew Rybchenko , dpdk-dev , Jerin Jacob Kollanukkaran , 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 v3 1/2] ethdev: add level support for RSS offload types 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, Aug 18, 2020 at 12:22 AM wrote: > From: Kiran Kumar K > > This patch reserves 2 bits as input selection to select Inner and > outer layers for RSS computation. It is combined with existing > ETH_RSS_* to choose Inner or outer layers for L2, L3 and L4. > This functionality already exists in rte_flow through level parameter in > RSS action configuration rte_flow_action_rss. > > Signed-off-by: Kiran Kumar K > --- > V3 Changes: > * Added testpmd support. > > app/test-pmd/parameters.c | 6 ++++++ > lib/librte_ethdev/rte_ethdev.h | 27 +++++++++++++++++++++++++++ > 2 files changed, 33 insertions(+) > > 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 }, > If we don't specify any of these two, it is inner RSS? If I configure rss-outer, how do I switch to inner RSS? Thanks > { "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) > diff --git a/lib/librte_ethdev/rte_ethdev.h > b/lib/librte_ethdev/rte_ethdev.h > index d29930fd8..28184cc85 100644 > --- a/lib/librte_ethdev/rte_ethdev.h > +++ b/lib/librte_ethdev/rte_ethdev.h > @@ -552,6 +552,33 @@ struct rte_eth_rss_conf { > #define RTE_ETH_RSS_L3_PRE64 (1ULL << 53) > #define RTE_ETH_RSS_L3_PRE96 (1ULL << 52) > > +/* > + * We use the following macros to combine with the above layers to choose > + * inner and outer layers or both for RSS computation. > + * Note: Default is 0: inner layers, 1: outer layers, 2: both > + * bit 50 and 51 are reserved for this. > + */ > + > +/** > + * Level 0, It basically stands for the innermost encapsulation level RSS > + * can be performed on according to PMD and device capabilities. > + */ > +#define ETH_RSS_LEVEL_INNER (0ULL << 50) > +/** > + * Level 1, It basically stands for the outermost encapsulation level RSS > + * can be performed on according to PMD and device capabilities. > + */ > +#define ETH_RSS_LEVEL_OUTER (1ULL << 50) > +/** > + * Level 2, It basically stands for the both inner and outermost > + * encapsulation level RSS can be performed on according to PMD and > + * device capabilities. > + */ > +#define ETH_RSS_LEVEL_INNER_OUTER (2ULL << 50) > +#define ETH_RSS_LEVEL_MASK (3ULL << 50) > + > +#define ETH_RSS_LEVEL(rss_hf) ((rss_hf & ETH_RSS_LEVEL_MASK) >> 50) > + > /** > * For input set change of hash filter, if SRC_ONLY and DST_ONLY of > * the same level are used simultaneously, it is the same case as > -- > 2.25.1 > >