Skip to content

Commit

Permalink
net/ice/base: fix duplicate flow rules
Browse files Browse the repository at this point in the history
[ upstream commit 43d3025 ]

When a vsi that already exists in the created vsi_list subscribes to the
same filter again, the return value ICE_SUCCESS results in duplicate flow
rules to be stored, which will cause 'flush' and 'destroy' errors.

Fixes: fed0c5c ("net/ice/base: support programming a new switch recipe")

Signed-off-by: Yiding Zhou <yidingx.zhou@intel.com>
Tested-by: Ke Xu <ke1.xu@intel.com>
  • Loading branch information
yiding-zhou authored and kevintraynor committed Nov 23, 2022
1 parent 3e76df4 commit 59f67d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ice/base/ice_switch.c
Expand Up @@ -8805,7 +8805,7 @@ ice_adv_add_update_vsi_list(struct ice_hw *hw,

/* A rule already exists with the new VSI being added */
if (ice_is_bit_set(m_entry->vsi_list_info->vsi_map, vsi_handle))
return ICE_SUCCESS;
return ICE_ERR_ALREADY_EXISTS;

/* Update the previously created VSI list set with
* the new VSI ID passed in
Expand Down

0 comments on commit 59f67d1

Please sign in to comment.