ice: call netif_keep_dst() once when entering switchdev mode
Subsystems (3)
PATCH v2 1/1 ice: call netif_keep_dst() once when entering switchdev mode
From: Marcin Szycik <[email protected]>
netif_keep_dst() only needs to be called once for the uplink VSI, not once for each port representor. Move it from ice_eswitch_setup_repr() to ice_eswitch_enable_switchdev().
---
v1 -> v2:
- Verified Fixes: tag via bisect - defd52455aee introduced the redundant per-repr call to netif_keep_dst(uplink_vsi->netdev) by changing the target netdev to the uplink VSI inside the per-representor setup function. Before that commit, each call was on a distinct repr->netdev so no Fixes: predating it applies.
drivers/net/ethernet/intel/ice/ice_eswitch.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/intel/ice/ice_eswitch.c +2 -2
@@ -117,8 +117,6 @@ static int ice_eswitch_setup_repr(struct ice_pf *pf, struct ice_repr *repr)if (!repr->dst)return -ENOMEM ; -netif_keep_dst (uplink_vsi->netdev); - dst = repr->dst; dst->u.port_info.port_id = vsi->vsi_num; dst->u.port_info.lower_dev = uplink_vsi->netdev;
@@ -312,6 +310,8 @@ static int ice_eswitch_enable_switchdev(struct ice_pf *pf)if (ice_eswitch_br_offloads_init (pf)) goto err_br_offloads; +netif_keep_dst (uplink_vsi->netdev); + pf->eswitch.is_running = true;return 0 ;
Signature · 1 line
2.52.0
Dear Aleksandr, dear Marcin,
Thank you for the patch.
Am 08.04.26 um 16:14 schrieb Aleksandr Loktionov:
Quoted 5 lines
From: Marcin Szycik <[email protected]>
netif_keep_dst()only needs to be called once for the uplink VSI, not once for each port representor. Move it fromice_eswitch_setup_repr()toice_eswitch_enable_switchdev().
It’d be great, if you could share the commands, how to verify your change.
Quoted 28 lines
Fixes defd52455aee ("ice: do Tx through PF netdev in slow-path")Signed-off-by Marcin Szycik <[email protected]>Signed-off-by Aleksandr Loktionov <[email protected]>---
v1 -> v2:
- Verified Fixes: tag via bisect -defd52455aeeintroduced the redundant per-repr call tonetif_keep_dst(uplink_vsi->netdev)by changing the target netdev to the uplink VSI inside the per-representor setup function. Before that commit, each call was on a distinctrepr->netdevso no Fixes: predating it applies.drivers/net/ethernet/intel/ice/ice_eswitch.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/net/ethernet/intel/ice/ice_eswitch.c +0
-2@@ -117,8 +117,6 @@ static int ice_eswitch_setup_repr(struct ice_pf *pf, struct ice_repr *repr)if (!repr->dst)return -ENOMEM ; -netif_keep_dst (uplink_vsi->netdev); - dst = repr->dst; dst->u.port_info.port_id = vsi->vsi_num; dst->u.port_info.lower_dev = uplink_vsi->netdev;
drivers/net/ethernet/intel/ice/ice_eswitch.c static int ice_eswitch_enable_switchdev(struct ice_pf *pf) · line 317
Quoted 8 lines
drivers/net/ethernet/intel/ice/ice_eswitch.c +2
-0@@ -312,6 +310,8 @@ static int ice_eswitch_enable_switchdev(struct ice_pf *pf)if (ice_eswitch_br_offloads_init (pf)) goto err_br_offloads; +netif_keep_dst (uplink_vsi->netdev); + pf->eswitch.is_running = true;return 0 ;
Kind regards,
Paul
Holda, Patryk
Tested-byQuoted 62 lines
-----Original Message-----
From: Intel-wired-lan <[email protected]> On Behalf Of Paul Menzel
Sent: Wednesday, April 8, 2026 4:28 PM
To: Loktionov, Aleksandr <[email protected]>
Cc: [email protected]; Nguyen, Anthony L <[email protected]>; [email protected]; Szycik, Marcin <[email protected]>
Subject: Re: [Intel-wired-lan] [PATCH iwl-next v2] ice: callnetif_keep_dst()once when entering switchdev modeDear Aleksandr, dear Marcin,
Thank you for the patch.
Am 08.04.26 um 16:14 schrieb Aleksandr Loktionov:
Quoted 5 lines
From: Marcin Szycik <[email protected]>
netif_keep_dst()only needs to be called once for the uplink VSI, not once for each port representor. Move it fromice_eswitch_setup_repr()toice_eswitch_enable_switchdev().It’d be great, if you could share the commands, how to verify your change.
drivers/net/ethernet/intel/ice/ice_eswitch.c static int ice_eswitch_setup_repr(struct ice_pf
Quoted 20 lines
Fixes defd52455aee ("ice: do Tx through PF netdev in slow-path")Signed-off-by Marcin Szycik <[email protected]>Signed-off-by Aleksandr Loktionov <[email protected]>---
v1 -> v2:
- Verified Fixes: tag via bisect -defd52455aeeintroduced the redundant per-repr call tonetif_keep_dst(uplink_vsi->netdev)by changing the target netdev to the uplink VSI inside the per-representor setup function. Before that commit, each call was on a distinctrepr->netdevso no Fixes: predating it applies.drivers/net/ethernet/intel/ice/ice_eswitch.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/net/ethernet/intel/ice/ice_eswitch.c +0
-0@@ -117,8 +117,6 @@ static int ice_eswitch_setup_repr(struct ice_pf*pf, struct
ice_repr*repr)Quoted 16 lines
drivers/net/ethernet/intel/ice/ice_eswitch.c +0
-2if (!repr->dst)return -ENOMEM ; -netif_keep_dst (uplink_vsi->netdev); - dst = repr->dst; dst->u.port_info.port_id = vsi->vsi_num; dst->u.port_info.lower_dev = uplink_vsi->netdev; @@ -312,6 +310,8@@ static int
ice_eswitch_enable_switchdev(struct ice_pf *pf)
if (ice_eswitch_br_offloads_init(pf))
gotoerr_br_offloads;drivers/net/ethernet/intel/ice/ice_eswitch.c +2
-0+netif_keep_dst (uplink_vsi->netdev); + pf->eswitch.is_running = true;
Quoted 8 lines
Quoted 1 line
return 0;
Reviewed-by Paul Menzel <[email protected]>Kind regards,
Paul