public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
To: intel-wired-lan@lists.osuosl.org, anthony.l.nguyen@intel.com,
	aleksandr.loktionov@intel.com
Cc: netdev@vger.kernel.org, Marcin Szycik <marcin.szycik@intel.com>
Subject: [PATCH iwl-next] ice: call netif_keep_dst() once when entering switchdev mode
Date: Fri, 27 Mar 2026 08:22:36 +0100	[thread overview]
Message-ID: <20260327072236.129802-5-aleksandr.loktionov@intel.com> (raw)
In-Reply-To: <20260327072236.129802-1-aleksandr.loktionov@intel.com>

From: Marcin Szycik <marcin.szycik@intel.com>

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

 drivers/net/ethernet/intel/ice/ice_eswitch.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/intel/ice/ice_eswitch.c b/drivers/net/ethernet/intel/ice/ice_eswitch.c
index 2e4f096..c30e27b 100644
--- a/drivers/net/ethernet/intel/ice/ice_eswitch.c
+++ b/drivers/net/ethernet/intel/ice/ice_eswitch.c
@@ -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;
-- 
2.52.0


  parent reply	other threads:[~2026-03-27  7:22 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-27  7:22 [PATCH iwl-next] ice: fix FDIR CTRL VSI resource leak in ice_reset_all_vfs() Aleksandr Loktionov
2026-03-27  7:22 ` [PATCH iwl-next] ice: do not reset MDD counters on VF reset Aleksandr Loktionov
2026-04-01 23:14   ` Tony Nguyen
2026-03-27  7:22 ` [PATCH iwl-next] ice: check cross-timestamp timeout bits Aleksandr Loktionov
2026-04-02  0:01   ` [Intel-wired-lan] " Jacob Keller
2026-04-03  9:03   ` Simon Horman
2026-03-27  7:22 ` [PATCH iwl-next] ice: fix AQ error code comparison in ice_set_pauseparam() Aleksandr Loktionov
2026-04-03 12:10   ` Simon Horman
2026-03-27  7:22 ` Aleksandr Loktionov [this message]
2026-04-03 12:41   ` [PATCH iwl-next] ice: call netif_keep_dst() once when entering switchdev mode Simon Horman
2026-04-03 11:57 ` [PATCH iwl-next] ice: fix FDIR CTRL VSI resource leak in ice_reset_all_vfs() Simon Horman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260327072236.129802-5-aleksandr.loktionov@intel.com \
    --to=aleksandr.loktionov@intel.com \
    --cc=anthony.l.nguyen@intel.com \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=marcin.szycik@intel.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox