]> git.baikalelectronics.ru Git - kernel.git/commit
ethtool: set netdev features with FEATURES_SET request
authorMichal Kubecek <mkubecek@suse.cz>
Thu, 12 Mar 2020 20:07:58 +0000 (21:07 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 12 Mar 2020 22:32:32 +0000 (15:32 -0700)
commit9357892b26e06e93b48f728255fdb22d6c5e348a
tree5d922a8db18ccd49c58832472f85b19ffbad31b2
parent42ffb8b9cb5ca1d3c032dc95e9481b8684dd4334
ethtool: set netdev features with FEATURES_SET request

Implement FEATURES_SET netlink request to set network device features.
These are traditionally set using ETHTOOL_SFEATURES ioctl request.

Actual change is subject to netdev_change_features() sanity checks so that
it can differ from what was requested. Unlike with most other SET requests,
in addition to error code and optional extack, kernel provides an optional
reply message (ETHTOOL_MSG_FEATURES_SET_REPLY) in the same format but with
different semantics: information about difference between user request and
actual result and difference between old and new state of dev->features.
This reply message can be suppressed by setting ETHTOOL_FLAG_OMIT_REPLY
flag in request header.

Signed-off-by: Michal Kubecek <mkubecek@suse.cz>
Signed-off-by: David S. Miller <davem@davemloft.net>
Documentation/networking/ethtool-netlink.rst
include/uapi/linux/ethtool_netlink.h
net/ethtool/features.c
net/ethtool/netlink.c
net/ethtool/netlink.h