[PATCH iwl-next 2/4] ixgbe: add ixgbe_container_is_rx() helper and refine RX adaptive ITR
Simon Horman
horms at kernel.org
Wed Sep 16 14:41:40 UTC 2026
On Tue, Sep 15, 2026 at 02:55:36PM +0200, Aleksandr Loktionov wrote:
> From: Alexander Duyck <alexander.h.duyck at intel.com>
>
> Add an ixgbe_container_is_rx() helper to cleanly distinguish RX from TX
> ring containers inside ixgbe_update_itr().
>
> Refine the RX-specific latency-detection path:
>
> - Replace the shared "packets < 4 or bytes < 9000" threshold with an
> RX-specific check of "1..23 packets and bytes < 12112". When that
> condition holds, target 8x the observed byte count in the next
> interval by computing avg_wire_size = (bytes + packets * 24) * 2,
> clamped to [2560, 12800], and jumping directly to the speed-based
> ITR calculation. This provides finer-grained control over low-rate
> RX latency workloads without affecting TX.
>
> - Remove the separate "no packets" special-case block. When packets
> is 0 it falls into the "< 48" branch. The mode-tracking logic in
> that branch is extended: fewer than 8 packets forces latency mode;
> 8..47 packets preserves the current mode. This replaces the old
> unconditional "add LATENCY flag from ring_container->itr" carried
> over from the removed block.
>
> - Remove the adjust_by_size label and the associated "halve
> avg_wire_size in latency mode" step. The Rx latency path now
> pre-calculates avg_wire_size independently and the bulk path no
> longer needs the halving to compensate for incorrect thresholds.
> Rename the jump target to adjust_for_speed to reflect its purpose.
>
> Signed-off-by: Alexander Duyck <alexander.h.duyck at intel.com>
> Signed-off-by: Aleksandr Loktionov <aleksandr.loktionov at intel.com>
Reviewed-by: Simon Horman <horms at kernel.org>
More information about the Intel-wired-lan
mailing list