net/qede: fix memory alloc for multiple port reconfig
authorRasesh Mody <rasesh.mody@cavium.com>
Thu, 7 Jun 2018 16:30:20 +0000 (09:30 -0700)
committerFerruh Yigit <ferruh.yigit@intel.com>
Thu, 14 Jun 2018 17:27:50 +0000 (19:27 +0200)
commit7105b24f4bb89b23b8efeb516d5b69d85e18568f
tree06a77112f3afe23eb3be586e78509649938f9add
parentbed6cd4e33f972b89bb317b9ad8f699e7e6c8e7d
net/qede: fix memory alloc for multiple port reconfig

Multiple port reconfigurations can lead to memory allocation failures
due to hitting RTE memzone limit or no more room in config while
reserving memzone.

When freeing memzones, update the memzone mapping and the memzone count.
Release Rx and Tx queue rings allocated during queue setup.

Fixes: a39001d90dbd ("net/qede: fix DMA memory leak")
Cc: stable@dpdk.org
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
Reviewed-by: Kevin Traynor <ktraynor@redhat.com>
drivers/net/qede/base/bcm_osal.c
drivers/net/qede/qede_rxtx.c