patch 'bus/pci: fix registered device name' has been queued to stable release 23.11.4

Xueming Li xuemingl at nvidia.com
Tue Apr 8 09:44:35 CEST 2025


Hi,

FYI, your patch has been queued to stable release 23.11.4

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/10/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=a1fa35eb4562849ef4d0d3633af234c8280d01f7

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From a1fa35eb4562849ef4d0d3633af234c8280d01f7 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
Cc: Xueming Li <xuemingl at nvidia.com>

[ 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 889a48d2af..1b3fe4783e 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.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-04-08 15:39:06.338255948 +0800
+++ 0010-bus-pci-fix-registered-device-name.patch	2025-04-08 15:39:05.886436594 +0800
@@ -1 +1 @@
-From bd786765996fc2654770049043021ea618fc23f0 Mon Sep 17 00:00:00 2001
+From a1fa35eb4562849ef4d0d3633af234c8280d01f7 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit bd786765996fc2654770049043021ea618fc23f0 ]
@@ -15 +17,0 @@
-Cc: stable at dpdk.org
@@ -24 +26 @@
-index 1173f0887c..70faae4e44 100644
+index 889a48d2af..1b3fe4783e 100644


More information about the stable mailing list