Netdev List
 help / color / mirror / Atom feed
From: Lorenzo Bianconi <lorenzo@kernel.org>
To: Aniket Negi <aniket.negi03@gmail.com>
Cc: netdev@vger.kernel.org, aniket.negi@airoha.com
Subject: Re: [PATCH net v4] net: airoha: fix MIB stats collection to be lossless
Date: Tue, 7 Jul 2026 16:07:17 +0200	[thread overview]
Message-ID: <ak0IFdwz1rDEekOO@lore-desk> (raw)
In-Reply-To: <20260707132117.94902-1-aniket.negi03@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1418 bytes --]

> Hi Lorenzo,
> Thanks for the review.
> 
> > > +	for (i = AIROHA_GDM1_IDX; i <= AIROHA_GDM4_IDX; i++)
> > > +		airoha_fe_set(eth, REG_FE_GDM_MIB_CLEAR(i),
> > > +			      FE_GDM_MIB_RX_CLEAR_MASK | FE_GDM_MIB_TX_CLEAR_MASK);
> >
> > This configuration is not needed since we reset FE at module load.
> 
> Agreed. The SCU FE reset clears MIB counters, so the explicit loop
> is redundant. Will drop it in v5.
> 
> On Mon, 2 Jul 2026 22:59:32 +0000, Sashiko <sashiko@kernel.org> wrote:
> > With this patch the driver no longer has any users of
> > REG_FE_GDM_MIB_CLEAR, FE_GDM_MIB_RX_CLEAR_MASK or
> > FE_GDM_MIB_TX_CLEAR_MASK; grep in drivers/net/ethernet/airoha/
> > matches only the definitions in airoha_regs.h. Should these macros
> > be removed in the same patch that eliminates their only caller?
> 
> What is your suggestions here, I prefer that definitions should 
> be retained in airoha_regs.h as register documentation for future 
> reference. Only the loop will be dropped.

correct.

Regards,
Lorenzo

> 
> > nit: tmp is not so meaningful, maybe better something like data?
> > nit: I would prefer "+" instead of "|"
> > nit: please drop prev and just do:
> >       dev->stats.tx_ok_pkts = max(data, dev->stats.tx_ok_pkts);
> > please redo it for all the occurrences.
> 
> Understood. Will rename tmp to data, and use '+' instead of '|' in v5.
> 
> Thanks,
> Aniket

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

      reply	other threads:[~2026-07-07 14:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-06 15:47 [PATCH net v4] net: airoha: fix MIB stats collection to be lossless Aniket Negi
2026-07-06 16:05 ` Aniket Negi
2026-07-06 21:23 ` Lorenzo Bianconi
2026-07-07 13:21   ` Aniket Negi
2026-07-07 14:07     ` Lorenzo Bianconi [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=ak0IFdwz1rDEekOO@lore-desk \
    --to=lorenzo@kernel.org \
    --cc=aniket.negi03@gmail.com \
    --cc=aniket.negi@airoha.com \
    --cc=netdev@vger.kernel.org \
    /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