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 B6D121B494 for ; Fri, 4 Jan 2019 14:27:46 +0100 (CET) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 251005D676; Fri, 4 Jan 2019 13:27:46 +0000 (UTC) Received: from ktraynor.remote.csb (ovpn-117-13.ams2.redhat.com [10.36.117.13]) by smtp.corp.redhat.com (Postfix) with ESMTP id A5AD85C1A1; Fri, 4 Jan 2019 13:27:44 +0000 (UTC) From: Kevin Traynor To: Stephen Hemminger Cc: Stephen Hemminger , dpdk stable Date: Fri, 4 Jan 2019 13:24:28 +0000 Message-Id: <20190104132455.15170-46-ktraynor@redhat.com> In-Reply-To: <20190104132455.15170-1-ktraynor@redhat.com> References: <20190104132455.15170-1-ktraynor@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Fri, 04 Jan 2019 13:27:46 +0000 (UTC) Subject: [dpdk-stable] patch 'net/netvsc: fix transmit descriptor pool 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: Fri, 04 Jan 2019 13:27:47 -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 01/11/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 bec18d888958006b5b0ec2926c70545b54c9d857 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Thu, 13 Dec 2018 17:26:20 -0800 Subject: [PATCH] net/netvsc: fix transmit descriptor pool cleanup [ upstream commit c578d8507b4325747bbdb3993774e59fbad45d84 ] On device close or startup errors, the transmit descriptor pool was being left behind. Fixes: 4e9c73e96e83 ("net/netvsc: add Hyper-V network device") Signed-off-by: Stephen Hemminger --- drivers/net/netvsc/hn_ethdev.c | 2 ++ drivers/net/netvsc/hn_rxtx.c | 11 +++++++++++ drivers/net/netvsc/hn_var.h | 1 + 3 files changed, 14 insertions(+) diff --git a/drivers/net/netvsc/hn_ethdev.c b/drivers/net/netvsc/hn_ethdev.c index 1256fa399..8c7fc6719 100644 --- a/drivers/net/netvsc/hn_ethdev.c +++ b/drivers/net/netvsc/hn_ethdev.c @@ -800,4 +800,5 @@ failed: PMD_INIT_LOG(NOTICE, "device init failed"); + hn_tx_pool_uninit(eth_dev); hn_detach(hv); return err; @@ -822,4 +823,5 @@ eth_hn_dev_uninit(struct rte_eth_dev *eth_dev) hn_detach(hv); + hn_tx_pool_uninit(eth_dev); rte_vmbus_chan_close(hv->primary->chan); rte_free(hv->primary); diff --git a/drivers/net/netvsc/hn_rxtx.c b/drivers/net/netvsc/hn_rxtx.c index f4a36641b..487f76466 100644 --- a/drivers/net/netvsc/hn_rxtx.c +++ b/drivers/net/netvsc/hn_rxtx.c @@ -200,4 +200,15 @@ hn_tx_pool_init(struct rte_eth_dev *dev) } +void +hn_tx_pool_uninit(struct rte_eth_dev *dev) +{ + struct hn_data *hv = dev->data->dev_private; + + if (hv->tx_pool) { + rte_mempool_free(hv->tx_pool); + hv->tx_pool = NULL; + } +} + static void hn_reset_txagg(struct hn_tx_queue *txq) { diff --git a/drivers/net/netvsc/hn_var.h b/drivers/net/netvsc/hn_var.h index e1072c7cf..a6516c1e6 100644 --- a/drivers/net/netvsc/hn_var.h +++ b/drivers/net/netvsc/hn_var.h @@ -150,4 +150,5 @@ uint16_t hn_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, int hn_tx_pool_init(struct rte_eth_dev *dev); +void hn_tx_pool_uninit(struct rte_eth_dev *dev); int hn_dev_link_update(struct rte_eth_dev *dev, int wait); int hn_dev_tx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx, -- 2.19.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2019-01-04 13:23:08.567799537 +0000 +++ 0046-net-netvsc-fix-transmit-descriptor-pool-cleanup.patch 2019-01-04 13:23:07.000000000 +0000 @@ -1,13 +1,14 @@ -From c578d8507b4325747bbdb3993774e59fbad45d84 Mon Sep 17 00:00:00 2001 +From bec18d888958006b5b0ec2926c70545b54c9d857 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Thu, 13 Dec 2018 17:26:20 -0800 Subject: [PATCH] net/netvsc: fix transmit descriptor pool cleanup +[ upstream commit c578d8507b4325747bbdb3993774e59fbad45d84 ] + On device close or startup errors, the transmit descriptor pool was being left behind. Fixes: 4e9c73e96e83 ("net/netvsc: add Hyper-V network device") -Cc: stable@dpdk.org Signed-off-by: Stephen Hemminger --- @@ -17,23 +18,23 @@ 3 files changed, 14 insertions(+) diff --git a/drivers/net/netvsc/hn_ethdev.c b/drivers/net/netvsc/hn_ethdev.c -index 22561471a..6c40ac78d 100644 +index 1256fa399..8c7fc6719 100644 --- a/drivers/net/netvsc/hn_ethdev.c +++ b/drivers/net/netvsc/hn_ethdev.c -@@ -802,4 +802,5 @@ failed: +@@ -800,4 +800,5 @@ failed: PMD_INIT_LOG(NOTICE, "device init failed"); + hn_tx_pool_uninit(eth_dev); hn_detach(hv); return err; -@@ -824,4 +825,5 @@ eth_hn_dev_uninit(struct rte_eth_dev *eth_dev) +@@ -822,4 +823,5 @@ eth_hn_dev_uninit(struct rte_eth_dev *eth_dev) hn_detach(hv); + hn_tx_pool_uninit(eth_dev); rte_vmbus_chan_close(hv->primary->chan); rte_free(hv->primary); diff --git a/drivers/net/netvsc/hn_rxtx.c b/drivers/net/netvsc/hn_rxtx.c -index 622a83983..6197118b0 100644 +index f4a36641b..487f76466 100644 --- a/drivers/net/netvsc/hn_rxtx.c +++ b/drivers/net/netvsc/hn_rxtx.c @@ -200,4 +200,15 @@ hn_tx_pool_init(struct rte_eth_dev *dev) @@ -53,10 +54,10 @@ static void hn_reset_txagg(struct hn_tx_queue *txq) { diff --git a/drivers/net/netvsc/hn_var.h b/drivers/net/netvsc/hn_var.h -index cd173f6af..7f3266c45 100644 +index e1072c7cf..a6516c1e6 100644 --- a/drivers/net/netvsc/hn_var.h +++ b/drivers/net/netvsc/hn_var.h -@@ -151,4 +151,5 @@ uint16_t hn_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, +@@ -150,4 +150,5 @@ uint16_t hn_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, int hn_tx_pool_init(struct rte_eth_dev *dev); +void hn_tx_pool_uninit(struct rte_eth_dev *dev);