patch 'examples/vmdq_dcb: initialize all configuration structures' has been queued to stable release 23.11.7

Shani Peretz shperetz at nvidia.com
Wed Apr 15 12:00:01 CEST 2026


Hi,

FYI, your patch has been queued to stable release 23.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 04/19/26. 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/shanipr/dpdk-stable

This queued commit can be viewed at:
https://github.com/shanipr/dpdk-stable/commit/f1018f4afbc416fd3834c681900edbdc5fffc274

Thanks.

Shani

---
>From f1018f4afbc416fd3834c681900edbdc5fffc274 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen at networkplumber.org>
Date: Wed, 18 Feb 2026 16:33:54 -0800
Subject: [PATCH] examples/vmdq_dcb: initialize all configuration structures

[ upstream commit 5a9362386ef80d36c9972ba1717c4a82c9ea2cc6 ]

Replace field-by-field assignment of local configuration structures
with designated initializers. This ensures all fields, including
enable_loop_back and any padding, are zero-initialized.

The Coverity warning was always latent; the earlier use of
rte_memcpy() was hiding it from the analyzer.

Coverity issue: 501603
Fixes: 8cc72f2814dd ("examples/vmdq_dcb: support X710")

Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
Acked-by: Bruce Richardson <bruce.richardson at intel.com>
---
 examples/vmdq_dcb/main.c | 31 +++++++++++++++----------------
 1 file changed, 15 insertions(+), 16 deletions(-)

diff --git a/examples/vmdq_dcb/main.c b/examples/vmdq_dcb/main.c
index 4ccc2fe4b0..18338894b4 100644
--- a/examples/vmdq_dcb/main.c
+++ b/examples/vmdq_dcb/main.c
@@ -133,23 +133,23 @@ static struct rte_ether_addr vmdq_ports_eth_addr[RTE_MAX_ETHPORTS];
 static inline int
 get_eth_conf(struct rte_eth_conf *eth_conf)
 {
-	struct rte_eth_vmdq_dcb_conf conf;
-	struct rte_eth_vmdq_rx_conf  vmdq_conf;
-	struct rte_eth_dcb_rx_conf   dcb_conf;
-	struct rte_eth_vmdq_dcb_tx_conf tx_conf;
+	struct rte_eth_vmdq_dcb_conf conf = {
+		.nb_queue_pools = (enum rte_eth_nb_pools)num_pools,
+		.nb_pool_maps = num_pools,
+	};
+	struct rte_eth_vmdq_rx_conf vmdq_conf = {
+		.nb_queue_pools = (enum rte_eth_nb_pools)num_pools,
+		.nb_pool_maps = num_pools,
+	};
+	struct rte_eth_dcb_rx_conf dcb_conf = {
+		.nb_tcs = (enum rte_eth_nb_tcs)num_tcs,
+	};
+	struct rte_eth_vmdq_dcb_tx_conf tx_conf = {
+		.nb_queue_pools = (enum rte_eth_nb_pools)num_pools,
+	};
 	uint8_t i;
 
-	conf.nb_queue_pools = (enum rte_eth_nb_pools)num_pools;
-	vmdq_conf.nb_queue_pools = (enum rte_eth_nb_pools)num_pools;
-	tx_conf.nb_queue_pools = (enum rte_eth_nb_pools)num_pools;
-	conf.nb_pool_maps = num_pools;
-	vmdq_conf.nb_pool_maps = num_pools;
-	conf.enable_default_pool = 0;
-	vmdq_conf.enable_default_pool = 0;
-	conf.default_pool = 0; /* set explicit value, even if not used */
-	vmdq_conf.default_pool = 0;
-
-	for (i = 0; i < conf.nb_pool_maps; i++) {
+	for (i = 0; i < num_pools; i++) {
 		conf.pool_map[i].vlan_id = vlan_tags[i];
 		vmdq_conf.pool_map[i].vlan_id = vlan_tags[i];
 		conf.pool_map[i].pools = 1UL << i;
@@ -160,7 +160,6 @@ get_eth_conf(struct rte_eth_conf *eth_conf)
 		dcb_conf.dcb_tc[i] = i % num_tcs;
 		tx_conf.dcb_tc[i] = i % num_tcs;
 	}
-	dcb_conf.nb_tcs = (enum rte_eth_nb_tcs)num_tcs;
 	(void)(rte_memcpy(eth_conf, &vmdq_dcb_conf_default, sizeof(*eth_conf)));
 	(void)(rte_memcpy(&eth_conf->rx_adv_conf.vmdq_dcb_conf, &conf,
 			  sizeof(conf)));
-- 
2.43.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-04-14 14:44:34.493667836 +0300
+++ 0060-examples-vmdq_dcb-initialize-all-configuration-struc.patch	2026-04-14 14:44:28.687475000 +0300
@@ -1 +1 @@
-From 5a9362386ef80d36c9972ba1717c4a82c9ea2cc6 Mon Sep 17 00:00:00 2001
+From f1018f4afbc416fd3834c681900edbdc5fffc274 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5a9362386ef80d36c9972ba1717c4a82c9ea2cc6 ]
+
@@ -15 +16,0 @@
-Cc: stable at dpdk.org
@@ -24 +25 @@
-index 6eccee086d..d6f7b632b9 100644
+index 4ccc2fe4b0..18338894b4 100644
@@ -27 +28 @@
-@@ -132,23 +132,23 @@ static struct rte_ether_addr vmdq_ports_eth_addr[RTE_MAX_ETHPORTS];
+@@ -133,23 +133,23 @@ static struct rte_ether_addr vmdq_ports_eth_addr[RTE_MAX_ETHPORTS];
@@ -66 +67 @@
-@@ -159,7 +159,6 @@ get_eth_conf(struct rte_eth_conf *eth_conf)
+@@ -160,7 +160,6 @@ get_eth_conf(struct rte_eth_conf *eth_conf)
@@ -71,3 +72,3 @@
- 
- 	*eth_conf = vmdq_dcb_conf_default;
- 	eth_conf->rx_adv_conf.vmdq_dcb_conf = conf;
+ 	(void)(rte_memcpy(eth_conf, &vmdq_dcb_conf_default, sizeof(*eth_conf)));
+ 	(void)(rte_memcpy(&eth_conf->rx_adv_conf.vmdq_dcb_conf, &conf,
+ 			  sizeof(conf)));


More information about the stable mailing list