netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Michal Kubecek <mkubecek@suse.cz>
Cc: Jie Wang <wangjie125@huawei.com>,
	davem@davemloft.net, netdev@vger.kernel.org,
	huangguangbin2@huawei.com, lipeng321@huawei.com,
	shenjian15@huawei.com, moyufeng@huawei.com,
	linyunsheng@huawei.com, tanhuazhong@huawei.com,
	salil.mehta@huawei.com, chenhao288@hisilicon.com
Subject: Re: [RFC net-next 1/2] net: ethtool: add ethtool ability to set/get fresh device features
Date: Tue, 15 Mar 2022 18:45:26 -0700	[thread overview]
Message-ID: <20220315184526.3e15e3ee@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> (raw)
In-Reply-To: <20220315195606.ggc3eea6itdiu6y7@lion.mk-sys.cz>

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).

  reply	other threads:[~2022-03-16  1:45 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-15  3:21 [RFC net-next 0/2] add ethtool ops support for fresh device features Jie Wang
2022-03-15  3:21 ` [RFC net-next 1/2] net: ethtool: add ethtool ability to set/get " Jie Wang
2022-03-15 19:15   ` Jakub Kicinski
2022-03-15 19:56     ` Michal Kubecek
2022-03-16  1:45       ` Jakub Kicinski [this message]
2022-03-21  6:17         ` wangjie (L)
2022-03-21 18:20           ` Jakub Kicinski
2022-03-15 20:03     ` Roopa Prabhu
2022-03-16  1:40       ` Jakub Kicinski
2022-03-15 19:18   ` Michal Kubecek
2022-03-18  6:28     ` wangjie (L)
2022-03-15  3:21 ` [RFC net-next 2/2] net: hns3: add ethtool set/get device features support for hns3 driver Jie Wang

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=20220315184526.3e15e3ee@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com \
    --to=kuba@kernel.org \
    --cc=chenhao288@hisilicon.com \
    --cc=davem@davemloft.net \
    --cc=huangguangbin2@huawei.com \
    --cc=linyunsheng@huawei.com \
    --cc=lipeng321@huawei.com \
    --cc=mkubecek@suse.cz \
    --cc=moyufeng@huawei.com \
    --cc=netdev@vger.kernel.org \
    --cc=salil.mehta@huawei.com \
    --cc=shenjian15@huawei.com \
    --cc=tanhuazhong@huawei.com \
    --cc=wangjie125@huawei.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).