lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d7fce582-4eb7-9b66-8a19-dd7633154a72@huawei.com>
Date:   Mon, 21 Mar 2022 14:17:16 +0800
From:   "wangjie (L)" <wangjie125@...wei.com>
To:     Jakub Kicinski <kuba@...nel.org>, Michal Kubecek <mkubecek@...e.cz>
CC:     <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 2022/3/16 9:45, Jakub Kicinski wrote:
> 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).
>
I think SET_RINGS is OK for tx push, but next new device feature would
still have this problem. As far as I know, features such as promisc,
tx push are driver features. So should I still work on the new devfeature
command netlink version for these standard driver features?

It would be nice to have clear rules about which command does new feature
need to be added to.
> .
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ