intel-wired-lan.osuosl.org archive mirror
 help / color / mirror / Atom feed
From: mheib@redhat.com
To: intel-wired-lan@lists.osuosl.org
Cc: netdev@vger.kernel.org, jiri@resnulli.us, davem@davemloft.net,
	edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
	corbet@lwn.net, anthony.l.nguyen@intel.com,
	przemyslaw.kitszel@intel.com, andrew+netdev@lunn.ch,
	horms@kernel.org, Mohammad Heib <mheib@redhat.com>
Subject: [Intel-wired-lan] [PATCH iwl-next v4 3/3] i40e: trigger PF reset when re-enabling ATR via ethtool
Date: Thu, 23 Jul 2026 17:04:17 +0300	[thread overview]
Message-ID: <20260723140510.184819-4-mheib@redhat.com> (raw)
In-Reply-To: <20260723140510.184819-1-mheib@redhat.com>

From: Mohammad Heib <mheib@redhat.com>

Toggling flow-director-atr via ethtool private flags does not trigger a
ring reset. If ATR was disabled while fd_ena was cleared in the TX queue
HW context (e.g. after a ring reset with both ATR and ntuple off),
re-enabling ATR causes i40e_atr() to inject FDIR descriptors into a
queue where fd_ena is still 0.

Trigger a PF reset when ATR is re-enabled so that fd_ena is re-evaluated
based on the current flag state.

Signed-off-by: Mohammad Heib <mheib@redhat.com>
---
 drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
index 6d2b076049f7..bb37f8cc4643 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
@@ -5301,6 +5301,13 @@ static int i40e_set_priv_flags(struct net_device *dev, u32 flags)
 	    test_bit(I40E_FLAG_SOURCE_PRUNING_DIS, changed_flags))
 		reset_needed = BIT(__I40E_PF_RESET_REQUESTED);
 
+	/* Re-enabling ATR requires a reset to update fd_ena in the
+	 * TX queue HW context.
+	 */
+	if (test_bit(I40E_FLAG_FD_ATR_ENA, changed_flags) &&
+	    test_bit(I40E_FLAG_FD_ATR_ENA, new_flags))
+		reset_needed = BIT(__I40E_PF_RESET_REQUESTED);
+
 	/* Before we finalize any flag changes, we need to perform some
 	 * checks to ensure that the changes are supported and safe.
 	 */
-- 
2.53.0


      parent reply	other threads:[~2026-07-23 14:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-23 14:04 [Intel-wired-lan] [PATCH iwl-next v4 0/3] i40e: add runtime-tunable ATR sample rate mheib
2026-07-23 14:04 ` [Intel-wired-lan] [PATCH iwl-next v4 1/3] i40e: move ATR sample rate from ring to PF level mheib
2026-07-23 14:04 ` [Intel-wired-lan] [PATCH iwl-next v4 2/3] i40e: add devlink parameter for Flow Director ATR sample rate mheib
2026-07-23 14:04 ` mheib [this message]

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=20260723140510.184819-4-mheib@redhat.com \
    --to=mheib@redhat.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=anthony.l.nguyen@intel.com \
    --cc=corbet@lwn.net \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=jiri@resnulli.us \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=przemyslaw.kitszel@intel.com \
    /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;
as well as URLs for NNTP newsgroup(s).