net/ice/base: add functions for resource counter
authorQi Zhang <qi.z.zhang@intel.com>
Mon, 25 Mar 2019 05:44:26 +0000 (13:44 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 29 Mar 2019 16:25:31 +0000 (17:25 +0100)
commitf1ffdec6cfe0cc083547086e2294efcc77438c95
tree27b91ab9b0adc333cddbca09678657ea94bca889
parentd781ccbdd15d422a65ed1794aa58a182ae870a54
net/ice/base: add functions for resource counter

1. ice_alloc_res_cntr - allocate resource counter
2. ice_free_res_cntr - free resource counter
3. ice_alloc_vlan_res_counter - allocate vlan resource counter
4. ice_free_vlan_res_counter - free vlan resource counter

These APIs will be used when try to count the number of a flow be
hit.

Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Reviewed-by: Qiming Yang <qiming.yang@intel.com>
Reviewed-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
drivers/net/ice/base/ice_switch.c
drivers/net/ice/base/ice_switch.h