net/qede: fix DMA memory leak
authorHarish Patil <harish.patil@cavium.com>
Sat, 1 Jul 2017 19:29:55 +0000 (12:29 -0700)
committerFerruh Yigit <ferruh.yigit@intel.com>
Thu, 6 Jul 2017 13:00:57 +0000 (15:00 +0200)
commita39001d90dbd212e178619276183dc02b936c70c
tree98a86d43e158b55337b34c9f478b6c724466b00a
parentdce8a093de6b70219287be3e4ed59628d19770fe
net/qede: fix DMA memory leak

Implement the macro OSAL_DMA_FREE_COHERENT to release DMA memories.
Track all DMA memory allocations using an array of memzone pointers and
use that to free memory resources along with other resource deallocation.
With this change there is no need to alter the base code to additionally
pass an unique string needed for memzone creation.

Fixes: ec94dbc57362 ("qede: add base driver")
Cc: stable@dpdk.org
Signed-off-by: Harish Patil <harish.patil@cavium.com>
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
drivers/net/qede/base/bcm_osal.c
drivers/net/qede/base/bcm_osal.h
drivers/net/qede/qede_ethdev.c
drivers/net/qede/qede_rxtx.c