]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit92dcdab65c302e6074ef98a1f1b878caf43af68c
tree46f2663c669df57342a05aeef88d0e6b6e17fd85
parent19fe4cc780e6b0014302af1abc4effa05a10ee30
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