ethtool: support FEC settings over netlink
authorJakub Kicinski <kuba@kernel.org>
Tue, 30 Mar 2021 03:59:52 +0000 (20:59 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 31 Mar 2021 21:15:23 +0000 (14:15 -0700)
commit1e5d1f69d9fb8ea0679f9e85915e8e7fdacfbe7a
tree46f2663c669df57342a05aeef88d0e6b6e17fd85
parent28110056f2d07a576ca045a38f80de051b13582a
ethtool: support FEC settings over netlink

Add FEC API to netlink.

This is not a 1-to-1 conversion.

FEC settings already depend on link modes to tell user which
modes are supported. Take this further an use link modes for
manual configuration. Old struct ethtool_fecparam is still
used to talk to the drivers, so we need to translate back
and forth. We can revisit the internal API if number of FEC
encodings starts to grow.

Enforce only one active FEC bit (by using a bit position
rather than another mask).

Signed-off-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/Makefile
net/ethtool/fec.c [new file with mode: 0644]
net/ethtool/netlink.c
net/ethtool/netlink.h