diff options
author | Michal Kubecek <mkubecek@suse.cz> | 2020-03-28 00:01:13 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-03-30 07:32:36 +0200 |
commit | 9881418c7556954cd3f6c348bcd29a483bb5ac38 (patch) | |
tree | ed771d1badc30a7de80e00c8898660a2795d8b4d /net/ethtool/netlink.c | |
parent | ethtool: provide coalescing parameters with COALESCE_GET request (diff) | |
download | linux-9881418c7556954cd3f6c348bcd29a483bb5ac38.tar.xz linux-9881418c7556954cd3f6c348bcd29a483bb5ac38.zip |
ethtool: set coalescing parameters with COALESCE_SET request
Implement COALESCE_SET netlink request to set coalescing parameters of
a network device. These are traditionally set with ETHTOOL_SCOALESCE ioctl
request. This commit adds only support for device coalescing parameters,
not per queue coalescing parameters.
Like the ioctl implementation, the generic ethtool code checks if only
supported parameters are modified; if not, first offending attribute is
reported using extack.
v2: fix alignment (whitespace only)
Signed-off-by: Michal Kubecek <mkubecek@suse.cz>
Reviewed-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ethtool/netlink.c')
-rw-r--r-- | net/ethtool/netlink.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/net/ethtool/netlink.c b/net/ethtool/netlink.c index 3db6ad69ebc9..3a236b4dfbf3 100644 --- a/net/ethtool/netlink.c +++ b/net/ethtool/netlink.c @@ -794,6 +794,11 @@ static const struct genl_ops ethtool_genl_ops[] = { .dumpit = ethnl_default_dumpit, .done = ethnl_default_done, }, + { + .cmd = ETHTOOL_MSG_COALESCE_SET, + .flags = GENL_UNS_ADMIN_PERM, + .doit = ethnl_set_coalesce, + }, }; static const struct genl_multicast_group ethtool_nl_mcgrps[] = { |