[PATCH] net/ixgbe: fix flow control frame byte adjustment
Bruce Richardson
bruce.richardson at intel.com
Tue May 19 16:50:12 CEST 2026
On Tue, May 19, 2026 at 03:44:41PM +0100, Bruce Richardson wrote:
> On Mon, May 04, 2026 at 05:55:02PM +0300, Daniil Iskhakov wrote:
> > LXONTXC and LXOFFTXC are 32-bit counters for transmitted XON and
> > XOFF packets. ixgbe_read_stats_registers() sums their deltas and uses
> > the result to adjust the transmitted byte counters by the minimum
> > Ethernet frame length.
> >
> > The sum is currently computed as:
> >
> > total = lxon + lxoff
> >
> > Since both operands are 32-bit, the addition is performed in 32 bits
> > and may wrap before the result is stored in total. The wrapped value is
> > then used in the byte adjustment, which may make the software byte
> > counters incorrect.
> >
> > Make total 64-bit and cast lxon before the addition so the XON/XOFF
> > packet sum and the following byte adjustment are computed without
> > 32-bit overflow.
> >
> > Found by Linux Verification Center (linuxtesting.org) with SVACE.
> >
> > Fixes: af75078fece3 ("first public release")
> > Cc: stable at dpdk.org
> >
> > Signed-off-by: Daniil Iskhakov <dish at amicon.ru>
> Acked-by: Bruce Richardson <bruce.richardson at intel.com>
>
Applied to dpdk-next-net-intel.
Thanks,
/Bruce
More information about the stable
mailing list