summaryrefslogtreecommitdiff
path: root/net/ethtool/netlink.c
diff options
context:
space:
mode:
authorMichal Kubecek <mkubecek@suse.cz>2020-03-28 02:01:13 +0300
committerDavid S. Miller <davem@davemloft.net>2020-03-30 08:32:36 +0300
commit9881418c7556954cd3f6c348bcd29a483bb5ac38 (patch)
treeed771d1badc30a7de80e00c8898660a2795d8b4d /net/ethtool/netlink.c
parent217275453b3e1fc5abf2a8cc2e231e1daa237d99 (diff)
downloadlinux-9881418c7556954cd3f6c348bcd29a483bb5ac38.tar.xz
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.c5
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[] = {