[dpdk-stable] patch 'app/testpmd: fix uninitialized members when setting PFC' has been queued to LTS release 18.11.7

Kevin Traynor ktraynor at redhat.com
Fri Feb 14 18:03:23 CET 2020


Hi,

FYI, your patch has been queued to LTS release 18.11.7

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/20/20. 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-queue

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

Thanks.

Kevin.

---
>From cd25180193ae4d4162025b0be5ecfb93b3b93562 Mon Sep 17 00:00:00 2001
From: "Wei Hu (Xavier)" <xavier.huwei at huawei.com>
Date: Tue, 21 Jan 2020 19:44:33 +0800
Subject: [PATCH] app/testpmd: fix uninitialized members when setting PFC

[ upstream commit 8a433297282662460a951882c80b5b0d5a8d88cf ]

Only a part of members in the local structure variable named pfc_conf
are initialized in the function named cmd_priority_flow_ctrl_set_parsed
when typing "set pfc_ctrl..." command, and others are random values.
However, those uninitialized members may cause failure.

This patch adds clearing zero operation before calling the API named
rte_eth_dev_priority_flow_ctrl_set API with pfc_conf as the input
parameter.

Fixes: 9b53e542e9e1 ("app/testpmd: add priority flow control")

Signed-off-by: Huisong Li <lihuisong at huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei at huawei.com>
Signed-off-by: Xuan Li <lixuan47 at hisilicon.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit at intel.com>
---
 app/test-pmd/cmdline.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index a8b53b89cf..27ce5d1880 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -6903,4 +6903,5 @@ cmd_priority_flow_ctrl_set_parsed(void *parsed_result,
 	};
 
+	memset(&pfc_conf, 0, sizeof(struct rte_eth_pfc_conf));
 	rx_fc_enable = (!strncmp(res->rx_pfc_mode, "on",2)) ? 1 : 0;
 	tx_fc_enable = (!strncmp(res->tx_pfc_mode, "on",2)) ? 1 : 0;
-- 
2.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-14 17:02:38.668524239 +0000
+++ 0029-app-testpmd-fix-uninitialized-members-when-setting-P.patch	2020-02-14 17:02:37.037406144 +0000
@@ -1 +1 @@
-From 8a433297282662460a951882c80b5b0d5a8d88cf Mon Sep 17 00:00:00 2001
+From cd25180193ae4d4162025b0be5ecfb93b3b93562 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8a433297282662460a951882c80b5b0d5a8d88cf ]
+
@@ -16 +17,0 @@
-Cc: stable at dpdk.org
@@ -27 +28 @@
-index 06672fd04e..de7a695d74 100644
+index a8b53b89cf..27ce5d1880 100644
@@ -30 +31 @@
-@@ -7090,4 +7090,5 @@ cmd_priority_flow_ctrl_set_parsed(void *parsed_result,
+@@ -6903,4 +6903,5 @@ cmd_priority_flow_ctrl_set_parsed(void *parsed_result,



More information about the stable mailing list