net/cxgbe: fix queue DMA ring leaks during port close
authorRahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Tue, 1 Sep 2020 17:16:25 +0000 (22:46 +0530)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 18 Sep 2020 16:55:12 +0000 (18:55 +0200)
commit6b78a629954c3857d4bc651a673fe102958a12db
treed438072bf94edd74f67686fe616da585c562f097
parent33f4e56dda2764eb62970a2c83f224fef43456c1
net/cxgbe: fix queue DMA ring leaks during port close

Free up the DMA memzones properly for all the port's queues during
port close. So, rework DMA ring allocation/free logic to use
rte_eth_dma_zone_reserve()/rte_eth_dma_zone_free() helper functions
for allocating/freeing the memzones.

The firmware event queue doesn't have an associated freelist queue.
So, remove check that tries to give memzone name for a non-existent
freelist queue.

Also, add a missing free for the control queue mempools.

Fixes: 0462d115441d ("cxgbe: add device related operations")
Cc: stable@dpdk.org
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
drivers/net/cxgbe/base/adapter.h
drivers/net/cxgbe/cxgbe_ethdev.c
drivers/net/cxgbe/sge.c