Commit e247267b authored by Marcin Szycik's avatar Marcin Szycik Committed by Tony Nguyen

ice: Remove unused struct ice_prot_lkup_ext members

Remove field_off as it's never used.

Remove done bitmap, as its value is only checked and never assigned.
Reusing sub-recipes while creating new root recipes is currently not
supported in the driver.
Reviewed-by: default avatarPrzemek Kitszel <przemyslaw.kitszel@intel.com>
Signed-off-by: default avatarMarcin Szycik <marcin.szycik@linux.intel.com>
Tested-by: default avatarSujai Buvaneswaran <sujai.buvaneswaran@intel.com>
Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
parent 58f9416d
...@@ -452,13 +452,9 @@ struct ice_prot_lkup_ext { ...@@ -452,13 +452,9 @@ struct ice_prot_lkup_ext {
u16 prot_type; u16 prot_type;
u8 n_val_words; u8 n_val_words;
/* create a buffer to hold max words per recipe */ /* create a buffer to hold max words per recipe */
u16 field_off[ICE_MAX_CHAIN_WORDS];
u16 field_mask[ICE_MAX_CHAIN_WORDS]; u16 field_mask[ICE_MAX_CHAIN_WORDS];
struct ice_fv_word fv_words[ICE_MAX_CHAIN_WORDS]; struct ice_fv_word fv_words[ICE_MAX_CHAIN_WORDS];
/* Indicate field offsets that have field vector indices assigned */
DECLARE_BITMAP(done, ICE_MAX_CHAIN_WORDS);
}; };
struct ice_pref_recipe_group { struct ice_pref_recipe_group {
......
...@@ -4918,33 +4918,27 @@ ice_create_first_fit_recp_def(struct ice_hw *hw, ...@@ -4918,33 +4918,27 @@ ice_create_first_fit_recp_def(struct ice_hw *hw,
*recp_cnt = 0; *recp_cnt = 0;
/* Walk through every word in the rule to check if it is not done. If so for (j = 0; j < lkup_exts->n_val_words; j++) {
* then this word needs to be part of a new recipe. if (!grp || grp->n_val_pairs == ICE_NUM_WORDS_RECIPE) {
*/ struct ice_recp_grp_entry *entry;
for (j = 0; j < lkup_exts->n_val_words; j++)
if (!test_bit(j, lkup_exts->done)) { entry = devm_kzalloc(ice_hw_to_dev(hw), sizeof(*entry),
if (!grp || GFP_KERNEL);
grp->n_val_pairs == ICE_NUM_WORDS_RECIPE) { if (!entry)
struct ice_recp_grp_entry *entry; return -ENOMEM;
entry = devm_kzalloc(ice_hw_to_dev(hw), list_add(&entry->l_entry, rg_list);
sizeof(*entry), grp = &entry->r_group;
GFP_KERNEL); (*recp_cnt)++;
if (!entry)
return -ENOMEM;
list_add(&entry->l_entry, rg_list);
grp = &entry->r_group;
(*recp_cnt)++;
}
grp->pairs[grp->n_val_pairs].prot_id =
lkup_exts->fv_words[j].prot_id;
grp->pairs[grp->n_val_pairs].off =
lkup_exts->fv_words[j].off;
grp->mask[grp->n_val_pairs] = lkup_exts->field_mask[j];
grp->n_val_pairs++;
} }
grp->pairs[grp->n_val_pairs].prot_id =
lkup_exts->fv_words[j].prot_id;
grp->pairs[grp->n_val_pairs].off = lkup_exts->fv_words[j].off;
grp->mask[grp->n_val_pairs] = lkup_exts->field_mask[j];
grp->n_val_pairs++;
}
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment