From 9881418c7556954cd3f6c348bcd29a483bb5ac38 Mon Sep 17 00:00:00 2001 From: Michal Kubecek Date: Sat, 28 Mar 2020 00:01:13 +0100 Subject: 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 Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller --- net/ethtool/netlink.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'net/ethtool/netlink.c') 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[] = { -- cgit v1.2.3