patch 'vdpa/ifc: fix argument parsing' has been queued to stable release 25.11.5

Kevin Traynor ktraynor at redhat.com
Thu Dec 3 14:02:45 CET 2026


Hi,

FYI, your patch has been queued to stable release 25.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 12/08/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/kevintraynor/dpdk-stable

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

Thanks.

Kevin

---
>From c42f99c928e98ba9dea8616e3fccc86b3247fbd7 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson at intel.com>
Date: Fri, 18 Sep 2026 17:51:33 +0100
Subject: [PATCH] vdpa/ifc: fix argument parsing

[ upstream commit 4b27143b1417c13de65f0a948c75d82b34cf9e47 ]

The argument parsing in ifcvf was storing only 2 bytes to a 4-byte
integer value, leaving the int possibly with garbage in the top two
bytes. However, despite being an int, the value was actually used as a
boolean both times something was passed. Therefore, fix the bug by using
bool values and change the arg parsing function to match that.

Bugzilla ID: 2040
Fixes: 40ef35f4a504 ("net/ifc: detect if VDPA mode is specified")

Signed-off-by: Bruce Richardson <bruce.richardson at intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin at redhat.com>
---
 drivers/vdpa/ifc/ifcvf_vdpa.c | 23 ++++++++++++-----------
 1 file changed, 12 insertions(+), 11 deletions(-)

diff --git a/drivers/vdpa/ifc/ifcvf_vdpa.c b/drivers/vdpa/ifc/ifcvf_vdpa.c
index f319d455ba..eed6f969d4 100644
--- a/drivers/vdpa/ifc/ifcvf_vdpa.c
+++ b/drivers/vdpa/ifc/ifcvf_vdpa.c
@@ -1481,16 +1481,17 @@ static struct rte_vdpa_dev_ops ifcvf_net_ops = {
 };
 
-static inline int
-open_int(const char *key __rte_unused, const char *value, void *extra_args)
+static int
+parse_bool(const char *key __rte_unused, const char *value, void *extra_args)
 {
-	uint16_t *n = extra_args;
+	char *endp = NULL;
 
-	if (value == NULL || extra_args == NULL)
+	if (value == NULL || extra_args == NULL || value[0] == '\0')
 		return -EINVAL;
 
-	*n = (uint16_t)strtoul(value, NULL, 0);
-	if (*n == USHRT_MAX && errno == ERANGE)
+	unsigned long n = strtoul(value, &endp, 0);
+	if (*endp != '\0' || n > 1)
 		return -1;
 
+	*(bool *)extra_args = (n == 1);
 	return 0;
 }
@@ -1636,6 +1637,6 @@ ifcvf_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
 	struct ifcvf_internal *internal = NULL;
 	struct internal_list *list = NULL;
-	int vdpa_mode = 0;
-	int sw_fallback_lm = 0;
+	bool vdpa_mode = false;
+	bool sw_fallback_lm = false;
 	struct rte_kvargs *kvlist = NULL;
 	int ret = 0;
@@ -1663,7 +1664,7 @@ ifcvf_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
 	}
 
-	ret = rte_kvargs_process(kvlist, IFCVF_VDPA_MODE, &open_int,
+	ret = rte_kvargs_process(kvlist, IFCVF_VDPA_MODE, &parse_bool,
 			&vdpa_mode);
-	if (ret < 0 || vdpa_mode == 0) {
+	if (ret < 0 || !vdpa_mode) {
 		rte_kvargs_free(kvlist);
 		return 1;
@@ -1758,5 +1759,5 @@ ifcvf_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
 	if (rte_kvargs_count(kvlist, IFCVF_SW_FALLBACK_LM)) {
 		ret = rte_kvargs_process(kvlist, IFCVF_SW_FALLBACK_LM,
-				&open_int, &sw_fallback_lm);
+				&parse_bool, &sw_fallback_lm);
 		if (ret < 0)
 			goto error;
-- 
2.56.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-12-03 12:52:46.025529461 +0000
+++ 0239-vdpa-ifc-fix-argument-parsing.patch	2026-12-03 12:52:39.197089668 +0000
@@ -1 +1 @@
-From 4b27143b1417c13de65f0a948c75d82b34cf9e47 Mon Sep 17 00:00:00 2001
+From c42f99c928e98ba9dea8616e3fccc86b3247fbd7 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4b27143b1417c13de65f0a948c75d82b34cf9e47 ]
+
@@ -14 +15,0 @@
-Cc: stable at dpdk.org
@@ -23 +24 @@
-index 5ecaf9878d..508174ad39 100644
+index f319d455ba..eed6f969d4 100644
@@ -26 +27 @@
-@@ -1455,16 +1455,17 @@ static struct rte_vdpa_dev_ops ifcvf_net_ops = {
+@@ -1481,16 +1481,17 @@ static struct rte_vdpa_dev_ops ifcvf_net_ops = {
@@ -50 +51 @@
-@@ -1609,6 +1610,6 @@ ifcvf_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
+@@ -1636,6 +1637,6 @@ ifcvf_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
@@ -59 +60 @@
-@@ -1636,7 +1637,7 @@ ifcvf_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
+@@ -1663,7 +1664,7 @@ ifcvf_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
@@ -69 +70 @@
-@@ -1731,5 +1732,5 @@ ifcvf_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
+@@ -1758,5 +1759,5 @@ ifcvf_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,



More information about the stable mailing list