patch 'bus: cleanup device lists' has been queued to stable release 22.11.9

luca.boccassi at gmail.com luca.boccassi at gmail.com
Thu Jun 12 23:07:19 CEST 2025


Hi,

FYI, your patch has been queued to stable release 22.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 06/14/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/a025a6346bc564be08c5314cbd63242156af512c

Thanks.

Luca Boccassi

---
>From a025a6346bc564be08c5314cbd63242156af512c Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen at huawei.com>
Date: Thu, 20 Feb 2025 16:09:06 +0800
Subject: [PATCH] bus: cleanup device lists
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 398bb775edc5434ad94578a5e6c49fa1328acc0f ]

Although eal_bus_cleanup() is not invoked for multiple times, this is a
good programming habit to remove the device object from list when
cleanup bus.

Fixes: 1cab1a40ea9b ("bus: cleanup devices on shutdown")
Fixes: 62b906cf06ba ("bus/uacce: introduce UACCE bus")
Fixes: 65780eada9d9 ("bus/vmbus: support cleanup")

Signed-off-by: Chengwen Feng <fengchengwen at huawei.com>
Acked-by: Morten Brørup <mb at smartsharesystems.com>
---
 drivers/bus/pci/pci_common.c | 1 +
 drivers/bus/vdev/vdev.c      | 1 +
 2 files changed, 2 insertions(+)

diff --git a/drivers/bus/pci/pci_common.c b/drivers/bus/pci/pci_common.c
index 465f9258af..4c1c09843c 100644
--- a/drivers/bus/pci/pci_common.c
+++ b/drivers/bus/pci/pci_common.c
@@ -455,6 +455,7 @@ free:
 		rte_intr_instance_free(dev->vfio_req_intr_handle);
 		dev->vfio_req_intr_handle = NULL;
 
+		TAILQ_REMOVE(&rte_pci_bus.device_list, dev, next);
 		pci_free(dev);
 	}
 
diff --git a/drivers/bus/vdev/vdev.c b/drivers/bus/vdev/vdev.c
index ec7abe7cda..ae79cfd049 100644
--- a/drivers/bus/vdev/vdev.c
+++ b/drivers/bus/vdev/vdev.c
@@ -596,6 +596,7 @@ vdev_cleanup(void)
 
 		dev->device.driver = NULL;
 free:
+		TAILQ_REMOVE(&vdev_device_list, dev, next);
 		free(dev);
 	}
 
-- 
2.47.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-06-12 22:06:26.121495826 +0100
+++ 0062-bus-cleanup-device-lists.patch	2025-06-12 22:06:23.890045060 +0100
@@ -1 +1 @@
-From 398bb775edc5434ad94578a5e6c49fa1328acc0f Mon Sep 17 00:00:00 2001
+From a025a6346bc564be08c5314cbd63242156af512c Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 398bb775edc5434ad94578a5e6c49fa1328acc0f ]
+
@@ -16 +17,0 @@
-Cc: stable at dpdk.org
@@ -21,5 +22,3 @@
- drivers/bus/pci/pci_common.c     | 1 +
- drivers/bus/uacce/uacce.c        | 1 +
- drivers/bus/vdev/vdev.c          | 1 +
- drivers/bus/vmbus/vmbus_common.c | 1 +
- 4 files changed, 4 insertions(+)
+ drivers/bus/pci/pci_common.c | 1 +
+ drivers/bus/vdev/vdev.c      | 1 +
+ 2 files changed, 2 insertions(+)
@@ -28 +27 @@
-index 5df4086f31..c88634f790 100644
+index 465f9258af..4c1c09843c 100644
@@ -31 +30 @@
-@@ -451,6 +451,7 @@ free:
+@@ -455,6 +455,7 @@ free:
@@ -36 +35 @@
- 		pci_free(RTE_PCI_DEVICE_INTERNAL(dev));
+ 		pci_free(dev);
@@ -39,12 +37,0 @@
-diff --git a/drivers/bus/uacce/uacce.c b/drivers/bus/uacce/uacce.c
-index 9b8ac23952..f5343ed87a 100644
---- a/drivers/bus/uacce/uacce.c
-+++ b/drivers/bus/uacce/uacce.c
-@@ -455,6 +455,7 @@ uacce_cleanup(void)
- 		dev->device.driver = NULL;
- 
- free:
-+		TAILQ_REMOVE(&uacce_bus.device_list, dev, next);
- 		memset(dev, 0, sizeof(*dev));
- 		free(dev);
- 	}
@@ -52 +39 @@
-index beee8c4033..be375f63dc 100644
+index ec7abe7cda..ae79cfd049 100644
@@ -55 +42 @@
-@@ -603,6 +603,7 @@ vdev_cleanup(void)
+@@ -596,6 +596,7 @@ vdev_cleanup(void)
@@ -60,12 +46,0 @@
- 		free(dev);
- 	}
- 
-diff --git a/drivers/bus/vmbus/vmbus_common.c b/drivers/bus/vmbus/vmbus_common.c
-index ac04ee11f8..a787d8b18d 100644
---- a/drivers/bus/vmbus/vmbus_common.c
-+++ b/drivers/bus/vmbus/vmbus_common.c
-@@ -240,6 +240,7 @@ rte_vmbus_cleanup(void)
- 
- 		dev->driver = NULL;
- 		dev->device.driver = NULL;
-+		TAILQ_REMOVE(&rte_vmbus_bus.device_list, dev, next);


More information about the stable mailing list