[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANn89iLPW5P62sd6N15OwhOHaPDdRCge7nJHjDyKWXRnky4ywg@mail.gmail.com>
Date: Mon, 27 Feb 2023 19:35:18 +0100
From: Eric Dumazet <edumazet@...gle.com>
To: nick black <dankamongmen@...il.com>
Cc: Jakub Kicinski <kuba@...nel.org>, netdev@...r.kernel.org,
Florian Fainelli <f.fainelli@...il.com>,
"David S. Miller" <davem@...emloft.net>,
Jeffrey Ji <jeffreyji@...gle.com>,
Willem de Bruijn <willemdebruijn.kernel@...il.com>
Subject: Re: [PATCH] [net] add rx_otherhost_dropped sysfs entry
On Mon, Feb 27, 2023 at 7:29 PM nick black <dankamongmen@...il.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 :)
Powered by blists - more mailing lists