From patchwork Thu Sep 17 02:07:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kiran Kumar Kokkilagadda X-Patchwork-Id: 77943 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 6411FA04B1; Thu, 17 Sep 2020 04:08:07 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 44D381D424; Thu, 17 Sep 2020 04:08:07 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id 26F6B1D421 for ; Thu, 17 Sep 2020 04:08:04 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 08H24XEI013135; Wed, 16 Sep 2020 19:07:59 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=0igkrGLdLzYV5ysE25fxaoNLkMDxLgTGV6mZAKT2kTE=; b=RwBSF04WdvJCOInvOBE0SNvB6EqoqGgQvd/afXSxliKogqraic+xGhOXZWuE4VbGpnrb ujFqQI/oJ9WUh0CgRu1FdGd8+9GQ47/uWHs8qgFxa9ovfhLkHscRvcQiqlKkDLrWjU+C 5BHXCMNkTLVRsMvYEje9IokWOkhAxBRYhNAHB0SFxlDcjdZSCzT2cPfJHxqIbLuc7/h8 G5AQeUcukp/VCclUcJYYcvZYQ4L0VoMzPbqaQLN0g9F+KiIGTSKR6d7WP6kk55fWUWWU tIVJXQaO+FKeVE+d1v0iItkEhOrJsQ0wjhHG0fCJdnXlBuPTxORdbbYnJlafgkQCiVYR Tg== Received: from sc-exch02.marvell.com ([199.233.58.182]) by mx0a-0016f401.pphosted.com with ESMTP id 33k5njnbsr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 16 Sep 2020 19:07:59 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by SC-EXCH02.marvell.com (10.93.176.82) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 16 Sep 2020 19:07:58 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Wed, 16 Sep 2020 19:07:58 -0700 Received: from localhost.localdomain (unknown [10.28.34.15]) by maili.marvell.com (Postfix) with ESMTP id 74E6A3F703F; Wed, 16 Sep 2020 19:07:46 -0700 (PDT) From: To: Thomas Monjalon , Ferruh Yigit , Andrew Rybchenko CC: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Kiran Kumar K Date: Thu, 17 Sep 2020 07:37:33 +0530 Message-ID: <20200917020735.2195069-1-kirankumark@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200901032708.58247-1-kirankumark@marvell.com> References: <20200901032708.58247-1-kirankumark@marvell.com> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235, 18.0.687 definitions=2020-09-17_02:2020-09-16, 2020-09-17 signatures=0 Subject: [dpdk-dev] [PATCH v8 1/3] 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" From: Kiran Kumar K This patch reserves 2 bits as input selection to select Inner and outer encapsulation level for RSS computation. It is combined with existing ETH_RSS_* to choose Inner or outer layers. This functionality already exists in rte_flow through level parameter in RSS action configuration rte_flow_action_rss. Signed-off-by: Kiran Kumar K Acked-by: Andrew Rybchenko Reviewed-by: Ajit Khaparde --- V8 Changes: * Re-worked the level parameters. Added as PMD_DEFAULT, LEVEL_OUTERMOST, LEVEL_INNERMOST lib/librte_ethdev/rte_ethdev.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) -- 2.25.1 diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h index 70295d7ab..869748474 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. + * bit 50 and 51 are reserved for this. + */ + +/** level 0, requests the default behavior. Depending on the packet + * type, it can mean outermost, innermost, anything in between or even no RSS. + * It basically stands for the innermost encapsulation level RSS + * can be performed on according to PMD and device capabilities. + */ +#define ETH_RSS_LEVEL_PMD_DEFAULT (0ULL << 50) + +/** level 1, requests RSS to be performed on the outermost packet + * encapsulation level. + */ +#define ETH_RSS_LEVEL_OUTERMOST (1ULL << 50) + +/** level 2, requests RSS to be performed on the + * specified inner packet encapsulation level, from outermost to + * innermost (lower to higher values). + */ +#define ETH_RSS_LEVEL_INNERMOST (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 From patchwork Thu Sep 17 02:07:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kiran Kumar Kokkilagadda X-Patchwork-Id: 77944 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1AB52A04B1; Thu, 17 Sep 2020 04:08:23 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C082B1D447; Thu, 17 Sep 2020 04:08:22 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id C10901D446 for ; Thu, 17 Sep 2020 04:08:16 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 08H24hkW013205; Wed, 16 Sep 2020 19:08:12 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=K9bwma+ucelW8mU87rp1izr3KlqCWM3XAW7s/klZHfQ=; b=TBhwFSoQM0n7jQEzwWr9LyxhGKfRyd7QUmmsqhFalnBqUZT3QeWCJwZ/nDuxFjOPnhqD sLW6LJek+kGsXthj4wxLRWDTtwzV013xFxQg/BoqoSq1R3skzvnGfAnTWehG+FyYcbui 9ogXD8oaOei2EvOp1QHBEEyS3iPK6zTkk1bbu7LgOpcA1gPQI9e9WJ/YuFQ3n6Hz/Vwr DvVTNAA5+ci5E+R9zufCs3pKOH3XZwpG2m0fu2Td5FNyreACq0nXEqTZuCi+mXJKHatu R3nIHsQURsaMG4VImMPhnhiGJbnfVViWzYhm4i8QvXYaSrl8WzwWZ8AYC/RcStdRD6rN BA== Received: from sc-exch02.marvell.com ([199.233.58.182]) by mx0a-0016f401.pphosted.com with ESMTP id 33k5njnbtd-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 16 Sep 2020 19:08:12 -0700 Received: from SC-EXCH04.marvell.com (10.93.176.84) by SC-EXCH02.marvell.com (10.93.176.82) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 16 Sep 2020 19:08:11 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 16 Sep 2020 19:08:10 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Wed, 16 Sep 2020 19:08:10 -0700 Received: from localhost.localdomain (unknown [10.28.34.15]) by maili.marvell.com (Postfix) with ESMTP id A11C63F703F; Wed, 16 Sep 2020 19:07:58 -0700 (PDT) From: To: Wenzhuo Lu , Beilei Xing , Bernard Iremonger CC: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Kiran Kumar K Date: Thu, 17 Sep 2020 07:37:34 +0530 Message-ID: <20200917020735.2195069-2-kirankumark@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200917020735.2195069-1-kirankumark@marvell.com> References: <20200901032708.58247-1-kirankumark@marvell.com> <20200917020735.2195069-1-kirankumark@marvell.com> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235, 18.0.687 definitions=2020-09-17_02:2020-09-16, 2020-09-17 signatures=0 Subject: [dpdk-dev] [PATCH v8 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" From: Kiran Kumar K Adding support to set RSS level from ethdev config. level-default will requests the default behavior. level-outer will requests RSS to be performed on the outermost packet encapsulation level. level-inner will request RSS to be performed on the specified inner packet encapsulation level, from outermost to innermost. Signed-off-by: Kiran Kumar K Reviewed-by: Ajit Khaparde --- app/test-pmd/cmdline.c | 17 ++++++++++++++--- app/test-pmd/parameters.c | 14 +++++++++++--- 2 files changed, 25 insertions(+), 6 deletions(-) diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index 0a6ed85f3..db6263026 100644 --- a/app/test-pmd/cmdline.c +++ b/app/test-pmd/cmdline.c @@ -794,7 +794,8 @@ static void cmd_help_long_parsed(void *parsed_result, "receive buffers available.\n\n" "port config all rss (all|default|ip|tcp|udp|sctp|" - "ether|port|vxlan|geneve|nvgre|vxlan-gpe|none|)\n" + "ether|port|vxlan|geneve|nvgre|vxlan-gpe|none|level-default|" + "level-outer|level-inner|)\n" " Set the RSS mode.\n\n" "port config port-id rss reta (hash,queue)[,(hash,queue)]\n" @@ -2334,7 +2335,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-default")) { + rss_hf &= (~ETH_RSS_LEVEL_MASK); + rss_conf.rss_hf = (rss_hf | ETH_RSS_LEVEL_PMD_DEFAULT); + } else if (!strcmp(res->value, "level-outer")) { + rss_hf &= (~ETH_RSS_LEVEL_MASK); + rss_conf.rss_hf = (rss_hf | ETH_RSS_LEVEL_OUTERMOST); + } else if (!strcmp(res->value, "level-inner")) { + rss_hf &= (~ETH_RSS_LEVEL_MASK); + rss_conf.rss_hf = (rss_hf | ETH_RSS_LEVEL_INNERMOST); + } else if (!strcmp(res->value, "default")) use_default = 1; else if (isdigit(res->value[0]) && atoi(res->value) > 0 && atoi(res->value) < 64) @@ -2393,7 +2403,8 @@ cmdline_parse_inst_t cmd_config_rss = { .data = NULL, .help_str = "port config all rss " "all|default|eth|vlan|ip|tcp|udp|sctp|ether|port|vxlan|geneve|" - "nvgre|vxlan-gpe|l2tpv3|esp|ah|pfcp|none|", + "nvgre|vxlan-gpe|l2tpv3|esp|ah|pfcp|none|level-default|" + "level-outer|level-inner|", .tokens = { (void *)&cmd_config_rss_port, (void *)&cmd_config_rss_keyword, diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c index 7cb0e3d6e..34a793945 100644 --- a/app/test-pmd/parameters.c +++ b/app/test-pmd/parameters.c @@ -66,9 +66,9 @@ usage(char* progname) "--tx-ip=SRC,DST | --tx-udp=PORT | " #endif "--pkt-filter-mode= |" - "--rss-ip | --rss-udp | " - "--rxpt= | --rxht= | --rxwt= | --rxfreet= | " - "--txpt= | --txht= | --txwt= | --txfreet= | " + "--rss-ip | --rss-udp | --rss-level-inner | --rss-level-outer |" + "--rxpt= | --rxht= | --rxwt= |" + " --rxfreet= | --txpt= | --txht= | --txwt= | --txfreet= | " "--txrst= | --tx-offloads= | | --rx-offloads= | " "--vxlan-gpe-port= ]\n", progname); @@ -151,6 +151,8 @@ usage(char* progname) "swap L2,L3,L4 for MAC, IPv4/IPv6 and TCP/UDP only.\n"); printf(" --rss-ip: set RSS functions to IPv4/IPv6 only .\n"); printf(" --rss-udp: set RSS functions to IPv4/IPv6 + UDP.\n"); + printf(" --rss-level-inner: set RSS hash level to innermost\n"); + printf(" --rss-level-outer: set RSS hash level to outermost\n"); printf(" --rxq=N: set the number of RX queues per port to N.\n"); printf(" --rxd=N: set the number of descriptors in RX rings to N.\n"); printf(" --txq=N: set the number of TX queues per port to N.\n"); @@ -632,6 +634,8 @@ launch_args_parse(int argc, char** argv) { "forward-mode", 1, 0, 0 }, { "rss-ip", 0, 0, 0 }, { "rss-udp", 0, 0, 0 }, + { "rss-level-outer", 0, 0, 0 }, + { "rss-level-inner", 0, 0, 0 }, { "rxq", 1, 0, 0 }, { "txq", 1, 0, 0 }, { "rxd", 1, 0, 0 }, @@ -1051,6 +1055,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-level-inner")) + rss_hf |= ETH_RSS_LEVEL_INNERMOST; + if (!strcmp(lgopts[opt_idx].name, "rss-level-outer")) + rss_hf |= ETH_RSS_LEVEL_OUTERMOST; if (!strcmp(lgopts[opt_idx].name, "rxq")) { n = atoi(optarg); if (n >= 0 && check_nb_rxq((queueid_t)n) == 0) From patchwork Thu Sep 17 02:07:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kiran Kumar Kokkilagadda X-Patchwork-Id: 77945 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id C53D9A04B1; Thu, 17 Sep 2020 04:08:34 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7D0CB1D44F; Thu, 17 Sep 2020 04:08:34 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id F087E1D421 for ; Thu, 17 Sep 2020 04:08:29 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 08H24XEK013135; Wed, 16 Sep 2020 19:08:25 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=dufzOK1CLlItEAUoe718lpkg5NppijEFS1+w0tX6qog=; b=ELW9Lupvg6NgjVidm2PcVBSjEpEdTJcaMotqnXbOYuskfeQFwjb6R61rDhX0BfqAvUS+ rbVRQ6/G7Tl2U3EYA+V2YASa+8CxuAke11LweBTKuy2Rb/wzwdsfrcENKnlzn5FZhfpm VJ62s1IzSRCh0TntmYywwZkQLpJN2Bxgii5LYamu0qcGAli5IYTgX9ma6AttX2RVgGK7 ML202O1XedIALaHVg5ldxc6U7yBPgSG/h7w85Bq1ZDmhk1Jy+Jq8Xe2YdT+oUGUB9SkK l+sTjcnPHdnz95VEKmck6c6Q9hFe6xnnKf3gOlblNzhOcntNCHBHK5AfV1Nc0ipShvY4 IQ== Received: from sc-exch01.marvell.com ([199.233.58.181]) by mx0a-0016f401.pphosted.com with ESMTP id 33k5njnbu3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 16 Sep 2020 19:08:25 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 16 Sep 2020 19:08:24 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 16 Sep 2020 19:08:23 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Wed, 16 Sep 2020 19:08:23 -0700 Received: from localhost.localdomain (unknown [10.28.34.15]) by maili.marvell.com (Postfix) with ESMTP id 5EB7F3F703F; Wed, 16 Sep 2020 19:08:11 -0700 (PDT) From: To: Jerin Jacob , Nithin Dabilpuram , Kiran Kumar K CC: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Date: Thu, 17 Sep 2020 07:37:35 +0530 Message-ID: <20200917020735.2195069-3-kirankumark@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200917020735.2195069-1-kirankumark@marvell.com> References: <20200901032708.58247-1-kirankumark@marvell.com> <20200917020735.2195069-1-kirankumark@marvell.com> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235, 18.0.687 definitions=2020-09-17_02:2020-09-16, 2020-09-17 signatures=0 Subject: [dpdk-dev] [PATCH v8 3/3] net/octeontx2: add rss hash level support 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" From: Kiran Kumar K Add support to choose rss hash level from ethdev rss config. Signed-off-by: Kiran Kumar K --- drivers/net/octeontx2/otx2_ethdev.h | 2 +- drivers/net/octeontx2/otx2_rss.c | 13 +++++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/drivers/net/octeontx2/otx2_ethdev.h b/drivers/net/octeontx2/otx2_ethdev.h index e9efe52bb..a11411239 100644 --- a/drivers/net/octeontx2/otx2_ethdev.h +++ b/drivers/net/octeontx2/otx2_ethdev.h @@ -119,7 +119,7 @@ #define NIX_RSS_OFFLOAD (ETH_RSS_PORT | ETH_RSS_IP | ETH_RSS_UDP |\ ETH_RSS_TCP | ETH_RSS_SCTP | \ ETH_RSS_TUNNEL | ETH_RSS_L2_PAYLOAD | \ - NIX_RSS_L3_L4_SRC_DST) + NIX_RSS_L3_L4_SRC_DST | ETH_RSS_LEVEL_MASK) #define NIX_TX_OFFLOAD_CAPA ( \ DEV_TX_OFFLOAD_MBUF_FAST_FREE | \ diff --git a/drivers/net/octeontx2/otx2_rss.c b/drivers/net/octeontx2/otx2_rss.c index d859937e6..03f7bc7ea 100644 --- a/drivers/net/octeontx2/otx2_rss.c +++ b/drivers/net/octeontx2/otx2_rss.c @@ -323,6 +323,7 @@ otx2_nix_rss_hash_update(struct rte_eth_dev *eth_dev, struct rte_eth_rss_conf *rss_conf) { struct otx2_eth_dev *dev = otx2_eth_pmd_priv(eth_dev); + uint8_t rss_hash_level; uint32_t flowkey_cfg; uint8_t alg_idx; int rc; @@ -339,7 +340,11 @@ otx2_nix_rss_hash_update(struct rte_eth_dev *eth_dev, otx2_nix_rss_set_key(dev, rss_conf->rss_key, (uint32_t)rss_conf->rss_key_len); - flowkey_cfg = otx2_rss_ethdev_to_nix(dev, rss_conf->rss_hf, 0); + rss_hash_level = ETH_RSS_LEVEL(rss_conf->rss_hf); + if (rss_hash_level) + rss_hash_level -= 1; + flowkey_cfg = + otx2_rss_ethdev_to_nix(dev, rss_conf->rss_hf, rss_hash_level); rc = otx2_rss_set_hf(dev, flowkey_cfg, &alg_idx, NIX_DEFAULT_RSS_CTX_GROUP, @@ -375,6 +380,7 @@ otx2_nix_rss_config(struct rte_eth_dev *eth_dev) { struct otx2_eth_dev *dev = otx2_eth_pmd_priv(eth_dev); uint32_t idx, qcnt = eth_dev->data->nb_rx_queues; + uint8_t rss_hash_level; uint32_t flowkey_cfg; uint64_t rss_hf; uint8_t alg_idx; @@ -399,7 +405,10 @@ otx2_nix_rss_config(struct rte_eth_dev *eth_dev) } rss_hf = eth_dev->data->dev_conf.rx_adv_conf.rss_conf.rss_hf; - flowkey_cfg = otx2_rss_ethdev_to_nix(dev, rss_hf, 0); + rss_hash_level = ETH_RSS_LEVEL(rss_hf); + if (rss_hash_level) + rss_hash_level -= 1; + flowkey_cfg = otx2_rss_ethdev_to_nix(dev, rss_hf, rss_hash_level); rc = otx2_rss_set_hf(dev, flowkey_cfg, &alg_idx, NIX_DEFAULT_RSS_CTX_GROUP,