linux-stable/net/ethtool
Alexander Lobakin 413691384a ethtool: netlink: add missing netdev_features_change() call
After updating userspace Ethtool from 5.7 to 5.9, I noticed that
NETDEV_FEAT_CHANGE is no more raised when changing netdev features
through Ethtool.
That's because the old Ethtool ioctl interface always calls
netdev_features_change() at the end of user request processing to
inform the kernel that our netdevice has some features changed, but
the new Netlink interface does not. Instead, it just notifies itself
with ETHTOOL_MSG_FEATURES_NTF.
Replace this ethtool_notify() call with netdev_features_change(), so
the kernel will be aware of any features changes, just like in case
with the ioctl interface. This does not omit Ethtool notifications,
as Ethtool itself listens to NETDEV_FEAT_CHANGE and drops
ETHTOOL_MSG_FEATURES_NTF on it
(net/ethtool/netlink.c:ethnl_netdev_event()).

From v1 [1]:
- dropped extra new line as advised by Jakub;
- no functional changes.

[1] https://lore.kernel.org/netdev/AlZXQ2o5uuTVHCfNGOiGgJ8vJ3KgO5YIWAnQjH0cDE@cp3-web-009.plabs.ch

Fixes: 0980bfcd69 ("ethtool: set netdev features with FEATURES_SET request")
Signed-off-by: Alexander Lobakin <alobakin@pm.me>
Reviewed-by: Michal Kubecek <mkubecek@suse.cz>
Link: https://lore.kernel.org/r/ahA2YWXYICz5rbUSQqNG4roJ8OlJzzYQX7PTiG80@cp4-web-028.plabs.ch
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2020-11-09 17:15:34 -08:00
..
Makefile ethtool: add tunnel info interface 2020-07-10 13:54:00 -07:00
bitset.c ethtool: trim policy tables 2020-10-06 06:25:55 -07:00
bitset.h ethtool: add ethnl_parse_bitset() helper 2020-03-12 15:32:32 -07:00
cabletest.c ethtool: link up ethnl_header_policy as a nested policy 2020-10-06 06:25:55 -07:00
channels.c ethtool: link up ethnl_header_policy as a nested policy 2020-10-06 06:25:55 -07:00
coalesce.c ethtool: link up ethnl_header_policy as a nested policy 2020-10-06 06:25:55 -07:00
common.c ethtool: Add 100base-FX link mode entries 2020-09-19 16:54:35 -07:00
common.h ethtool: add tunnel info interface 2020-07-10 13:54:00 -07:00
debug.c ethtool: link up ethnl_header_policy as a nested policy 2020-10-06 06:25:55 -07:00
eee.c ethtool: link up ethnl_header_policy as a nested policy 2020-10-06 06:25:55 -07:00
features.c ethtool: netlink: add missing netdev_features_change() call 2020-11-09 17:15:34 -08:00
ioctl.c ethtool: allow netdev driver to define phy tunables 2020-10-06 06:16:01 -07:00
linkinfo.c ethtool: link up ethnl_header_policy as a nested policy 2020-10-06 06:25:55 -07:00
linkmodes.c ethtool: link up ethnl_header_policy as a nested policy 2020-10-06 06:25:55 -07:00
linkstate.c ethtool: link up ethnl_header_policy as a nested policy 2020-10-06 06:25:55 -07:00
netlink.c ethtool: correct policy for ETHTOOL_MSG_CHANNELS_SET 2020-10-08 16:06:01 -07:00
netlink.h ethtool: strset: allow ETHTOOL_A_STRSET_COUNTS_ONLY attr 2020-10-08 16:06:01 -07:00
pause.c ethtool: specify which header flags are supported per command 2020-10-06 06:25:55 -07:00
privflags.c ethtool: link up ethnl_header_policy as a nested policy 2020-10-06 06:25:55 -07:00
rings.c ethtool: link up ethnl_header_policy as a nested policy 2020-10-06 06:25:55 -07:00
strset.c ethtool: strset: allow ETHTOOL_A_STRSET_COUNTS_ONLY attr 2020-10-08 16:06:01 -07:00
tsinfo.c ethtool: link up ethnl_header_policy as a nested policy 2020-10-06 06:25:55 -07:00
tunnels.c ethtool: link up ethnl_header_policy as a nested policy 2020-10-06 06:25:55 -07:00
wol.c ethtool: link up ethnl_header_policy as a nested policy 2020-10-06 06:25:55 -07:00