[Intel-wired-lan] [PATCH iwl-net v5 3/4] ixgbe: fix ITR value overflow in adaptive interrupt throttling

Rinitha, SX sx.rinitha at intel.com
Thu Jul 30 07:42:19 UTC 2026


> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces at osuosl.org> On Behalf Of Aleksandr Loktionov
> Sent: 16 May 2026 00:34
> To: intel-wired-lan at lists.osuosl.org; Nguyen, Anthony L <anthony.l.nguyen at intel.com>; Loktionov, Aleksandr <aleksandr.loktionov at intel.com>
> Cc: netdev at vger.kernel.org; Simon Horman <horms at kernel.org>
> Subject: [Intel-wired-lan] [PATCH iwl-net v5 3/4] ixgbe: fix ITR value overflow in adaptive interrupt throttling
>
> ixgbe_update_itr() packs a mode flag (IXGBE_ITR_ADAPTIVE_LATENCY, bit 7) and a usecs delay (bits [6:0]) into an unsigned int, then stores the combined value in ring_container->itr which is declared as u8.  Values above 0xFF wrap on truncation, > corrupting both the delay and the mode flag on the next readback.
>
> Keep the mode bit (IXGBE_ITR_ADAPTIVE_LATENCY) and the usec delay as separate operands in the final store expression.  Clamp only the usecs portion to [IXGBE_ITR_ADAPTIVE_MIN_USECS, IXGBE_ITR_ADAPTIVE_MAX_USECS] using clamp_val() so that:
> - overflow cannot bleed into the mode bit (bit 7),
> - the delay cannot exceed 126 us (IXGBE_ITR_ADAPTIVE_MAX_USECS),
> - the delay cannot drop below 10 us (IXGBE_ITR_ADAPTIVE_MIN_USECS).
>
> Fixes: b4ded8327fea ("ixgbe: Update adaptive ITR algorithm")
> Cc: stable at vger.kernel.org
> Signed-off-by: Aleksandr Loktionov <aleksandr.loktionov at intel.com>
> Reviewed-by: Simon Horman <horms at kernel.org>
> ---
> v2 -> v3:
> - Use clamp_val() instead of min_t() to also guard the lower bound
>   (IXGBE_ITR_ADAPTIVE_MIN_USECS); keep mode and delay as separate
>   operands until final store; use IXGBE_ITR_ADAPTIVE_MAX_USECS (126)
>   as upper bound instead of IXGBE_ITR_ADAPTIVE_LATENCY - 1 (127)
>   (Simon Horman).
>
> v1 -> v2:
> - Add proper [N/M] numbering so patchwork tracks it as part of the set;
>   no code change.
>
> drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 10 +++++++---
> 1 file changed, 8 insertions(+), 2 deletions(-)
>

Tested-by: Rinitha S <sx.rinitha at intel.com> (A Contingent worker at Intel)


More information about the Intel-wired-lan mailing list