netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Dumazet <edumazet@google.com>
To: nick black <dankamongmen@gmail.com>
Cc: Jakub Kicinski <kuba@kernel.org>,
	netdev@vger.kernel.org, Florian Fainelli <f.fainelli@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	Jeffrey Ji <jeffreyji@google.com>,
	Willem de Bruijn <willemdebruijn.kernel@gmail.com>
Subject: Re: [PATCH] [net] add rx_otherhost_dropped sysfs entry
Date: Mon, 27 Feb 2023 19:35:18 +0100	[thread overview]
Message-ID: <CANn89iLPW5P62sd6N15OwhOHaPDdRCge7nJHjDyKWXRnky4ywg@mail.gmail.com> (raw)
In-Reply-To: <Y/z2olg1C4jKD5m9@schwarzgerat.orthanc>

On Mon, Feb 27, 2023 at 7:29 PM nick black <dankamongmen@gmail.com> wrote:
>
> Jakub Kicinski left as an exercise for the reader:
> > "All the other stats are there" is not a strong enough reason
> > to waste memory on all systems. You need to justify the change
> > based on how important the counter is. I'd prefer to draw a
> > line on adding the sysfs stats entries. We don't want to have
> > to invent a new stats struct just to avoid having sysfs entries
> > for each stat.
>
> In that case, I think a comment here is warranted explaining why
> this stat, out of 24 total, isn't important enough to reproduce
> in sysfs. I'm not sure what this comment would be:
> rx_otherhost_dropped certainly seems as useful as, say
> rx_compressed (only valid on e.g. CSLIP and PPP).
>
> If this stat is left out of the sysfs interface, I'm likely to
> just grab the rtnl_link_stats64 directly via netlink, and forgo
> the sysfs interface entirely. If, in a modern switched world,
> I'm receiving many packets destined for other hosts, that's at
> least as interesting to me as several other classes of RX error.

We do not want to add more sysfs files, unless absolutely needed.

This sysfs thing adds costs at every interface creation and dismantle,
even if the sysfs file is never to be used.

netlink is the primary interface, sysfs is legacy from old days.
netlink code is basically free if code is not run.

So please, forget about sysfs, and switch to netlink :)

  reply	other threads:[~2023-02-27 18:35 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-25 21:12 [PATCH] [net] add rx_otherhost_dropped sysfs entry nick black
2023-02-27 18:23 ` Jakub Kicinski
2023-02-27 18:29   ` nick black
2023-02-27 18:35     ` Eric Dumazet [this message]
2023-02-27 18:40     ` Jakub Kicinski
2023-02-28 12:59       ` nick black
2023-02-28 13:08       ` nick black
2023-02-28 20:33         ` 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:
  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=CANn89iLPW5P62sd6N15OwhOHaPDdRCge7nJHjDyKWXRnky4ywg@mail.gmail.com \
    --to=edumazet@google.com \
    --cc=dankamongmen@gmail.com \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=jeffreyji@google.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=willemdebruijn.kernel@gmail.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).