DPDK-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: Daniil Iskhakov <dish@amicon.ru>
Cc: Anatoly Burakov <anatoly.burakov@intel.com>,
	Vladimir Medvedkin <vladimir.medvedkin@intel.com>,
	Konstantin Ananyev <konstantin.ananyev@huawei.com>,
	<dev@dpdk.org>, <stable@dpdk.org>, <sdl.dpdk@linuxtesting.org>,
	<rrv@amicon.ru>
Subject: Re: [PATCH] net/ixgbe: fix queue received bytes CRC adjustment
Date: Wed, 6 May 2026 16:59:20 +0100	[thread overview]
Message-ID: <aftlWPd7gVmOGJim@bricha3-mobl1.ger.corp.intel.com> (raw)
In-Reply-To: <20260504122623.37067-1-dish@amicon.ru>

On Mon, May 04, 2026 at 03:26:23PM +0300, Daniil Iskhakov wrote:
> For 82599, QBRC is a 36-bit clear-on-read counter, while
> QPRC is a 32-bit clear-on-read counter. ixgbe_read_stats_registers()
> accumulates QBRC in a 64-bit software counter and, when CRC stripping
> is disabled, subtracts the CRC bytes accounted for each received packet.
> 
> The CRC adjustment is computed as:
> 
> 	delta_qprc * RTE_ETHER_CRC_LEN
> 
> Since delta_qprc is 32-bit, the multiplication is performed in 32 bits
> and may wrap before the result is subtracted from the 64-bit QBRC
> accumulator. A full 32-bit packet delta needs more than 32 bits to
> represent the CRC-byte adjustment.
> 
> Cast delta_qprc to uint64_t before the multiplication so the adjustment
> is computed with the same effective width as the byte counter.
> 
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
> 
> Fixes: c03fcee9abbd ("ixgbe: remove CRC size from byte counters")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Daniil Iskhakov <dish@amicon.ru>
> ---

Acked-by: Bruce Richardson <bruce.richardson@intel.com>

Applied to dpdk-next-net-intel.

Thanks,
/Bruce


      reply	other threads:[~2026-05-06 15:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-04 12:26 [PATCH] net/ixgbe: fix queue received bytes CRC adjustment Daniil Iskhakov
2026-05-06 15:59 ` Bruce Richardson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aftlWPd7gVmOGJim@bricha3-mobl1.ger.corp.intel.com \
    --to=bruce.richardson@intel.com \
    --cc=anatoly.burakov@intel.com \
    --cc=dev@dpdk.org \
    --cc=dish@amicon.ru \
    --cc=konstantin.ananyev@huawei.com \
    --cc=rrv@amicon.ru \
    --cc=sdl.dpdk@linuxtesting.org \
    --cc=stable@dpdk.org \
    --cc=vladimir.medvedkin@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox