patch 'bus/pci: fix registered device name' has been queued to stable release 22.11.8
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Fri Mar 7 13:24:07 CET 2025
Hi,
FYI, your patch has been queued to stable release 22.11.8
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/09/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://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/a3aa0ac7d655d79f4bf88c66bec8415b43a0988c
Thanks.
Luca Boccassi
---
>From a3aa0ac7d655d79f4bf88c66bec8415b43a0988c Mon Sep 17 00:00:00 2001
From: Shani Peretz <shperetz at nvidia.com>
Date: Wed, 12 Feb 2025 18:38:32 +0200
Subject: [PATCH] bus/pci: fix registered device name
[ upstream commit bd786765996fc2654770049043021ea618fc23f0 ]
When registering a new PCI device, the device->name field stored
the user-provided string from devargs (e.g., "08:00.0" or "0000:08:00.0").
This approach led to inconsistencies when registering new devices.
This patch fix this issue by saving the parsed PCI in device->name,
so when a new PCI device is registering the name displayed in the device
list will be the parsed version.
Fixes: 23eaa9059ec2 ("bus/pci: use given name as generic name")
Signed-off-by: Shani Peretz <shperetz at nvidia.com>
Acked-by: Stephen Hemminger <stephen at networkplumber.org>
---
drivers/bus/pci/pci_common.c | 14 ++------------
1 file changed, 2 insertions(+), 12 deletions(-)
diff --git a/drivers/bus/pci/pci_common.c b/drivers/bus/pci/pci_common.c
index 756e308fdf..465f9258af 100644
--- a/drivers/bus/pci/pci_common.c
+++ b/drivers/bus/pci/pci_common.c
@@ -99,21 +99,11 @@ pci_common_set(struct rte_pci_device *dev)
/* Each device has its internal, canonical name set. */
rte_pci_device_name(&dev->addr,
dev->name, sizeof(dev->name));
+ dev->device.name = dev->name;
+
devargs = pci_devargs_lookup(&dev->addr);
dev->device.devargs = devargs;
- /* When using a blocklist, only blocked devices will have
- * an rte_devargs. Allowed devices won't have one.
- */
- if (devargs != NULL)
- /* If an rte_devargs exists, the generic rte_device uses the
- * given name as its name.
- */
- dev->device.name = dev->device.devargs->name;
- else
- /* Otherwise, it uses the internal, canonical form. */
- dev->device.name = dev->name;
-
if (dev->bus_info != NULL ||
asprintf(&dev->bus_info, "vendor_id=%"PRIx16", device_id=%"PRIx16,
dev->id.vendor_id, dev->id.device_id) != -1)
--
2.47.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-03-07 12:23:38.329964549 +0000
+++ 0008-bus-pci-fix-registered-device-name.patch 2025-03-07 12:23:37.998838059 +0000
@@ -1 +1 @@
-From bd786765996fc2654770049043021ea618fc23f0 Mon Sep 17 00:00:00 2001
+From a3aa0ac7d655d79f4bf88c66bec8415b43a0988c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit bd786765996fc2654770049043021ea618fc23f0 ]
+
@@ -15 +16,0 @@
-Cc: stable at dpdk.org
@@ -24 +25 @@
-index 1173f0887c..70faae4e44 100644
+index 756e308fdf..465f9258af 100644
More information about the stable
mailing list