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

Xueming Li xuemingl at nvidia.com
Sun Oct 22 16:21:38 CEST 2023


Hi,

FYI, your patch has been queued to stable release 22.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 11/15/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://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

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

Thanks.

Xueming Li <xuemingl at nvidia.com>

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

[ 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 a6f4a31e0e..b2f4b332f4 100644
--- a/drivers/dma/cnxk/cnxk_dmadev.c
+++ b/drivers/dma/cnxk/cnxk_dmadev.c
@@ -628,8 +628,7 @@ 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;
 	char name[RTE_DEV_NAME_MAX_LEN];
@@ -648,8 +647,7 @@ cnxk_dmadev_probe(struct rte_pci_driver *pci_drv __rte_unused,
 	memset(name, 0, sizeof(name));
 	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);
 		return -ENOMEM;
@@ -682,6 +680,8 @@ cnxk_dmadev_probe(struct rte_pci_driver *pci_drv __rte_unused,
 	if (rc < 0)
 		goto err_out_free;

+	dmadev->state = RTE_DMA_DEV_READY;
+
 	return 0;

 err_out_free:
--
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-10-22 22:17:36.922712100 +0800
+++ 0069-dma-cnxk-fix-device-state.patch	2023-10-22 22:17:34.296723700 +0800
@@ -1 +1 @@
-From 190b2239b801d84179e5f57a1dda7ed19539281c Mon Sep 17 00:00:00 2001
+From 915fbdb68199c5f6df9aec08de7296a0ca2bbcc6 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 190b2239b801d84179e5f57a1dda7ed19539281c ]
@@ -13 +15,0 @@
-Cc: stable at dpdk.org
@@ -21 +23 @@
-index f06c979b9c..d8bd61a048 100644
+index a6f4a31e0e..b2f4b332f4 100644
@@ -24 +26 @@
-@@ -668,8 +668,7 @@ static const struct rte_dma_dev_ops cnxk_dmadev_ops = {
+@@ -628,8 +628,7 @@ static const struct rte_dma_dev_ops cnxk_dmadev_ops = {
@@ -34 +36 @@
-@@ -688,8 +687,7 @@ cnxk_dmadev_probe(struct rte_pci_driver *pci_drv __rte_unused,
+@@ -648,8 +647,7 @@ cnxk_dmadev_probe(struct rte_pci_driver *pci_drv __rte_unused,
@@ -44 +46 @@
-@@ -723,6 +721,8 @@ cnxk_dmadev_probe(struct rte_pci_driver *pci_drv __rte_unused,
+@@ -682,6 +680,8 @@ cnxk_dmadev_probe(struct rte_pci_driver *pci_drv __rte_unused,


More information about the stable mailing list