patch 'bus/pci: fix registered device name' has been queued to stable release 24.11.2
Kevin Traynor
ktraynor at redhat.com
Fri Mar 7 13:46:48 CET 2025
Hi,
FYI, your patch has been queued to stable release 24.11.2
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/12/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/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/4ee60b5f8f6608831dc12df2ad38682bb235977a
Thanks.
Kevin
---
>From 4ee60b5f8f6608831dc12df2ad38682bb235977a 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 1173f0887c..70faae4e44 100644
--- a/drivers/bus/pci/pci_common.c
+++ b/drivers/bus/pci/pci_common.c
@@ -100,19 +100,9 @@ pci_common_set(struct rte_pci_device *dev)
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,
--
2.48.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-03-07 11:02:57.460894929 +0000
+++ 0015-bus-pci-fix-registered-device-name.patch 2025-03-07 11:02:56.854705857 +0000
@@ -1 +1 @@
-From bd786765996fc2654770049043021ea618fc23f0 Mon Sep 17 00:00:00 2001
+From 4ee60b5f8f6608831dc12df2ad38682bb235977a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit bd786765996fc2654770049043021ea618fc23f0 ]
+
@@ -15 +16,0 @@
-Cc: stable at dpdk.org
More information about the stable
mailing list