ethtool: set device ring sizes with RINGS_SET request
authorMichal Kubecek <mkubecek@suse.cz>
Thu, 12 Mar 2020 20:08:28 +0000 (21:08 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 12 Mar 2020 22:32:33 +0000 (15:32 -0700)
commit2fc2929e807211a9535a6541f24b57fa1c469728
treed0b54b418d516850bfd30e48a756d5f43890f642
parente4a1717b677c5cb285e9b425c569e261084a484c
ethtool: set device ring sizes with RINGS_SET request

Implement RINGS_SET netlink request to set ring sizes of a network device.
These are traditionally set with ETHTOOL_SRINGPARAM 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.

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>
Documentation/networking/ethtool-netlink.rst
include/uapi/linux/ethtool_netlink.h
net/ethtool/netlink.c
net/ethtool/netlink.h
net/ethtool/rings.c