net/ice/base: add reference count to tunnels
authorQi Zhang <qi.z.zhang@intel.com>
Mon, 23 Mar 2020 07:17:58 +0000 (15:17 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 21 Apr 2020 11:57:05 +0000 (13:57 +0200)
commit85351ff53ecddb51d8fdfac3ea0646f2ccca7611
treea897694dec51752e3e3fab79fea3bdc2067713b5
parent47fb3f91d8ff777ff9e9cb0cfa452364f2de0df3
net/ice/base: add reference count to tunnels

Add a lock for protecting the tunnel table while adding, removing
and searching tunnels.

Add reference counting to tunnels so that multiple instances
of the same tunnel port can be created. Only physically
destroy the tunnel when all instances of that tunnel have been
destroyed.

Signed-off-by: Dan Nowlin <dan.nowlin@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
drivers/net/ice/base/ice_common.c
drivers/net/ice/base/ice_flex_pipe.c
drivers/net/ice/base/ice_flex_type.h
drivers/net/ice/base/ice_type.h