From: Michal Kubecek <mkubecek@suse.cz>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Huazhong Tan <tanhuazhong@huawei.com>,
davem@davemloft.net, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, linuxarm@huawei.com,
kuba@kernel.org
Subject: Re: [RFC net-next 1/2] ethtool: add support for controling the type of adaptive coalescing
Date: Thu, 19 Nov 2020 22:43:05 +0100 [thread overview]
Message-ID: <20201119214305.qjwlg7imqw46bltx@lion.mk-sys.cz> (raw)
In-Reply-To: <20201119041557.GR1804098@lunn.ch>
On Thu, Nov 19, 2020 at 05:15:57AM +0100, Andrew Lunn wrote:
> > diff --git a/include/uapi/linux/ethtool_netlink.h b/include/uapi/linux/ethtool_netlink.h
> > index e2bf36e..e3458d9 100644
> > --- a/include/uapi/linux/ethtool_netlink.h
> > +++ b/include/uapi/linux/ethtool_netlink.h
> > @@ -366,6 +366,7 @@ enum {
> > ETHTOOL_A_COALESCE_TX_USECS_HIGH, /* u32 */
> > ETHTOOL_A_COALESCE_TX_MAX_FRAMES_HIGH, /* u32 */
> > ETHTOOL_A_COALESCE_RATE_SAMPLE_INTERVAL, /* u32 */
> > + ETHTOOL_A_COALESCE_USE_DIM, /* u8 */
>
> This appears to be a boolean? So /* flag */ would be better. Or do you
> think there is scope for a few different algorithms, and an enum would
> be better. If so, you should add the enum with the two current
> options.
NLA_FLAG would suffice for a read only bool attribute but if the
attribute is expected to be set, we need to distinguish three cases:
set to true, set to false and keep current value. That's why we use
NLA_U8 for read write bool attributes (0 false, anything else true and
attribute not present means leave untouched).
Michal
next prev parent reply other threads:[~2020-11-19 21:43 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-19 3:54 [RFC net-next 0/2] net: updates for -next Huazhong Tan
2020-11-19 3:54 ` [RFC net-next 1/2] ethtool: add support for controling the type of adaptive coalescing Huazhong Tan
2020-11-19 4:15 ` Andrew Lunn
2020-11-19 8:56 ` tanhuazhong
2020-11-19 22:02 ` Michal Kubecek
2020-11-20 1:52 ` tanhuazhong
2020-11-20 2:59 ` tanhuazhong
2020-11-20 7:23 ` Michal Kubecek
2020-11-20 13:39 ` Andrew Lunn
2020-11-20 21:22 ` Michal Kubecek
2020-11-21 1:56 ` tanhuazhong
2020-11-19 21:43 ` Michal Kubecek [this message]
2020-11-19 3:54 ` [RFC net-next 2/2] net: hns3: add support for dynamic interrupt moderation Huazhong Tan
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=20201119214305.qjwlg7imqw46bltx@lion.mk-sys.cz \
--to=mkubecek@suse.cz \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxarm@huawei.com \
--cc=netdev@vger.kernel.org \
--cc=tanhuazhong@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).