From: Tony Nguyen <anthony.l.nguyen@intel.com>
To: davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com,
edumazet@google.com, andrew+netdev@lunn.ch,
netdev@vger.kernel.org
Cc: Mohammad Heib <mheib@redhat.com>,
anthony.l.nguyen@intel.com, przemyslaw.kitszel@intel.com,
jiri@resnulli.us, horms@kernel.org, corbet@lwn.net,
skhan@linuxfoundation.org, rdunlap@infradead.org,
linux-doc@vger.kernel.org, Rinitha S <sx.rinitha@intel.com>
Subject: [PATCH net-next 3/3] i40e: trigger PF reset when re-enabling ATR via ethtool
Date: Thu, 17 Sep 2026 13:45:40 -0700 [thread overview]
Message-ID: <20260917204541.3072415-4-anthony.l.nguyen@intel.com> (raw)
In-Reply-To: <20260917204541.3072415-1-anthony.l.nguyen@intel.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>
Tested-by: Rinitha S <sx.rinitha@intel.com> (A Contingent worker at Intel)
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.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 ef9d1e78c16a..79c2cdab0f51 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.47.1
next prev parent reply other threads:[~2026-09-17 20:45 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-17 20:45 [PATCH net-next 0/3][pull request] i40e: add runtime-tunable ATR sample rate Tony Nguyen
2026-09-17 20:45 ` [PATCH net-next 1/3] i40e: move ATR sample rate from ring to PF level Tony Nguyen
2026-09-21 21:32 ` netdev-bot+sashiko
2026-10-08 12:55 ` Mohammad Heib
2026-09-17 20:45 ` [PATCH net-next 2/3] i40e: add devlink parameter for Flow Director ATR sample rate Tony Nguyen
2026-09-21 21:32 ` netdev-bot+sashiko
2026-10-08 13:01 ` Mohammad Heib
2026-09-17 20:45 ` Tony Nguyen [this message]
2026-09-21 21:32 ` [PATCH net-next 3/3] i40e: trigger PF reset when re-enabling ATR via ethtool netdev-bot+sashiko
2026-10-08 13:06 ` Mohammad Heib
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=20260917204541.3072415-4-anthony.l.nguyen@intel.com \
--to=anthony.l.nguyen@intel.com \
--cc=andrew+netdev@lunn.ch \
--cc=corbet@lwn.net \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=jiri@resnulli.us \
--cc=kuba@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=mheib@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=przemyslaw.kitszel@intel.com \
--cc=rdunlap@infradead.org \
--cc=skhan@linuxfoundation.org \
--cc=sx.rinitha@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