From: Jiri Pirko <jiri@resnulli.us>
To: David Miller <davem@davemloft.net>
Cc: mkubecek@suse.cz, netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH 2/9] ethtool: introduce ethtool netlink interface
Date: Mon, 11 Dec 2017 19:02:19 +0100 [thread overview]
Message-ID: <20171211180219.GB2047@nanopsycho> (raw)
In-Reply-To: <20171211.115651.1046181633998981619.davem@davemloft.net>
Mon, Dec 11, 2017 at 05:56:51PM CET, davem@davemloft.net wrote:
>From: Jiri Pirko <jiri@resnulli.us>
>Date: Mon, 11 Dec 2017 17:02:21 +0100
>
>> Mon, Dec 11, 2017 at 02:53:31PM CET, mkubecek@suse.cz wrote:
>>>No function implemented yet, only genetlink and module infrastructure.
>>>Register/unregister genetlink family "ethtool" and allow the module to be
>>>autoloaded by genetlink code (if built as a module, distributions would
>>>probably prefer "y").
>>>
>>>Signed-off-by: Michal Kubecek <mkubecek@suse.cz>
>>
>> [...]
>>
>>
>>>+
>>>+/* identifies the device to query/set
>>>+ * - use either ifindex or ifname, not both
>>>+ * - for dumps and messages not related to a particular devices, fill neither
>>>+ * - info_mask is a bitfield, interpretation depends on the command
>>>+ */
>>>+struct ethnlmsghdr {
>>>+ __u32 ifindex; /* device ifindex */
>>>+ __u16 flags; /* request/response flags */
>>>+ __u16 info_mask; /* request/response info mask */
>>>+ char ifname[IFNAMSIZ]; /* device name */
>>
>> Why do you need this header? You can have 2 attrs:
>> ETHTOOL_ATTR_IFINDEX and
>> ETHTOOL_ATTR_IFNAME
>>
>> Why do you need per-command flags and info_mask? Could be bitfield
>> attr if needed by specific command.
>
>Jiri, we've had this discussion before :-)
>
>For elements which are common to most, if not all, requests it makes
>sense to define a base netlink message.
>
>My opinion on this matter has not changed at all since the last time
>we discussed this.
The discussion we had before was about flag bitfield that was there
*always*. In this case, that is not true. It is either ifindex or
ifname. Even rtnetlink has ifname as attribute.
The flags and info_mask is just big mystery. If it is per-command,
seems natural to have it as attributes.
>
>So unless you have new information to provide to me on this issue
>which might change my mind, please accept the result of the previous
>discussion which is that a base netlink message is not only
>appropriate but desirable.
>
>Thank you.
next prev parent reply other threads:[~2017-12-11 18:02 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-11 13:53 [RFC PATCH 0/9] ethtool netlink interface (WiP) Michal Kubecek
2017-12-11 13:53 ` [RFC PATCH 1/9] netlink: introduce nla_put_bitfield32() Michal Kubecek
2017-12-11 13:53 ` [RFC PATCH 2/9] ethtool: introduce ethtool netlink interface Michal Kubecek
2017-12-11 16:02 ` Jiri Pirko
2017-12-11 16:56 ` David Miller
2017-12-11 18:02 ` Jiri Pirko [this message]
2017-12-11 18:45 ` David Miller
2017-12-12 23:56 ` Michal Kubecek
2017-12-11 13:53 ` [RFC PATCH 3/9] ethtool: helper functions for " Michal Kubecek
2017-12-11 13:53 ` [RFC PATCH 4/9] ethtool: netlink bitset handling Michal Kubecek
2017-12-11 13:54 ` [RFC PATCH 5/9] ethtool: implement GET_DRVINFO message Michal Kubecek
2017-12-11 16:16 ` Jiri Pirko
2017-12-12 23:54 ` Michal Kubecek
2017-12-13 6:57 ` Jiri Pirko
2017-12-11 13:54 ` [RFC PATCH 6/9] ethtool: implement GET_SETTINGS message Michal Kubecek
2017-12-11 13:54 ` [RFC PATCH 7/9] ethtool: implement SET_SETTINGS message Michal Kubecek
2017-12-11 13:54 ` [RFC PATCH 8/9] ethtool: implement GET_PARAMS message Michal Kubecek
2017-12-11 13:54 ` [RFC PATCH 9/9] ethtool: implement SET_PARAMS message Michal Kubecek
2017-12-11 16:32 ` [RFC PATCH 0/9] ethtool netlink interface (WiP) Jiri Pirko
2017-12-11 17:01 ` David Miller
2017-12-11 17:59 ` Jiri Pirko
2017-12-11 19:03 ` Florian Fainelli
2017-12-12 15:32 ` Roopa Prabhu
2017-12-12 23:47 ` Jakub Kicinski
2017-12-14 21:07 ` John W. Linville
2017-12-18 19:39 ` David Miller
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=20171211180219.GB2047@nanopsycho \
--to=jiri@resnulli.us \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=mkubecek@suse.cz \
--cc=netdev@vger.kernel.org \
/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).