patch 'common/cnxk: fix RSS key configuration' has been queued to stable release 22.11.4

Xueming Li xuemingl at nvidia.com
Sun Oct 22 16:21:44 CEST 2023


Hi,

FYI, your patch has been queued to stable release 22.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/15/23. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=257c5a049a9489aec5da0274148f30eb02a2c5dc

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 257c5a049a9489aec5da0274148f30eb02a2c5dc Mon Sep 17 00:00:00 2001
From: Kiran Kumar K <kirankumark at marvell.com>
Date: Mon, 4 Sep 2023 16:27:41 +0530
Subject: [PATCH] common/cnxk: fix RSS key configuration
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit 56fa6f92e9e32cbc5c99af89da611a9f33bbe254 ]

Limit the configuring RSS key with rte_flow operations as
it is a global resource. Key can be update only with ethdev dev
operations using rte_eth_dev_rss_hash_update().

Fixes: 51dc6a80f843 ("common/cnxk: support RSS action in NPC rule")

Signed-off-by: Kiran Kumar K <kirankumark at marvell.com>
Reviewed-by: Jerin Jacob <jerinj at marvell.com>
---
 drivers/common/cnxk/roc_npc.c | 33 ++++++++++++++++++++++++++-------
 1 file changed, 26 insertions(+), 7 deletions(-)

diff --git a/drivers/common/cnxk/roc_npc.c b/drivers/common/cnxk/roc_npc.c
index 2ee1233757..bb478ec55b 100644
--- a/drivers/common/cnxk/roc_npc.c
+++ b/drivers/common/cnxk/roc_npc.c
@@ -835,9 +835,35 @@ npc_rss_action_configure(struct roc_npc *roc_npc,
 	uint8_t key[ROC_NIX_RSS_KEY_LEN];
 	const uint8_t *key_ptr;
 	uint8_t flowkey_algx;
+	uint32_t key_len;
 	uint16_t *reta;
 	int rc;

+	roc_nix_rss_key_get(roc_nix, key);
+	if (rss->key == NULL) {
+		key_ptr = key;
+	} else {
+		key_len = rss->key_len;
+		if (key_len > ROC_NIX_RSS_KEY_LEN)
+			key_len = ROC_NIX_RSS_KEY_LEN;
+
+		for (i = 0; i < key_len; i++) {
+			if (key[i] != rss->key[i]) {
+				plt_err("RSS key config not supported");
+				plt_err("New Key:");
+				for (i = 0; i < key_len; i++)
+					plt_dump_no_nl("0x%.2x ", rss->key[i]);
+				plt_dump_no_nl("\n");
+				plt_err("Configured Key:");
+				for (i = 0; i < ROC_NIX_RSS_KEY_LEN; i++)
+					plt_dump_no_nl("0x%.2x ", key[i]);
+				plt_dump_no_nl("\n");
+				return -ENOTSUP;
+			}
+		}
+		key_ptr = rss->key;
+	}
+
 	rc = npc_rss_free_grp_get(npc, &rss_grp_idx);
 	/* RSS group :0 is not usable for flow rss action */
 	if (rc < 0 || rss_grp_idx == 0)
@@ -852,13 +878,6 @@ npc_rss_action_configure(struct roc_npc *roc_npc,

 	*rss_grp = rss_grp_idx;

-	if (rss->key == NULL) {
-		roc_nix_rss_key_default_fill(roc_nix, key);
-		key_ptr = key;
-	} else {
-		key_ptr = rss->key;
-	}
-
 	roc_nix_rss_key_set(roc_nix, key_ptr);

 	/* If queue count passed in the rss action is less than
--
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-10-22 22:17:37.119029500 +0800
+++ 0075-common-cnxk-fix-RSS-key-configuration.patch	2023-10-22 22:17:34.296723700 +0800
@@ -1 +1 @@
-From 56fa6f92e9e32cbc5c99af89da611a9f33bbe254 Mon Sep 17 00:00:00 2001
+From 257c5a049a9489aec5da0274148f30eb02a2c5dc Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 56fa6f92e9e32cbc5c99af89da611a9f33bbe254 ]
@@ -11 +13,0 @@
-Cc: stable at dpdk.org
@@ -20 +22 @@
-index 0df647c527..94c8e94400 100644
+index 2ee1233757..bb478ec55b 100644
@@ -23 +25 @@
-@@ -943,9 +943,35 @@ npc_rss_action_configure(struct roc_npc *roc_npc,
+@@ -835,9 +835,35 @@ npc_rss_action_configure(struct roc_npc *roc_npc,
@@ -59 +61 @@
-@@ -960,13 +986,6 @@ npc_rss_action_configure(struct roc_npc *roc_npc,
+@@ -852,13 +878,6 @@ npc_rss_action_configure(struct roc_npc *roc_npc,


More information about the stable mailing list