[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACKFLikEhVAJA+osD7UjQNotdGte+fth7zOy7yDdLkTyFk9Pyw@mail.gmail.com>
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