patches for DPDK stable branches
 help / color / mirror / Atom feed
* [PATCH v1] raw/ifpga: fix ifpga devices cleanup function
@ 2022-01-26  3:29 Wei Huang
  2022-01-26  6:57 ` Zhang, Tianfei
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Wei Huang @ 2022-01-26  3:29 UTC (permalink / raw)
  To: dev, rosen.xu, qi.z.zhang; +Cc: stable, tianfei.zhang, ferruh.yigit, Wei Huang

Use rte_dev_remove() to replace rte_rawdev_pmd_release()
in ifpga_rawdev_cleanup(), resources occupied by ifpga
raw devices such as threads can be released correctly.

Fixes: f724a802 ("raw/ifpga: add miscellaneous APIs")

Signed-off-by: Wei Huang <wei.huang@intel.com>
---
 drivers/raw/ifpga/ifpga_rawdev.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/raw/ifpga/ifpga_rawdev.c b/drivers/raw/ifpga/ifpga_rawdev.c
index fdf3c23..88c38aa 100644
--- a/drivers/raw/ifpga/ifpga_rawdev.c
+++ b/drivers/raw/ifpga/ifpga_rawdev.c
@@ -1787,12 +1787,14 @@ int ifpga_rawdev_partial_reconfigure(struct rte_rawdev *dev, int port,
 void ifpga_rawdev_cleanup(void)
 {
 	struct ifpga_rawdev *dev;
+	struct rte_rawdev *rdev;
 	unsigned int i;
 
 	for (i = 0; i < IFPGA_RAWDEV_NUM; i++) {
 		dev = &ifpga_rawdevices[i];
 		if (dev->rawdev) {
-			rte_rawdev_pmd_release(dev->rawdev);
+			rdev = dev->rawdev;
+			rte_dev_remove(rdev->device);
 			dev->rawdev = NULL;
 		}
 	}
-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-01-28  6:44 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-26  3:29 [PATCH v1] raw/ifpga: fix ifpga devices cleanup function Wei Huang
2022-01-26  6:57 ` Zhang, Tianfei
2022-01-26  7:07 ` Xu, Rosen
2022-01-26  9:46   ` Zhang, Qi Z
2022-01-26 13:25 ` Ferruh Yigit
2022-01-27  8:57   ` Huang, Wei
2022-01-27 12:33     ` Ferruh Yigit
2022-01-28  6:44       ` Huang, Wei

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).