Netdev Archive on
help / color / mirror / Atom feed
From: Jakub Kicinski <>
To: Michael Chan <>
Cc: David Miller <>,
	Netdev <>,
Subject: Re: [PATCH net-next v3 2/3] bnxt: count packets discarded because of netpoll
Date: Thu, 26 Aug 2021 18:15:10 -0700	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

On Thu, 26 Aug 2021 14:17:45 -0700 Michael Chan wrote:
> On Thu, Aug 26, 2021 at 12:18 PM Jakub Kicinski <> wrote:
> > On Thu, 26 Aug 2021 11:43:58 -0700 Michael Chan wrote:  
> > > Can we just add these rx_netpoll_discards counters directly to
> > > stats->rx_dropped?  It looks simpler if we do it that way, right?  
> >
> > To make sure - are you saying that instead of adding
> >
> >         struct bnxt_sw_stats    sw_stats_prev;
> >
> > we should accumulate in net_stats_prev->rx_dropped, and have
> > the ethtool counter only report the discards since last down/up?
> >
> > Or to use the atomic counter on the netdev and never report
> > in ethtool (since after patch 3 rx_dropped is a mix of reasons)?  
> OK.  I've reviewed the patch again and you need to keep the previous
> netpoll discard counter so that you can report the total current and
> previous netpoll discard counter under ethtool -S.
> My suggestion would lump the previous netpoll discard counter into the
> previous rx_dropped counter and you can only report the current
> netpoll discard counter under ethtool -S.  But note that all the ring
> related counters we currently report are current counters and do not
> include old counters before the last reset.

Oh, [rt]x_total_discard_pkts are also just a sum of current counters?
I missed that. In that case if netpoll discards reset it's not a big
deal, I'll respin the patch tomorrow. Let me also rename from
rx_netpoll_discards to rx_total_netpoll_discards, adding the "total_"
will hopefully signal the similarity of semantics?

  reply	other threads:[~2021-08-27  1:15 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-26 13:12 [PATCH net-next v3 0/3] bnxt: add rx discards stats for oom and netpool Jakub Kicinski
2021-08-26 13:12 ` [PATCH net-next v3 1/3] bnxt: reorder logic in bnxt_get_stats64() Jakub Kicinski
2021-08-26 13:12 ` [PATCH net-next v3 2/3] bnxt: count packets discarded because of netpoll Jakub Kicinski
2021-08-26 18:43   ` Michael Chan
2021-08-26 19:18     ` Jakub Kicinski
2021-08-26 21:17       ` Michael Chan
2021-08-27  1:15         ` Jakub Kicinski [this message]
2021-08-26 13:12 ` [PATCH net-next v3 3/3] bnxt: count discards due to memory allocation errors Jakub Kicinski

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:

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

  git send-email \ \ \ \ \ \ \

* 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;
as well as URLs for NNTP newsgroup(s).