netvsc: free ring with rte_ring_free

Message ID 20180801231833.5846-1-stephen@networkplumber.org
State Accepted, archived
Headers show
Series
  • netvsc: free ring with rte_ring_free
Related show

Checks

Context Check Description
ci/Intel-compilation success Compilation OK
ci/checkpatch success coding style OK

Commit Message

Stephen Hemminger Aug. 1, 2018, 11:18 p.m.
The internal receive ring should be freed with rte_ring_free
not rte_free.

Fixes: 4e9c73e96e83 ("net/netvsc: add Hyper-V network device")
Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
---
 drivers/net/netvsc/hn_rxtx.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Thomas Monjalon Aug. 4, 2018, 11:53 p.m. | #1
02/08/2018 01:18, Stephen Hemminger:
> The internal receive ring should be freed with rte_ring_free
> not rte_free.
> 
> Fixes: 4e9c73e96e83 ("net/netvsc: add Hyper-V network device")
> Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>

Applied, thanks

Patch

diff --git a/drivers/net/netvsc/hn_rxtx.c b/drivers/net/netvsc/hn_rxtx.c
index 6d2f41c4c011..400598a621f1 100644
--- a/drivers/net/netvsc/hn_rxtx.c
+++ b/drivers/net/netvsc/hn_rxtx.c
@@ -774,7 +774,7 @@  hn_dev_rx_queue_setup(struct rte_eth_dev *dev,
 	return 0;
 
 fail:
-	rte_free(rxq->rx_ring);
+	rte_ring_free(rxq->rx_ring);
 	rte_free(rxq->event_buf);
 	rte_free(rxq);
 	return -ENOMEM;
@@ -790,7 +790,7 @@  hn_dev_rx_queue_release(void *arg)
 	if (!rxq)
 		return;
 
-	rte_free(rxq->rx_ring);
+	rte_ring_free(rxq->rx_ring);
 	rxq->rx_ring = NULL;
 	rxq->mb_pool = NULL;