diff options
author | Michal Kubecek <mkubecek@suse.cz> | 2020-03-12 21:08:43 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-03-12 23:32:33 +0100 |
commit | e19c591eafad4d723a2eed385e253eca0506cc25 (patch) | |
tree | 1450733e460f65eb9eb6a0b88a1dd96bc061fcc2 /net/ethtool/netlink.h | |
parent | ethtool: provide channel counts with CHANNELS_GET request (diff) | |
download | linux-e19c591eafad4d723a2eed385e253eca0506cc25.tar.xz linux-e19c591eafad4d723a2eed385e253eca0506cc25.zip |
ethtool: set device channel counts with CHANNELS_SET request
Implement CHANNELS_SET netlink request to set channel counts of a network
device. These are traditionally set with ETHTOOL_SCHANNELS ioctl request.
Like the ioctl implementation, the generic ethtool code checks if supplied
values do not exceed driver defined limits; if they do, first offending
attribute is reported using extack. Checks preventing removing channels
used for RX indirection table or zerocopy AF_XDP socket are also
implemented.
Move ethtool_get_max_rxfh_channel() helper into common.c so that it can be
used by both ioctl and netlink code.
v2:
- fix netdev reference leak in error path (found by Jakub Kicinsky)
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 '')
-rw-r--r-- | net/ethtool/netlink.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/ethtool/netlink.h b/net/ethtool/netlink.h index 53bfe720ff1a..45aad99a6021 100644 --- a/net/ethtool/netlink.h +++ b/net/ethtool/netlink.h @@ -349,5 +349,6 @@ int ethnl_set_wol(struct sk_buff *skb, struct genl_info *info); int ethnl_set_features(struct sk_buff *skb, struct genl_info *info); int ethnl_set_privflags(struct sk_buff *skb, struct genl_info *info); int ethnl_set_rings(struct sk_buff *skb, struct genl_info *info); +int ethnl_set_channels(struct sk_buff *skb, struct genl_info *info); #endif /* _NET_ETHTOOL_NETLINK_H */ |