From: Aniket Negi <aniket.negi03@gmail.com>
To: netdev@vger.kernel.org, lorenzo@kernel.org
Cc: aniket.negi@airoha.com
Subject: Re: [PATCH net v4] net: airoha: fix MIB stats collection to be lossless
Date: Tue, 7 Jul 2026 18:51:05 +0530 [thread overview]
Message-ID: <20260707132117.94902-1-aniket.negi03@gmail.com> (raw)
In-Reply-To: <akwczc23LOGbKfMl@lore-desk>
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.
> 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
next prev parent reply other threads:[~2026-07-07 13:21 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 [this message]
2026-07-07 14:07 ` Lorenzo Bianconi
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=20260707132117.94902-1-aniket.negi03@gmail.com \
--to=aniket.negi03@gmail.com \
--cc=aniket.negi@airoha.com \
--cc=lorenzo@kernel.org \
--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