Message ID | 20240618210206.981885-1-anthony.l.nguyen@intel.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 74382aebc9035470ec4c789bdb0d09d8c14f261e |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [net] ice: Fix VSI list rule with ICE_SW_LKUP_LAST type | expand |
Hello: This patch was applied to netdev/net.git (main) by Jakub Kicinski <kuba@kernel.org>: On Tue, 18 Jun 2024 14:02:05 -0700 you wrote: > From: Marcin Szycik <marcin.szycik@linux.intel.com> > > Adding/updating VSI list rule, as well as allocating/freeing VSI list > resource are called several times with type ICE_SW_LKUP_LAST, which fails > because ice_update_vsi_list_rule() and ice_aq_alloc_free_vsi_list() > consider it invalid. Allow calling these functions with ICE_SW_LKUP_LAST. > > [...] Here is the summary with links: - [net] ice: Fix VSI list rule with ICE_SW_LKUP_LAST type https://git.kernel.org/netdev/net/c/74382aebc903 You are awesome, thank you!
diff --git a/drivers/net/ethernet/intel/ice/ice_switch.c b/drivers/net/ethernet/intel/ice/ice_switch.c index 94d6670d0901..1191031b2a43 100644 --- a/drivers/net/ethernet/intel/ice/ice_switch.c +++ b/drivers/net/ethernet/intel/ice/ice_switch.c @@ -1899,7 +1899,8 @@ ice_aq_alloc_free_vsi_list(struct ice_hw *hw, u16 *vsi_list_id, lkup_type == ICE_SW_LKUP_ETHERTYPE_MAC || lkup_type == ICE_SW_LKUP_PROMISC || lkup_type == ICE_SW_LKUP_PROMISC_VLAN || - lkup_type == ICE_SW_LKUP_DFLT) { + lkup_type == ICE_SW_LKUP_DFLT || + lkup_type == ICE_SW_LKUP_LAST) { sw_buf->res_type = cpu_to_le16(ICE_AQC_RES_TYPE_VSI_LIST_REP); } else if (lkup_type == ICE_SW_LKUP_VLAN) { if (opc == ice_aqc_opc_alloc_res) @@ -2922,7 +2923,8 @@ ice_update_vsi_list_rule(struct ice_hw *hw, u16 *vsi_handle_arr, u16 num_vsi, lkup_type == ICE_SW_LKUP_ETHERTYPE_MAC || lkup_type == ICE_SW_LKUP_PROMISC || lkup_type == ICE_SW_LKUP_PROMISC_VLAN || - lkup_type == ICE_SW_LKUP_DFLT) + lkup_type == ICE_SW_LKUP_DFLT || + lkup_type == ICE_SW_LKUP_LAST) rule_type = remove ? ICE_AQC_SW_RULES_T_VSI_LIST_CLEAR : ICE_AQC_SW_RULES_T_VSI_LIST_SET; else if (lkup_type == ICE_SW_LKUP_VLAN)