[dpdk-stable] patch 'net/netvsc: fix transmit descriptor pool cleanup' has been queued to LTS release 18.11.1

Kevin Traynor ktraynor at redhat.com
Fri Jan 4 14:24:28 CET 2019


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 <stephen at networkplumber.org>
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 <sthemmin at microsoft.com>
---
 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 <stephen at networkplumber.org>
 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 at dpdk.org
 
 Signed-off-by: Stephen Hemminger <sthemmin at microsoft.com>
 ---
@@ -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);


More information about the stable mailing list