Skip to content

Commit e4e832d

Browse files
committed
Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue
Tony Nguyen says: ==================== Intel Wired LAN Driver Updates 2025-03-05 (ice) This series contains updates to ice driver. Larysa removes modification of destination override that caused LLDP packets to be blocked. Grzegorz fixes a memory leak in aRFS. Marcin resolves an issue with operation of switchdev and LAG. Przemek adjusts order of calls for registering devlink in relation to health reporters. * '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue: ice: register devlink prior to creating health reporters ice: Fix switchdev slow-path in LAG ice: fix memory leak in aRFS after reset ice: do not configure destination override for switchdev ==================== Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
2 parents f315296 + 2a3e89a commit e4e832d

File tree

7 files changed

+33
-32
lines changed

7 files changed

+33
-32
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,7 @@ void ice_init_arfs(struct ice_vsi *vsi)
511511
struct hlist_head *arfs_fltr_list;
512512
unsigned int i;
513513

514-
if (!vsi || vsi->type != ICE_VSI_PF)
514+
if (!vsi || vsi->type != ICE_VSI_PF || ice_is_arfs_active(vsi))
515515
return;
516516

517517
arfs_fltr_list = kcalloc(ICE_MAX_ARFS_LIST, sizeof(*arfs_fltr_list),

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_lag.c

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1000,6 +1000,28 @@ static void ice_lag_link(struct ice_lag *lag)
10001000
netdev_info(lag->netdev, "Shared SR-IOV resources in bond are active\n");
10011001
}
10021002

1003+
/**
1004+
* ice_lag_config_eswitch - configure eswitch to work with LAG
1005+
* @lag: lag info struct
1006+
* @netdev: active network interface device struct
1007+
*
1008+
* Updates all port representors in eswitch to use @netdev for Tx.
1009+
*
1010+
* Configures the netdev to keep dst metadata (also used in representor Tx).
1011+
* This is required for an uplink without switchdev mode configured.
1012+
*/
1013+
static void ice_lag_config_eswitch(struct ice_lag *lag,
1014+
struct net_device *netdev)
1015+
{
1016+
struct ice_repr *repr;
1017+
unsigned long id;
1018+
1019+
xa_for_each(&lag->pf->eswitch.reprs, id, repr)
1020+
repr->dst->u.port_info.lower_dev = netdev;
1021+
1022+
netif_keep_dst(netdev);
1023+
}
1024+
10031025
/**
10041026
* ice_lag_unlink - handle unlink event
10051027
* @lag: LAG info struct
@@ -1021,6 +1043,9 @@ static void ice_lag_unlink(struct ice_lag *lag)
10211043
ice_lag_move_vf_nodes(lag, act_port, pri_port);
10221044
lag->primary = false;
10231045
lag->active_port = ICE_LAG_INVALID_PORT;
1046+
1047+
/* Config primary's eswitch back to normal operation. */
1048+
ice_lag_config_eswitch(lag, lag->netdev);
10241049
} else {
10251050
struct ice_lag *primary_lag;
10261051

@@ -1419,6 +1444,7 @@ static void ice_lag_monitor_active(struct ice_lag *lag, void *ptr)
14191444
ice_lag_move_vf_nodes(lag, prim_port,
14201445
event_port);
14211446
lag->active_port = event_port;
1447+
ice_lag_config_eswitch(lag, event_netdev);
14221448
return;
14231449
}
14241450

@@ -1428,6 +1454,7 @@ static void ice_lag_monitor_active(struct ice_lag *lag, void *ptr)
14281454
/* new active port */
14291455
ice_lag_move_vf_nodes(lag, lag->active_port, event_port);
14301456
lag->active_port = event_port;
1457+
ice_lag_config_eswitch(lag, event_netdev);
14311458
} else {
14321459
/* port not set as currently active (e.g. new active port
14331460
* has already claimed the nodes and filters

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);

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5065,16 +5065,16 @@ static int ice_init_devlink(struct ice_pf *pf)
50655065
return err;
50665066

50675067
ice_devlink_init_regions(pf);
5068-
ice_health_init(pf);
50695068
ice_devlink_register(pf);
5069+
ice_health_init(pf);
50705070

50715071
return 0;
50725072
}
50735073

50745074
static void ice_deinit_devlink(struct ice_pf *pf)
50755075
{
5076-
ice_devlink_unregister(pf);
50775076
ice_health_deinit(pf);
5077+
ice_devlink_unregister(pf);
50785078
ice_devlink_destroy_regions(pf);
50795079
ice_devlink_unregister_params(pf);
50805080
}

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2424,7 +2424,9 @@ ice_xmit_frame_ring(struct sk_buff *skb, struct ice_tx_ring *tx_ring)
24242424
ICE_TXD_CTX_QW1_CMD_S);
24252425

24262426
ice_tstamp(tx_ring, skb, first, &offload);
2427-
if (ice_is_switchdev_running(vsi->back) && vsi->type != ICE_VSI_SF)
2427+
if ((ice_is_switchdev_running(vsi->back) ||
2428+
ice_lag_is_switchdev_running(vsi->back)) &&
2429+
vsi->type != ICE_VSI_SF)
24282430
ice_eswitch_set_target_vsi(skb, &offload);
24292431

24302432
if (offload.cd_qw1 & ICE_TX_DESC_DTYPE_CTX) {

0 commit comments

Comments
 (0)