ethtool: add a new command for reading standard stats
authorJakub Kicinski <kuba@kernel.org>
Fri, 16 Apr 2021 19:27:39 +0000 (12:27 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 16 Apr 2021 23:59:20 +0000 (16:59 -0700)
commitf09ea6fb12723d6726293d68de00b6307368bd76
treeb135481e6127588c4580f149a75d995964005db5
parentddc78b3621242dd691ef4c234a80e316422c2876
ethtool: add a new command for reading standard stats

Add an interface for reading standard stats, including
stats which don't have a corresponding control interface.

Start with IEEE 802.3 PHY stats. There seems to be only
one stat to expose there.

Define API to not require user space changes when new
stats or groups are added. Groups are based on bitset,
stats have a string set associated.

v1: wrap stats in a nest

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/ethtool.h
include/uapi/linux/ethtool.h
include/uapi/linux/ethtool_netlink.h
net/ethtool/Makefile
net/ethtool/netlink.c
net/ethtool/netlink.h
net/ethtool/stats.c [new file with mode: 0644]
net/ethtool/strset.c