net/ice: fix memzone reserve and release in flow director
authorShougang Wang <shougangx.wang@intel.com>
Wed, 13 Nov 2019 01:37:55 +0000 (01:37 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 20 Nov 2019 16:36:05 +0000 (17:36 +0100)
commitb8e609e8e266b497503231d8fc9b0d9c609db272
tree8bf1152cb74c3134e7c7d1815296eea89f53e30a
parent9ffb871222a802b6ca0b59181e655308ef902d12
net/ice: fix memzone reserve and release in flow director

To avoid memzone reserve failure and memory leak, following
resources management should be added.
- Check if the FDIR Memzone already exists before reserving.
- Free FDIR memzone when teardown and other failure scenarios.

Fixes: 84dc7a95a2d3 ("net/ice: enable flow director engine")

Signed-off-by: Shougang Wang <shougangx.wang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
drivers/net/ice/ice_ethdev.h
drivers/net/ice/ice_fdir_filter.c