patch 'app/testpmd: avoid crash in DCB config' has been queued to stable release 23.11.4
Xueming Li
xuemingl at nvidia.com
Tue Apr 8 09:44:31 CEST 2025
Hi,
FYI, your patch has been queued to stable release 23.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 04/10/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=afcc3d93754bba06e1797f4e3ab2f4b88c5d9cf4
Thanks.
Xueming Li <xuemingl at nvidia.com>
---
>From afcc3d93754bba06e1797f4e3ab2f4b88c5d9cf4 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen at huawei.com>
Date: Thu, 20 Feb 2025 15:06:51 +0800
Subject: [PATCH] app/testpmd: avoid crash in DCB config
Cc: Xueming Li <xuemingl at nvidia.com>
[ upstream commit d646e219b34ffc4d531f3703fc317e7cff9a25ae ]
The "port config dcb ..." command will segment fault when input with
invalid port id, this patch fixes it.
Fixes: 9b53e542e9e1 ("app/testpmd: add priority flow control")
Signed-off-by: Chengwen Feng <fengchengwen at huawei.com>
---
app/test-pmd/cmdline.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index bf6794ee1d..c150315eb8 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -3120,6 +3120,9 @@ cmd_config_dcb_parsed(void *parsed_result,
uint8_t pfc_en;
int ret;
+ if (port_id_is_invalid(port_id, ENABLED_WARN))
+ return;
+
port = &ports[port_id];
/** Check if the port is not started **/
if (port->port_status != RTE_PORT_STOPPED) {
@@ -6322,6 +6325,9 @@ cmd_priority_flow_ctrl_set_parsed(void *parsed_result,
int rx_fc_enable, tx_fc_enable;
int ret;
+ if (port_id_is_invalid(res->port_id, ENABLED_WARN))
+ return;
+
/*
* Rx on/off, flow control is enabled/disabled on RX side. This can indicate
* the RTE_ETH_FC_TX_PAUSE, Transmit pause frame at the Rx side.
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-04-08 15:39:06.228737283 +0800
+++ 0006-app-testpmd-avoid-crash-in-DCB-config.patch 2025-04-08 15:39:05.866436601 +0800
@@ -1 +1 @@
-From d646e219b34ffc4d531f3703fc317e7cff9a25ae Mon Sep 17 00:00:00 2001
+From afcc3d93754bba06e1797f4e3ab2f4b88c5d9cf4 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit d646e219b34ffc4d531f3703fc317e7cff9a25ae ]
@@ -10 +12,0 @@
-Cc: stable at dpdk.org
@@ -18 +20 @@
-index 6b0d8af4f6..6ca3eedb92 100644
+index bf6794ee1d..c150315eb8 100644
@@ -21 +23 @@
-@@ -3462,6 +3462,9 @@ cmd_config_dcb_parsed(void *parsed_result,
+@@ -3120,6 +3120,9 @@ cmd_config_dcb_parsed(void *parsed_result,
@@ -31 +33 @@
-@@ -6664,6 +6667,9 @@ cmd_priority_flow_ctrl_set_parsed(void *parsed_result,
+@@ -6322,6 +6325,9 @@ cmd_priority_flow_ctrl_set_parsed(void *parsed_result,
More information about the stable
mailing list