patch 'vdpa/ifc: fix argument parsing' has been queued to stable release 24.11.9
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Thu Nov 5 17:41:38 CET 2026
Hi,
FYI, your patch has been queued to stable release 24.11.9
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/07/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/e3496d9eb4b9e32c33acf3a285ecfe7ccf6b68ef
Thanks.
Luca Boccassi
---
>From e3496d9eb4b9e32c33acf3a285ecfe7ccf6b68ef 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 65de383b958..c5a6c8120c3 100644
--- a/drivers/vdpa/ifc/ifcvf_vdpa.c
+++ b/drivers/vdpa/ifc/ifcvf_vdpa.c
@@ -1478,18 +1478,19 @@ static struct rte_vdpa_dev_ops ifcvf_net_ops = {
.get_dev_type = ifcvf_get_device_type,
};
-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;
}
@@ -1633,8 +1634,8 @@ ifcvf_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
uint64_t features;
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;
int16_t device_id;
@@ -1660,9 +1661,9 @@ ifcvf_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
return 1;
}
- 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;
}
@@ -1755,7 +1756,7 @@ 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.47.3
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2026-11-05 16:42:45.467881136 +0000
+++ 0011-vdpa-ifc-fix-argument-parsing.patch 2026-11-05 16:42:44.893059950 +0000
@@ -1 +1 @@
-From 4b27143b1417c13de65f0a948c75d82b34cf9e47 Mon Sep 17 00:00:00 2001
+From e3496d9eb4b9e32c33acf3a285ecfe7ccf6b68ef 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 65de383b958..c5a6c8120c3 100644
@@ -26 +27 @@
-@@ -1454,18 +1454,19 @@ static struct rte_vdpa_dev_ops ifcvf_net_ops = {
+@@ -1478,18 +1478,19 @@ static struct rte_vdpa_dev_ops ifcvf_net_ops = {
@@ -52 +53 @@
-@@ -1608,8 +1609,8 @@ ifcvf_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
+@@ -1633,8 +1634,8 @@ ifcvf_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
@@ -63 +64 @@
-@@ -1635,9 +1636,9 @@ ifcvf_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
+@@ -1660,9 +1661,9 @@ ifcvf_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
@@ -75 +76 @@
-@@ -1730,7 +1731,7 @@ ifcvf_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
+@@ -1755,7 +1756,7 @@ ifcvf_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
More information about the stable
mailing list