From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id E73D61B3B5 for ; Thu, 7 Feb 2019 14:27:38 +0100 (CET) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 09E24BC6A9; Thu, 7 Feb 2019 13:27:38 +0000 (UTC) Received: from ktraynor.remote.csb (unknown [10.33.36.135]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1E8A1690E2; Thu, 7 Feb 2019 13:27:36 +0000 (UTC) From: Kevin Traynor To: Reshma Pattan Cc: Ferruh Yigit , dpdk stable Date: Thu, 7 Feb 2019 13:25:25 +0000 Message-Id: <20190207132614.20538-19-ktraynor@redhat.com> In-Reply-To: <20190207132614.20538-1-ktraynor@redhat.com> References: <20190207132614.20538-1-ktraynor@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Thu, 07 Feb 2019 13:27:38 +0000 (UTC) Subject: [dpdk-stable] patch 'app/pdump: fix vdev cleanup' has been queued to LTS release 18.11.1 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Feb 2019 13:27:39 -0000 Hi, FYI, your patch has been queued to LTS release 18.11.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 02/14/19. 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. Thanks. Kevin Traynor --- >>From b438d916cf8480f692f1ec3337f034d35c814fd4 Mon Sep 17 00:00:00 2001 From: Reshma Pattan Date: Tue, 15 Jan 2019 13:45:04 +0000 Subject: [PATCH] app/pdump: fix vdev cleanup [ upstream commit 35cb223ab7be6791fa68698c05b94b843b8a5fda ] Virtual devices added in pdump application using rte_eal_hotplug_add should be removed explicitly while exiting the pdump application, otherwise the subsequent run of the pdump application will fail with the reason that virtual devices with the same name already exists in primary. Fixes: 6362f362a2 ("app/pdump: use EAL hotplug instead of ethdev attach") Signed-off-by: Reshma Pattan Tested-by: Ferruh Yigit --- app/pdump/main.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/app/pdump/main.c b/app/pdump/main.c index 9e86bf623..5e183ea90 100644 --- a/app/pdump/main.c +++ b/app/pdump/main.c @@ -495,4 +495,5 @@ cleanup_pdump_resources(void) int i; struct pdump_tuples *pt; + char name[RTE_ETH_NAME_MAX_LEN]; /* disable pdump and free the pdump_tuple resources */ @@ -511,4 +512,12 @@ cleanup_pdump_resources(void) if (pt->dir & RTE_PDUMP_FLAG_TX) free_ring_data(pt->tx_ring, pt->tx_vdev_id, &pt->stats); + + /* Remove the vdev created */ + rte_eth_dev_get_name_by_port(pt->rx_vdev_id, name); + rte_eal_hotplug_remove("vdev", name); + + rte_eth_dev_get_name_by_port(pt->tx_vdev_id, name); + rte_eal_hotplug_remove("vdev", name); + } cleanup_rings(); -- 2.19.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2019-02-07 13:19:55.966737269 +0000 +++ 0019-app-pdump-fix-vdev-cleanup.patch 2019-02-07 13:19:55.000000000 +0000 @@ -1,8 +1,10 @@ -From 35cb223ab7be6791fa68698c05b94b843b8a5fda Mon Sep 17 00:00:00 2001 +From b438d916cf8480f692f1ec3337f034d35c814fd4 Mon Sep 17 00:00:00 2001 From: Reshma Pattan Date: Tue, 15 Jan 2019 13:45:04 +0000 Subject: [PATCH] app/pdump: fix vdev cleanup +[ upstream commit 35cb223ab7be6791fa68698c05b94b843b8a5fda ] + Virtual devices added in pdump application using rte_eal_hotplug_add should be removed explicitly while exiting the pdump application, otherwise the @@ -10,7 +12,6 @@ that virtual devices with the same name already exists in primary. Fixes: 6362f362a2 ("app/pdump: use EAL hotplug instead of ethdev attach") -Cc: stable@dpdk.org Signed-off-by: Reshma Pattan Tested-by: Ferruh Yigit