diff options
author | Petr Machata <petrm@nvidia.com> | 2022-03-02 19:31:16 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2022-03-03 13:37:22 +0300 |
commit | f6e0fb81298825e195888d2a32e6f7b6e64abf76 (patch) | |
tree | ed8e39091c40142154feecf69a38992f0bfdb652 /include | |
parent | 6b524a1d012b61d605e052db0555e9d8fee29f04 (diff) | |
download | linux-f6e0fb81298825e195888d2a32e6f7b6e64abf76.tar.xz |
net: rtnetlink: Stop assuming that IFLA_OFFLOAD_XSTATS_* are dev-backed
The IFLA_STATS_LINK_OFFLOAD_XSTATS attribute is a nest whose child
attributes carry various special hardware statistics. The code that handles
this nest was written with the idea that all these statistics would be
exposed by the device driver of a physical netdevice.
In the following patches, a new attribute is added to the abovementioned
nest, which however can be defined for some soft netdevices. The NDO-based
approach to querying these does not work, because it is not the soft
netdevice driver that exposes these statistics, but an offloading NIC
driver that does so.
The current code does not scale well to this usage. Simply rewrite it back
to the pattern seen in other fill-like and get_size-like functions
elsewhere.
Extract to helpers the code that is concerned with handling specifically
NDO-backed statistics so that it can be easily reused should more such
statistics be added.
Signed-off-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions