> -----Original Message-----
> From: Intel-wired-lan <[email protected]> On Behalf Of 
> Aleksandr Loktionov
> Sent: Wednesday, April 8, 2026 6:12 AM
> To: [email protected]; Nguyen, Anthony L 
> <[email protected]>; Loktionov, Aleksandr 
> <[email protected]>
> Cc: [email protected]
> Subject: [Intel-wired-lan] [PATCH iwl-next v2 2/8] ixgbe: add 
> ixgbe_container_is_rx() helper and refine RX adaptive ITR
> 
> From: Alexander Duyck <[email protected]>
> 
> 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 <[email protected]>
> Signed-off-by: Aleksandr Loktionov <[email protected]>
> ---
> v1 -> v2:
>  - Split from monolithic ITR cleanup; adds ixgbe_container_is_rx(),
>    refines RX latency thresholds (24 pkts / 12112 B), and removes the
>    separate no-packet and adjust_by_size code paths.
> 
>  drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 72 ++++++++++--------
>  1 file changed, 41 insertions(+), 31 deletions(-)

Tested-by: Alexander Nowlin <[email protected]>

Reply via email to