net/ice/base: reduce adding advanced rule time
authorLeyi Rong <leyi.rong@intel.com>
Wed, 19 Jun 2019 15:18:33 +0000 (23:18 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 28 Jun 2019 18:31:49 +0000 (20:31 +0200)
commit95d3619b097cbf1259abe59f697cdf52bf06c8db
tree2315dd9e83cafc6e73f38eb714f2fa8fda41d204
parent776b48c1128b7eb3b7c6c1ba4e20b524126a4e14
net/ice/base: reduce adding advanced rule time

While calling ice_find_recp we were calling ice_get_recp_to_prof_map
every time we called ice_find_recp. ice_get_recp_to_prof_map is a very
expensive operation and we should try to reduce the number of times we
call this function. So moved it into ice_get_recp_frm_fw since we only
need to have fresh recp_to_profile mapping when we we check FW to see if
the recipe we are trying to add already exists in FW.

Signed-off-by: Shivanshu Shukla <shivanshu.shukla@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Leyi Rong <leyi.rong@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
drivers/net/ice/base/ice_switch.c