patch 'dma/cnxk: fix device state' has been queued to stable release 21.11.6

Kevin Traynor ktraynor at redhat.com
Thu Nov 2 14:11:53 CET 2023


Hi,

FYI, your patch has been queued to stable release 21.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/08/23. 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/f2a2d57884c625c0a86223d6a2f4b722ff70d19b

Thanks.

Kevin

---
>From f2a2d57884c625c0a86223d6a2f4b722ff70d19b Mon Sep 17 00:00:00 2001
From: Amit Prakash Shukla <amitprakashs at marvell.com>
Date: Wed, 23 Aug 2023 16:45:16 +0530
Subject: [PATCH] dma/cnxk: fix device state

[ upstream commit 190b2239b801d84179e5f57a1dda7ed19539281c ]

When a device is not set to a ready state, on exiting the application
proper cleanup is not done. This causes the application to fail on
trying to run next time.

Setting the device to ready state on successful probe fixes the issue.

Fixes: 53f6d7328bf4 ("dma/cnxk: create and initialize device on PCI probing")

Signed-off-by: Amit Prakash Shukla <amitprakashs at marvell.com>
---
 drivers/dma/cnxk/cnxk_dmadev.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/dma/cnxk/cnxk_dmadev.c b/drivers/dma/cnxk/cnxk_dmadev.c
index 2824c1b44f..e923b2cea3 100644
--- a/drivers/dma/cnxk/cnxk_dmadev.c
+++ b/drivers/dma/cnxk/cnxk_dmadev.c
@@ -448,6 +448,5 @@ static const struct rte_dma_dev_ops cnxk_dmadev_ops = {
 
 static int
-cnxk_dmadev_probe(struct rte_pci_driver *pci_drv __rte_unused,
-		  struct rte_pci_device *pci_dev)
+cnxk_dmadev_probe(struct rte_pci_driver *pci_drv __rte_unused, struct rte_pci_device *pci_dev)
 {
 	struct cnxk_dpi_vf_s *dpivf = NULL;
@@ -468,6 +467,5 @@ cnxk_dmadev_probe(struct rte_pci_driver *pci_drv __rte_unused,
 	rte_pci_device_name(&pci_dev->addr, name, sizeof(name));
 
-	dmadev = rte_dma_pmd_allocate(name, pci_dev->device.numa_node,
-				      sizeof(*dpivf));
+	dmadev = rte_dma_pmd_allocate(name, pci_dev->device.numa_node, sizeof(*dpivf));
 	if (dmadev == NULL) {
 		plt_err("dma device allocation failed for %s", name);
@@ -494,4 +492,6 @@ cnxk_dmadev_probe(struct rte_pci_driver *pci_drv __rte_unused,
 		goto err_out_free;
 
+	dmadev->state = RTE_DMA_DEV_READY;
+
 	return 0;
 
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-11-02 13:09:41.986626484 +0000
+++ 0047-dma-cnxk-fix-device-state.patch	2023-11-02 13:09:40.847163445 +0000
@@ -1 +1 @@
-From 190b2239b801d84179e5f57a1dda7ed19539281c Mon Sep 17 00:00:00 2001
+From f2a2d57884c625c0a86223d6a2f4b722ff70d19b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 190b2239b801d84179e5f57a1dda7ed19539281c ]
+
@@ -13 +14,0 @@
-Cc: stable at dpdk.org
@@ -21 +22 @@
-index f06c979b9c..d8bd61a048 100644
+index 2824c1b44f..e923b2cea3 100644
@@ -24 +25 @@
-@@ -669,6 +669,5 @@ static const struct rte_dma_dev_ops cnxk_dmadev_ops = {
+@@ -448,6 +448,5 @@ static const struct rte_dma_dev_ops cnxk_dmadev_ops = {
@@ -32 +33 @@
-@@ -689,6 +688,5 @@ cnxk_dmadev_probe(struct rte_pci_driver *pci_drv __rte_unused,
+@@ -468,6 +467,5 @@ cnxk_dmadev_probe(struct rte_pci_driver *pci_drv __rte_unused,
@@ -40 +41 @@
-@@ -724,4 +722,6 @@ cnxk_dmadev_probe(struct rte_pci_driver *pci_drv __rte_unused,
+@@ -494,4 +492,6 @@ cnxk_dmadev_probe(struct rte_pci_driver *pci_drv __rte_unused,



More information about the stable mailing list