Currently ice_get_fv() is only used inside ice_get_sw_fv_list(). Remove
ice_get_fv() and call ice_get_sw_fv_list() directly.
Signed-off-by: Marcin Szycik <marcin.szycik@intel.com>
Signed-off-by: Qiming Yang <qiming.yang@intel.com>
---
drivers/net/ice/base/ice_ddp.c | 3 +++
drivers/net/ice/base/ice_switch.c | 23 ++---------------------
2 files changed, 5 insertions(+), 21 deletions(-)
@@ -1579,6 +1579,9 @@ ice_get_sw_fv_list(struct ice_hw *hw, struct ice_prot_lkup_ext *lkups,
struct ice_fv *fv;
u32 offset;
+ if (!lkups->n_val_words)
+ return ICE_SUCCESS;
+
ice_memset(&state, 0, sizeof(state), ICE_NONDMA_MEM);
if (!lkups->n_val_words || !hw->seg)
@@ -7733,25 +7733,6 @@ ice_create_recipe_group(struct ice_hw *hw, struct ice_sw_recipe *rm,
return status;
}
-/**
- * ice_get_fv - get field vectors/extraction sequences for spec. lookup types
- * @hw: pointer to hardware structure
- * @lkups: lookup elements or match criteria for the advanced recipe, one
- * structure per protocol header
- * @bm: bitmap of field vectors to consider
- * @fv_list: pointer to a list that holds the returned field vectors
- */
-static enum ice_status
-ice_get_fv(struct ice_hw *hw, struct ice_prot_lkup_ext *lkups,
- ice_bitmap_t *bm, struct LIST_HEAD_TYPE *fv_list)
-{
- if (!lkups->n_val_words)
- return ICE_SUCCESS;
-
- /* Find field vectors that include all specified protocol types */
- return ice_get_sw_fv_list(hw, lkups, bm, fv_list);
-}
-
/**
* ice_tun_type_match_word - determine if tun type needs a match mask
* @rinfo: other information regarding the rule e.g. priority and action info
@@ -8159,11 +8140,11 @@ ice_add_adv_recipe(struct ice_hw *hw, struct ice_adv_lkup_elem *lkups,
/* Get bitmap of field vectors (profiles) that are compatible with the
* rule request; only these will be searched in the subsequent call to
- * ice_get_fv.
+ * ice_get_sw_fv_list.
*/
ice_get_compat_fv_bitmap(hw, rinfo, fv_bitmap);
- status = ice_get_fv(hw, lkup_exts, fv_bitmap, &rm->fv_list);
+ status = ice_get_sw_fv_list(hw, lkup_exts, fv_bitmap, &rm->fv_list);
if (status)
goto err_unroll;