From: Qi Zhang Date: Thu, 23 Apr 2020 04:22:13 +0000 (+0800) Subject: net/ice/base: workaround unexpected rule deletion X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;ds=sidebyside;h=a3a51cbc7a252eb07ec5f9233f41243ba0ff8299;p=dpdk.git net/ice/base: workaround unexpected rule deletion Ideally a rule with "TO VSI LIST" action should not be deleted when one of the VF reset happens. The correct action by kernel PF driver is to remove the VSI of a reset VF from the VSI list, but this is not implemented in kernel PF yet, so workaround is the DCF to prevent a rule with "To VSI List" action happens. Signed-off-by: Qi Zhang Reviewed-by: Wei Zhao --- diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c index e64b03136b..7e33df84ac 100644 --- a/drivers/net/ice/base/ice_switch.c +++ b/drivers/net/ice/base/ice_switch.c @@ -6742,6 +6742,13 @@ ice_adv_add_update_vsi_list(struct ice_hw *hw, cur_fltr->sw_act.fltr_act == ICE_FWD_TO_VSI_LIST)) return ICE_ERR_NOT_IMPL; + /* Workaround fix for unexpected rule deletion by kernel PF + * during VF reset. + */ + if (new_fltr->sw_act.fltr_act == ICE_FWD_TO_VSI && + cur_fltr->sw_act.fltr_act == ICE_FWD_TO_VSI) + return ICE_ERR_NOT_IMPL; + if (m_entry->vsi_count < 2 && !m_entry->vsi_list_info) { /* Only one entry existed in the mapping and it was not already * a part of a VSI list. So, create a VSI list with the old and