patch 'net/nfp: fix crash with null RSS hash key' has been queued to stable release 23.11.5
Xueming Li
xuemingl at nvidia.com
Thu Jun 26 14:00:50 CEST 2025
Hi,
FYI, your patch has been queued to stable release 23.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/28/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=a014d3730ea54d08723d970e670eae5c56472217
Thanks.
Xueming Li <xuemingl at nvidia.com>
---
>From a014d3730ea54d08723d970e670eae5c56472217 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
Cc: Xueming Li <xuemingl at nvidia.com>
[ 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 bf44373b26..61a3685e2f 100644
--- a/drivers/net/nfp/nfp_net_common.c
+++ b/drivers/net/nfp/nfp_net_common.c
@@ -1820,9 +1820,11 @@ nfp_net_rss_hash_conf_get(struct rte_eth_dev *dev,
rss_conf->rss_key_len = nn_cfg_readl(hw, NFP_NET_CFG_RSS_KEY_SZ);
/* 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);
+ }
}
return 0;
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-06-26 19:59:19.123706571 +0800
+++ 0030-net-nfp-fix-crash-with-null-RSS-hash-key.patch 2025-06-26 19:59:17.326418046 +0800
@@ -1 +1 @@
-From 53df26286e4570ea328c5972fb244d8bc0008315 Mon Sep 17 00:00:00 2001
+From a014d3730ea54d08723d970e670eae5c56472217 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 53df26286e4570ea328c5972fb244d8bc0008315 ]
@@ -13 +15,0 @@
-Cc: stable at dpdk.org
@@ -23 +25 @@
-index aaa515bac2..600fcd5c0e 100644
+index bf44373b26..61a3685e2f 100644
@@ -26 +28 @@
-@@ -2062,9 +2062,11 @@ nfp_net_rss_hash_conf_get(struct rte_eth_dev *dev,
+@@ -1820,9 +1820,11 @@ nfp_net_rss_hash_conf_get(struct rte_eth_dev *dev,
More information about the stable
mailing list