public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Moon Yeounsu <yyyynoom@gmail.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next v6] net: dlink: add support for reporting stats via `ethtool -S` and `ip -s -s link show`
Date: Tue, 8 Apr 2025 07:12:04 +0900	[thread overview]
Message-ID: <Z_RNtOY5PPS5A9v4@mythos-cloud> (raw)
In-Reply-To: <122f35a6-a8b6-446a-a76d-9b761c716dfe@lunn.ch>

On Mon, Apr 07, 2025 at 10:43:41PM +0200, Andrew Lunn wrote:

> That is an odd way of doing it. It would be better to repeat the
> static const struct dlink_stats.

Oh, I see — sorry about that. I wasn’t aware it might be considered an odd approach.
If you don’t mind, could you please explain a bit more about why it seems problematic to you?

Let me briefly share my reasoning behind the current design:
Each ethtool stats function (e.g., get_ethtool_XXX) gathers a specific group of related statistics.
You can see this grouping in action in my patch.
So, I thought managing each stat group in that way would make the code more intuitive,
and help simplify the logic for developers who use or extend it.

I'm still new to kernel development, so there are many things I don't fully understand yet.
I'd appreciate it if you could feel free to point out anything.

Thank you for reviewing my patch!

  reply	other threads:[~2025-04-07 22:12 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-07 13:49 [PATCH net-next v6] net: dlink: add support for reporting stats via `ethtool -S` and `ip -s -s link show` Moon Yeounsu
2025-04-07 20:43 ` Andrew Lunn
2025-04-07 22:12   ` Moon Yeounsu [this message]
2025-04-08 12:31     ` Andrew Lunn
2025-04-07 20:48 ` Andrew Lunn
2025-04-07 22:57   ` Moon Yeounsu
2025-04-08 12:37     ` Andrew Lunn

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=Z_RNtOY5PPS5A9v4@mythos-cloud \
    --to=yyyynoom@gmail.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /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