Skip to content

Commit 9debb70

Browse files
Martyna Szapar-Mudlawanguy11
authored andcommitted
ice: Fix lldp packets dropping after changing the number of channels
After vsi setup refactor commit 6624e78 ("ice: split ice_vsi_setup into smaller functions") ice_cfg_sw_lldp function which removes rx rule directing LLDP packets to vsi is moved from ice_vsi_release to ice_vsi_decfg function. ice_vsi_decfg is used in more cases than just in vsi_release resulting in unnecessary removal of rx lldp packets handling switch rule. This leads to lldp packets being dropped after a change number of channels via ethtool. This patch moves ice_cfg_sw_lldp function that removes rx lldp sw rule back to ice_vsi_release function. Fixes: 6624e78 ("ice: split ice_vsi_setup into smaller functions") Reported-by: Matěj Grégr <[email protected]> Closes: https://lore.kernel.org/intel-wired-lan/[email protected]/T/#u Reviewed-by: Przemek Kitszel <[email protected]> Signed-off-by: Martyna Szapar-Mudlaw <[email protected]> Tested-by: Pucha Himasekhar Reddy <[email protected]> (A Contingent worker at Intel) Signed-off-by: Tony Nguyen <[email protected]>
1 parent b3c9e65 commit 9debb70

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

drivers/net/ethernet/intel/ice/ice_lib.c

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2413,13 +2413,6 @@ void ice_vsi_decfg(struct ice_vsi *vsi)
24132413
struct ice_pf *pf = vsi->back;
24142414
int err;
24152415

2416-
/* The Rx rule will only exist to remove if the LLDP FW
2417-
* engine is currently stopped
2418-
*/
2419-
if (!ice_is_safe_mode(pf) && vsi->type == ICE_VSI_PF &&
2420-
!test_bit(ICE_FLAG_FW_LLDP_AGENT, pf->flags))
2421-
ice_cfg_sw_lldp(vsi, false, false);
2422-
24232416
ice_rm_vsi_lan_cfg(vsi->port_info, vsi->idx);
24242417
err = ice_rm_vsi_rdma_cfg(vsi->port_info, vsi->idx);
24252418
if (err)
@@ -2764,6 +2757,14 @@ int ice_vsi_release(struct ice_vsi *vsi)
27642757
ice_rss_clean(vsi);
27652758

27662759
ice_vsi_close(vsi);
2760+
2761+
/* The Rx rule will only exist to remove if the LLDP FW
2762+
* engine is currently stopped
2763+
*/
2764+
if (!ice_is_safe_mode(pf) && vsi->type == ICE_VSI_PF &&
2765+
!test_bit(ICE_FLAG_FW_LLDP_AGENT, pf->flags))
2766+
ice_cfg_sw_lldp(vsi, false, false);
2767+
27672768
ice_vsi_decfg(vsi);
27682769

27692770
/* retain SW VSI data structure since it is needed to unregister and

0 commit comments

Comments
 (0)