Skip to content

Commit 3be83ee

Browse files
walking-machineanguy11
authored andcommitted
ice: do not configure destination override for switchdev
After switchdev is enabled and disabled later, LLDP packets sending stops, despite working perfectly fine before and during switchdev state. To reproduce (creating/destroying VF is what triggers the reconfiguration): devlink dev eswitch set pci/<address> mode switchdev echo '2' > /sys/class/net/<ifname>/device/sriov_numvfs echo '0' > /sys/class/net/<ifname>/device/sriov_numvfs This happens because LLDP relies on the destination override functionality. It needs to 1) set a flag in the descriptor, 2) set the VSI permission to make it valid. The permissions are set when the PF VSI is first configured, but switchdev then enables it for the uplink VSI (which is always the PF) once more when configured and disables when deconfigured, which leads to software-generated LLDP packets being blocked. Do not modify the destination override permissions when configuring switchdev, as the enabled state is the default configuration that is never modified. Fixes: 1a1c40d ("ice: set and release switchdev environment") Reviewed-by: Michal Swiatkowski <[email protected]> Signed-off-by: Larysa Zaremba <[email protected]> Reviewed-by: Simon Horman <[email protected]> Tested-by: Sujai Buvaneswaran <[email protected]> Signed-off-by: Tony Nguyen <[email protected]>
1 parent 3c9231e commit 3be83ee

File tree

3 files changed

+0
-28
lines changed

3 files changed

+0
-28
lines changed

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

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,6 @@ static int ice_eswitch_setup_env(struct ice_pf *pf)
4949
if (vlan_ops->dis_rx_filtering(uplink_vsi))
5050
goto err_vlan_filtering;
5151

52-
if (ice_vsi_update_security(uplink_vsi, ice_vsi_ctx_set_allow_override))
53-
goto err_override_uplink;
54-
5552
if (ice_vsi_update_local_lb(uplink_vsi, true))
5653
goto err_override_local_lb;
5754

@@ -63,8 +60,6 @@ static int ice_eswitch_setup_env(struct ice_pf *pf)
6360
err_up:
6461
ice_vsi_update_local_lb(uplink_vsi, false);
6562
err_override_local_lb:
66-
ice_vsi_update_security(uplink_vsi, ice_vsi_ctx_clear_allow_override);
67-
err_override_uplink:
6863
vlan_ops->ena_rx_filtering(uplink_vsi);
6964
err_vlan_filtering:
7065
ice_cfg_dflt_vsi(uplink_vsi->port_info, uplink_vsi->idx, false,
@@ -275,7 +270,6 @@ static void ice_eswitch_release_env(struct ice_pf *pf)
275270
vlan_ops = ice_get_compat_vsi_vlan_ops(uplink_vsi);
276271

277272
ice_vsi_update_local_lb(uplink_vsi, false);
278-
ice_vsi_update_security(uplink_vsi, ice_vsi_ctx_clear_allow_override);
279273
vlan_ops->ena_rx_filtering(uplink_vsi);
280274
ice_cfg_dflt_vsi(uplink_vsi->port_info, uplink_vsi->idx, false,
281275
ICE_FLTR_TX);

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

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3936,24 +3936,6 @@ void ice_vsi_ctx_clear_antispoof(struct ice_vsi_ctx *ctx)
39363936
ICE_AQ_VSI_SEC_TX_PRUNE_ENA_S);
39373937
}
39383938

3939-
/**
3940-
* ice_vsi_ctx_set_allow_override - allow destination override on VSI
3941-
* @ctx: pointer to VSI ctx structure
3942-
*/
3943-
void ice_vsi_ctx_set_allow_override(struct ice_vsi_ctx *ctx)
3944-
{
3945-
ctx->info.sec_flags |= ICE_AQ_VSI_SEC_FLAG_ALLOW_DEST_OVRD;
3946-
}
3947-
3948-
/**
3949-
* ice_vsi_ctx_clear_allow_override - turn off destination override on VSI
3950-
* @ctx: pointer to VSI ctx structure
3951-
*/
3952-
void ice_vsi_ctx_clear_allow_override(struct ice_vsi_ctx *ctx)
3953-
{
3954-
ctx->info.sec_flags &= ~ICE_AQ_VSI_SEC_FLAG_ALLOW_DEST_OVRD;
3955-
}
3956-
39573939
/**
39583940
* ice_vsi_update_local_lb - update sw block in VSI with local loopback bit
39593941
* @vsi: pointer to VSI structure

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,10 +105,6 @@ ice_vsi_update_security(struct ice_vsi *vsi, void (*fill)(struct ice_vsi_ctx *))
105105
void ice_vsi_ctx_set_antispoof(struct ice_vsi_ctx *ctx);
106106

107107
void ice_vsi_ctx_clear_antispoof(struct ice_vsi_ctx *ctx);
108-
109-
void ice_vsi_ctx_set_allow_override(struct ice_vsi_ctx *ctx);
110-
111-
void ice_vsi_ctx_clear_allow_override(struct ice_vsi_ctx *ctx);
112108
int ice_vsi_update_local_lb(struct ice_vsi *vsi, bool set);
113109
int ice_vsi_add_vlan_zero(struct ice_vsi *vsi);
114110
int ice_vsi_del_vlan_zero(struct ice_vsi *vsi);

0 commit comments

Comments
 (0)