Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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/20250305213549.1514274-1-anthony.l.nguyen@intel.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

+33 -32
+1 -1
drivers/net/ethernet/intel/ice/ice_arfs.c
··· 511 511 struct hlist_head *arfs_fltr_list; 512 512 unsigned int i; 513 513 514 - if (!vsi || vsi->type != ICE_VSI_PF) 514 + if (!vsi || vsi->type != ICE_VSI_PF || ice_is_arfs_active(vsi)) 515 515 return; 516 516 517 517 arfs_fltr_list = kcalloc(ICE_MAX_ARFS_LIST, sizeof(*arfs_fltr_list),
-6
drivers/net/ethernet/intel/ice/ice_eswitch.c
··· 49 49 if (vlan_ops->dis_rx_filtering(uplink_vsi)) 50 50 goto err_vlan_filtering; 51 51 52 - if (ice_vsi_update_security(uplink_vsi, ice_vsi_ctx_set_allow_override)) 53 - goto err_override_uplink; 54 - 55 52 if (ice_vsi_update_local_lb(uplink_vsi, true)) 56 53 goto err_override_local_lb; 57 54 ··· 60 63 err_up: 61 64 ice_vsi_update_local_lb(uplink_vsi, false); 62 65 err_override_local_lb: 63 - ice_vsi_update_security(uplink_vsi, ice_vsi_ctx_clear_allow_override); 64 - err_override_uplink: 65 66 vlan_ops->ena_rx_filtering(uplink_vsi); 66 67 err_vlan_filtering: 67 68 ice_cfg_dflt_vsi(uplink_vsi->port_info, uplink_vsi->idx, false, ··· 270 275 vlan_ops = ice_get_compat_vsi_vlan_ops(uplink_vsi); 271 276 272 277 ice_vsi_update_local_lb(uplink_vsi, false); 273 - ice_vsi_update_security(uplink_vsi, ice_vsi_ctx_clear_allow_override); 274 278 vlan_ops->ena_rx_filtering(uplink_vsi); 275 279 ice_cfg_dflt_vsi(uplink_vsi->port_info, uplink_vsi->idx, false, 276 280 ICE_FLTR_TX);
+27
drivers/net/ethernet/intel/ice/ice_lag.c
··· 1001 1001 } 1002 1002 1003 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 + 1025 + /** 1004 1026 * ice_lag_unlink - handle unlink event 1005 1027 * @lag: LAG info struct 1006 1028 */ ··· 1043 1021 ice_lag_move_vf_nodes(lag, act_port, pri_port); 1044 1022 lag->primary = false; 1045 1023 lag->active_port = ICE_LAG_INVALID_PORT; 1024 + 1025 + /* Config primary's eswitch back to normal operation. */ 1026 + ice_lag_config_eswitch(lag, lag->netdev); 1046 1027 } else { 1047 1028 struct ice_lag *primary_lag; 1048 1029 ··· 1444 1419 ice_lag_move_vf_nodes(lag, prim_port, 1445 1420 event_port); 1446 1421 lag->active_port = event_port; 1422 + ice_lag_config_eswitch(lag, event_netdev); 1447 1423 return; 1448 1424 } 1449 1425 ··· 1454 1428 /* new active port */ 1455 1429 ice_lag_move_vf_nodes(lag, lag->active_port, event_port); 1456 1430 lag->active_port = event_port; 1431 + ice_lag_config_eswitch(lag, event_netdev); 1457 1432 } else { 1458 1433 /* port not set as currently active (e.g. new active port 1459 1434 * has already claimed the nodes and filters
-18
drivers/net/ethernet/intel/ice/ice_lib.c
··· 3937 3937 } 3938 3938 3939 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 - 3957 - /** 3958 3940 * ice_vsi_update_local_lb - update sw block in VSI with local loopback bit 3959 3941 * @vsi: pointer to VSI structure 3960 3942 * @set: set or unset the bit
-4
drivers/net/ethernet/intel/ice/ice_lib.h
··· 105 105 void ice_vsi_ctx_set_antispoof(struct ice_vsi_ctx *ctx); 106 106 107 107 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); 112 108 int ice_vsi_update_local_lb(struct ice_vsi *vsi, bool set); 113 109 int ice_vsi_add_vlan_zero(struct ice_vsi *vsi); 114 110 int ice_vsi_del_vlan_zero(struct ice_vsi *vsi);
+2 -2
drivers/net/ethernet/intel/ice/ice_main.c
··· 5065 5065 return err; 5066 5066 5067 5067 ice_devlink_init_regions(pf); 5068 - ice_health_init(pf); 5069 5068 ice_devlink_register(pf); 5069 + ice_health_init(pf); 5070 5070 5071 5071 return 0; 5072 5072 } 5073 5073 5074 5074 static void ice_deinit_devlink(struct ice_pf *pf) 5075 5075 { 5076 - ice_devlink_unregister(pf); 5077 5076 ice_health_deinit(pf); 5077 + ice_devlink_unregister(pf); 5078 5078 ice_devlink_destroy_regions(pf); 5079 5079 ice_devlink_unregister_params(pf); 5080 5080 }
+3 -1
drivers/net/ethernet/intel/ice/ice_txrx.c
··· 2424 2424 ICE_TXD_CTX_QW1_CMD_S); 2425 2425 2426 2426 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) 2428 2430 ice_eswitch_set_target_vsi(skb, &offload); 2429 2431 2430 2432 if (offload.cd_qw1 & ICE_TX_DESC_DTYPE_CTX) {