netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Alexander Lobakin <aleksander.lobakin@intel.com>
Cc: Tony Nguyen <anthony.l.nguyen@intel.com>, <davem@davemloft.net>,
	<pabeni@redhat.com>, <edumazet@google.com>,
	<netdev@vger.kernel.org>, <przemyslaw.kitszel@intel.com>,
	<joshua.a.hay@intel.com>, <michal.kubiak@intel.com>,
	<nex.sw.ncis.osdt.itp.upstreaming@intel.com>
Subject: Re: [PATCH net-next v2 2/9] libeth: add common queue stats
Date: Wed, 28 Aug 2024 13:22:35 -0700	[thread overview]
Message-ID: <20240828132235.0e701e53@kernel.org> (raw)
In-Reply-To: <ea4b0892-a087-4931-bc3a-319255d85038@intel.com>

On Wed, 28 Aug 2024 17:06:17 +0200 Alexander Lobakin wrote:
> >> The stats I introduced here are supported by most, if not every, modern
> >> NIC drivers. Not supporting header split or HW GRO will save you 16
> >> bytes on the queue struct which I don't think is a game changer.  
> > 
> > You don't understand. I built some infra over the last 3 years.
> > You didn't bother reading it. Now you pop our own thing to the side,
> > extending ethtool -S which is _unusable_ in a multi-vendor, production
> > environment.  
> 
> I read everything at the time you introduced it. I remember Ethernet
> standard stats, rmon, per-queue generic stats etc. I respect it and I
> like it.
> So just let me repeat my question so that all misunderstandings are
> gone: did I get it correctly that instead of adding Ethtool stats, I
> need to add new fields to the per-queue Netlink stats? I clearly don't
> have any issues with that and I'll be happy to drop Ethtool stats from
> the lib at all.

That's half of it, the other half is excess of macro magic.

> (except XDP stats, they still go to ethtool -S for now? Or should I try
> making them generic as well?)

Either way is fine by me. You may want to float the XDP stats first as
a smaller series, just extending the spec and exposing from some driver
already implementing qstat. In case someone else does object.

> >> * reduce boilerplate code in drivers: declaring stats structures,
> >> Ethtool stats names, all these collecting, aggregating etc etc, you see
> >> in the last commit of the series how many LoCs get deleted from idpf,
> >> +/- the same amount would be removed from any other driver  
> > 
> >  21 files changed, 1634 insertions(+), 1002 deletions(-)  
> 
> Did you notice my "in the last commit"?

I may not have. But as you said, most drivers end up with some level of
boilerplate around stats. So unless the stuff is used by more than one
driver, and the savings are realized, the argument about saving LoC has
to be heavily discounted. Queue xkcd 927. I should reiterate that 
I don't think LoC saving is a strong argument in the first place.

  reply	other threads:[~2024-08-28 20:22 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-19 22:34 [PATCH net-next v2 0/9][pull request] idpf: XDP chapter II: convert Tx completion to libeth Tony Nguyen
2024-08-19 22:34 ` [PATCH net-next v2 1/9] unroll: add generic loop unroll helpers Tony Nguyen
2024-08-21  0:55   ` Jakub Kicinski
2024-08-22 15:15     ` Alexander Lobakin
2024-08-22 22:59       ` Jakub Kicinski
2024-08-22 23:35         ` Tony Nguyen
2024-08-23 12:37         ` Alexander Lobakin
2024-08-19 22:34 ` [PATCH net-next v2 2/9] libeth: add common queue stats Tony Nguyen
2024-08-21  1:17   ` Jakub Kicinski
2024-08-22 15:13     ` Alexander Lobakin
2024-08-22 23:17       ` Jakub Kicinski
2024-08-23 12:59         ` Alexander Lobakin
2024-08-27  1:09           ` Jakub Kicinski
2024-08-27 15:31             ` Alexander Lobakin
2024-08-27 18:29               ` Jakub Kicinski
2024-08-28 15:06                 ` Alexander Lobakin
2024-08-28 20:22                   ` Jakub Kicinski [this message]
2024-08-29 12:01                     ` Alexander Lobakin
2024-08-29 14:39                       ` Jakub Kicinski
2024-08-19 22:34 ` [PATCH net-next v2 3/9] libie: add Tx buffer completion helpers Tony Nguyen
2024-08-19 22:34 ` [PATCH net-next v2 4/9] idpf: convert to libie Tx buffer completion Tony Nguyen
2024-08-19 22:34 ` [PATCH net-next v2 5/9] netdevice: add netdev_tx_reset_subqueue() shorthand Tony Nguyen
2024-08-19 22:34 ` [PATCH net-next v2 6/9] idpf: refactor Tx completion routines Tony Nguyen
2024-08-19 22:34 ` [PATCH net-next v2 7/9] idpf: fix netdev Tx queue stop/wake Tony Nguyen
2024-08-19 22:34 ` [PATCH net-next v2 8/9] idpf: enable WB_ON_ITR Tony Nguyen
2024-08-19 22:34 ` [PATCH net-next v2 9/9] idpf: switch to libeth generic statistics Tony Nguyen

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=20240828132235.0e701e53@kernel.org \
    --to=kuba@kernel.org \
    --cc=aleksander.lobakin@intel.com \
    --cc=anthony.l.nguyen@intel.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=joshua.a.hay@intel.com \
    --cc=michal.kubiak@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=nex.sw.ncis.osdt.itp.upstreaming@intel.com \
    --cc=pabeni@redhat.com \
    --cc=przemyslaw.kitszel@intel.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;
as well as URLs for NNTP newsgroup(s).