Linux Documentation
 help / color / mirror / Atom feed
* [PATCH net-next v2 0/2][pull request] i40e: add runtime-tunable ATR sample rate
@ 2026-12-04 21:38 Tony Nguyen
  2026-12-04 21:38 ` [PATCH net-next v2 1/2] i40e: move ATR sample rate from ring to PF level Tony Nguyen
  2026-12-04 21:38 ` [PATCH net-next v2 2/2] i40e: add devlink parameter for Flow Director ATR sample rate Tony Nguyen
  0 siblings, 2 replies; 5+ messages in thread
From: Tony Nguyen @ 2026-12-04 21:38 UTC (permalink / raw)
  To: davem, kuba, pabeni, edumazet, andrew+netdev, willemb, netdev
  Cc: Tony Nguyen, mheib, przemyslaw.kitszel, jiri, horms, corbet,
	skhan, rdunlap, linux-doc

Mohammad Heib says:

This series makes the Flow Director ATR sample rate configurable at
runtime through a devlink parameter.

On systems with many queues and high-rate TCP workloads, the fixed
default sampling interval can cause frequent Flow Director
reprogramming and TCP packet reordering. The optimal interval depends
on the workload and system configuration.

Patch 1 moves atr_sample_rate from per-ring to PF level, since it is
a global policy. It also triggers a PF reset when re-enabling ATR via
ethtool private flags so that fd_ena is reprogrammed in the TX queue
HW context.

Patch 2 exposes atr_sample_rate as a devlink runtime parameter so
administrators can tune it without rebuilding the driver.

Testing with iperf3 -t 60 showed ~7k TCP reordering events at the
default sample rate (20). Setting atr_sample_rate to 10000 reduced
reordering to ~769 (~90% reduction).
---
v2:
- Use '|=' instead of '=' when setting reset_needed for the ATR
  re-enable path, to avoid overwriting unrelated reset requests
- Folded the PF reset patch into patch 1 for bisect cleanliness
  (was patch 3/3)
- Skip PF reset when FD_SB (ntuple) already holds fd_ena high,
  avoiding unnecessary traffic disruption
- Fix LLDP EEXIST path to not drop unrelated reset requests
  (reset_needed &= ~REBUILD_FLAG instead of = 0)
- Flush existing ATR entries when setting atr_sample_rate to 0 via
  devlink, so stale filters do not persist on devices without HW
  ATR eviction
- Documentation: clarify that the sampling interval is per Tx queue
  and counts TCP packets only; fix formatting

v1: https://lore.kernel.org/netdev/20260917204541.3072415-1-anthony.l.nguyen@intel.com/

The following are changes since commit d5cf954cebe4f175dfd834e1dc471a3aa203ec7d:
  net: pktgen: hold if_lock across pktgen_find_dev() in __pktgen_NN_threads()
and are available in the git repository at:
  git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue 40GbE

Mohammad Heib (2):
  i40e: move ATR sample rate from ring to PF level
  i40e: add devlink parameter for Flow Director ATR sample rate

 Documentation/networking/devlink/i40e.rst     | 21 +++++++++
 drivers/net/ethernet/intel/i40e/i40e.h        |  1 +
 .../net/ethernet/intel/i40e/i40e_devlink.c    | 46 +++++++++++++++++++
 .../net/ethernet/intel/i40e/i40e_ethtool.c    | 12 ++++-
 drivers/net/ethernet/intel/i40e/i40e_main.c   |  9 ++--
 drivers/net/ethernet/intel/i40e/i40e_txrx.c   |  6 ++-
 drivers/net/ethernet/intel/i40e/i40e_txrx.h   |  3 +-
 7 files changed, 87 insertions(+), 11 deletions(-)

-- 
2.47.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-12-05 22:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-04 21:38 [PATCH net-next v2 0/2][pull request] i40e: add runtime-tunable ATR sample rate Tony Nguyen
2026-12-04 21:38 ` [PATCH net-next v2 1/2] i40e: move ATR sample rate from ring to PF level Tony Nguyen
2026-12-05 22:29   ` netdev-bot+sashiko
2026-12-04 21:38 ` [PATCH net-next v2 2/2] i40e: add devlink parameter for Flow Director ATR sample rate Tony Nguyen
2026-12-05 22:29   ` netdev-bot+sashiko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox