[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220315184526.3e15e3ee@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
Date: Tue, 15 Mar 2022 18:45:26 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Michal Kubecek <mkubecek@...e.cz>
Cc: Jie Wang <wangjie125@...wei.com>, davem@...emloft.net,
netdev@...r.kernel.org, huangguangbin2@...wei.com,
lipeng321@...wei.com, shenjian15@...wei.com, moyufeng@...wei.com,
linyunsheng@...wei.com, tanhuazhong@...wei.com,
salil.mehta@...wei.com, chenhao288@...ilicon.com
Subject: Re: [RFC net-next 1/2] net: ethtool: add ethtool ability to set/get
fresh device features
On Tue, 15 Mar 2022 20:56:06 +0100 Michal Kubecek wrote:
> On Tue, Mar 15, 2022 at 12:15:29PM -0700, Jakub Kicinski wrote:
> > On Tue, 15 Mar 2022 11:21:07 +0800 Jie Wang wrote:
> > > As tx push is a standard feature for NICs, but netdev_feature which is
> > > controlled by ethtool -K has reached the maximum specification.
> > >
> > > so this patch adds a pair of new ethtool messages:'ETHTOOL_GDEVFEAT' and
> > > 'ETHTOOL_SDEVFEAT' to be used to set/get features contained entirely to
> > > drivers. The message processing functions and function hooks in struct
> > > ethtool_ops are also added.
> > >
> > > set-devfeatures/show-devfeatures option(s) are designed to provide set
> > > and get function.
> > > set cmd:
> > > root@wj: ethtool --set-devfeatures eth4 tx-push [on | off]
> > > get cmd:
> > > root@wj: ethtool --show-devfeatures eth4
> >
> > I'd be curious to hear more opinions on whether we want to create a new
> > command or use another method for setting this bit, and on the concept
> > of "devfeatures" in general.
>
> IMHO it depends a lot on what exactly "belong entirely to the driver"
> means. If it means driver specific features, using a private flag would
> seem more appropriate for this particular feature and then we can
> discuss if we want some generalization of private flags for other types
> of driver/device specific parameters (integers etc.). Personally, I'm
> afraid that it would encourage driver developers to go this easier way
> instead of trying to come with universal and future proof interfaces.
The "belong entirely to the driver" meant that the stack does not need
to be aware of it. That's the justification for not putting it in
netdev features, which the stack also peeks at, at times.
> If this is supposed to gather universal features supported by multiple
> drivers and devices, I suggest grouping it with existing parameters
> handled as tunables in ioctl API. Or perhaps we could keep using the
> name "tunables" and just handle them like any other command parameters
> encoded as netlink attributes in the API.
Let's throw tunables into the hell fire where they belong, lest they
spawn a monster in the image of devlink params.
How about we put it in SET_RINGS? It's a ring param after all
(the feature controls use of a fast path descriptor push which
skips the usual in-memory ring).
Powered by blists - more mailing lists