From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5085A4326F for ; Thu, 2 Nov 2023 14:14:17 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BB18942DF7; Thu, 2 Nov 2023 14:14:16 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 2361942DF5 for ; Thu, 2 Nov 2023 14:14:15 +0100 (CET) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-15-XwbjsN_COHi2eAG9hrZmsQ-1; Thu, 02 Nov 2023 09:14:13 -0400 X-MC-Unique: XwbjsN_COHi2eAG9hrZmsQ-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id ECA64185A783; Thu, 2 Nov 2023 13:14:12 +0000 (UTC) Received: from rh.redhat.com (unknown [10.39.192.45]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3A024492BFA; Thu, 2 Nov 2023 13:14:12 +0000 (UTC) From: Kevin Traynor To: Amit Prakash Shukla Cc: dpdk stable Subject: patch 'dma/cnxk: fix device state' has been queued to stable release 21.11.6 Date: Thu, 2 Nov 2023 13:11:53 +0000 Message-ID: <20231102131254.315947-47-ktraynor@redhat.com> In-Reply-To: <20231102131254.315947-1-ktraynor@redhat.com> References: <20231102131254.315947-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.10 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org 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 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 --- 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@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,