lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 23 Apr 2024 17:58:08 -0700
From: Michael Chan <michael.chan@...adcom.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: davem@...emloft.net, netdev@...r.kernel.org, edumazet@...gle.com, 
	pabeni@...hat.com, edwin.peer@...adcom.com
Subject: Re: [PATCH net] eth: bnxt: fix counting packets discarded due to OOM
 and netpoll

On Tue, Apr 23, 2024 at 5:21 PM Jakub Kicinski <kuba@...nel.org> wrote:
>
> I added OOM and netpoll discard counters, naively assuming that
> the cpr pointer is pointing to a common completion ring.
> Turns out that is usually *a* completion ring but not *the*
> completion ring which bnapi->cp_ring points to. bnapi->cp_ring
> is where the stats are read from, so we end up reporting 0
> thru ethtool -S and qstat even though the drop events have happened.
> Make 100% sure we're recording statistics in the correct structure.
>
> Fixes: 907fd4a294db ("bnxt: count discards due to memory allocation errors")
> Signed-off-by: Jakub Kicinski <kuba@...nel.org>

Yes, on the newer chips, we have 2 cpr pointers and the correct one
must be used for the sw_stats.  We actually have a patch that changes
cpr->sw_stats to a pointer so that both cpr can share the same
sw_stats structure.  This reminds me to post that patch soon to avoid
this type of confusion in the future.  Thanks.

Reviewed-by: Michael Chan <michael.chan@...adcom.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ