patch 'net/nfp: fix crash with null RSS hash key' has been queued to stable release 24.11.3

Kevin Traynor ktraynor at redhat.com
Fri Jul 18 21:29:31 CEST 2025


Hi,

FYI, your patch has been queued to stable release 24.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/23/25. 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://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/9ba34acb5fcc44f82dad90c893d94655660f6519

Thanks.

Kevin

---
>From 9ba34acb5fcc44f82dad90c893d94655660f6519 Mon Sep 17 00:00:00 2001
From: Chaoyong He <chaoyong.he at corigine.com>
Date: Tue, 1 Apr 2025 15:55:07 +0800
Subject: [PATCH] net/nfp: fix crash with null RSS hash key

[ upstream commit 53df26286e4570ea328c5972fb244d8bc0008315 ]

Some testpmd application commands will use 'rss_conf->rss_key'
parameter with a NULL value to call 'rte_eth_dev_rss_hash_conf_get()'
API, and NFP PMD will coredump at these situations.

Fix this by add a check about the 'rss_conf->rss_key' pointer.

Fixes: 934e4c60fbff ("nfp: add RSS")

Signed-off-by: Chaoyong He <chaoyong.he at corigine.com>
Reviewed-by: Long Wu <long.wu at corigine.com>
Reviewed-by: Peng Zhang <peng.zhang at corigine.com>
---
 drivers/net/nfp/nfp_net_common.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/net/nfp/nfp_net_common.c b/drivers/net/nfp/nfp_net_common.c
index aaa515bac2..600fcd5c0e 100644
--- a/drivers/net/nfp/nfp_net_common.c
+++ b/drivers/net/nfp/nfp_net_common.c
@@ -2063,7 +2063,9 @@ nfp_net_rss_hash_conf_get(struct rte_eth_dev *dev,
 
 	/* Reading the key byte a byte */
-	for (i = 0; i < rss_conf->rss_key_len; i++) {
-		key = nn_cfg_readb(hw, NFP_NET_CFG_RSS_KEY + i);
-		memcpy(&rss_conf->rss_key[i], &key, 1);
+	if (rss_conf->rss_key != NULL) {
+		for (i = 0; i < rss_conf->rss_key_len; i++) {
+			key = nn_cfg_readb(hw, NFP_NET_CFG_RSS_KEY + i);
+			memcpy(&rss_conf->rss_key[i], &key, 1);
+		}
 	}
 
-- 
2.50.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-07-18 20:29:12.413042145 +0100
+++ 0037-net-nfp-fix-crash-with-null-RSS-hash-key.patch	2025-07-18 20:29:10.909907267 +0100
@@ -1 +1 @@
-From 53df26286e4570ea328c5972fb244d8bc0008315 Mon Sep 17 00:00:00 2001
+From 9ba34acb5fcc44f82dad90c893d94655660f6519 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 53df26286e4570ea328c5972fb244d8bc0008315 ]
+
@@ -13 +14,0 @@
-Cc: stable at dpdk.org



More information about the stable mailing list