net/netvsc: fix ring freeing
authorStephen Hemminger <sthemmin@microsoft.com>
Wed, 1 Aug 2018 23:18:33 +0000 (16:18 -0700)
committerThomas Monjalon <thomas@monjalon.net>
Sun, 5 Aug 2018 00:28:12 +0000 (02:28 +0200)
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

index 6d2f41c..400598a 100644 (file)
@@ -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;