History

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)

Michal Kubecek committed 6 years ago

Commit e19c5911 parent 0c849798 files · +177 −32Browse files

Showing the changes to include/uapi/linux (1 of 8 files). Show all

Unified · Split

include/uapi/linux/ethtool_netlink.h+1−0
@@ -31,6 +31,7 @@ enum { · 30 unmodified lines
3131 ETHTOOL_MSG_RINGS_GET,
3232 ETHTOOL_MSG_RINGS_SET,
3333 ETHTOOL_MSG_CHANNELS_GET,
34+ ETHTOOL_MSG_CHANNELS_SET,
3435
3536 /* add new constants above here */
3637 __ETHTOOL_MSG_USER_CNT,