]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
ice: call netif_keep_dst() once when entering switchdev mode
authorMarcin Szycik <marcin.szycik@intel.com>
Wed, 8 Apr 2026 14:14:29 +0000 (16:14 +0200)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Mon, 22 Jun 2026 21:04:01 +0000 (14:04 -0700)
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().

Fixes: defd52455aee ("ice: do Tx through PF netdev in slow-path")
Signed-off-by: Marcin Szycik <marcin.szycik@intel.com>
Signed-off-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de>
Tested-by: Patryk Holda <patryk.holda@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/ice/ice_eswitch.c

index 2e4f0969035f778eaabb0d10cd70f3b47cc91211..c30e27bbfe6e25722472c5c6497acb2a46b50114 100644 (file)
@@ -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;