linux-stable/include
Petr Machata 46efc97b73 net: rtnetlink: RTM_GETSTATS: Allow filtering inside nests
The filter_mask field of RTM_GETSTATS header determines which top-level
attributes should be included in the netlink response. This saves
processing time by only including the bits that the user cares about
instead of always dumping everything. This is doubly important for
HW-backed statistics that would typically require a trip to the device to
fetch the stats.

So far there was only one HW-backed stat suite per attribute. However,
IFLA_STATS_LINK_OFFLOAD_XSTATS is a nest, and will gain a new stat suite in
the following patches. It would therefore be advantageous to be able to
filter within that nest, and select just one or the other HW-backed
statistics suite.

Extend rtnetlink so that RTM_GETSTATS permits attributes in the payload.
The scheme is as follows:

    - RTM_GETSTATS
	- struct if_stats_msg
	- attr nest IFLA_STATS_GET_FILTERS
	    - attr IFLA_STATS_LINK_OFFLOAD_XSTATS
		- u32 filter_mask

This scheme reuses the existing enumerators by nesting them in a dedicated
context attribute. This is covered by policies as usual, therefore a
gradual opt-in is possible. Currently only IFLA_STATS_LINK_OFFLOAD_XSTATS
nest has filtering enabled, because for the SW counters the issue does not
seem to be that important.

rtnl_offload_xstats_get_size() and _fill() are extended to observe the
requested filters.

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>
2022-03-03 10:37:22 +00:00
..
acpi
asm-generic bitmap patches for 5.17-rc1 2022-01-23 06:20:44 +02:00
clocksource
crypto lib/crypto: blake2s: avoid indirect calls to compression function for Clang CFI 2022-02-04 19:22:32 +01:00
drm
dt-bindings Fixes for omaps 2022-02-07 17:42:44 +01:00
keys
kunit kunit: replace kernel.h with the necessary inclusions 2022-01-20 08:52:54 +02:00
kvm RISCV: 2022-01-16 16:15:14 +02:00
linux flow_dissector: Add support for HSR 2022-03-02 22:44:49 -08:00
math-emu
media
memory
misc
net page_pool: Add function to batch and return stats 2022-03-03 09:55:28 +00:00
pcmcia
ras mm/hwpoison: remove MF_MSG_BUDDY_2ND and MF_MSG_POISONED_HUGE 2022-01-15 16:30:31 +02:00
rdma
scsi Merge branch 'akpm' (patches from Andrew) 2022-01-22 11:28:23 +02:00
soc net: mscc: ocelot: enforce FDB isolation when VLAN-unaware 2022-02-27 11:06:14 +00:00
sound ASoC: Fixes for v5.17 2022-02-01 16:52:54 +01:00
target
trace net: neigh: use kfree_skb_reason() for __neigh_event_send() 2022-02-26 12:53:59 +00:00
uapi net: rtnetlink: RTM_GETSTATS: Allow filtering inside nests 2022-03-03 10:37:22 +00:00
vdso
video
xen xen: xenbus_dev.h: delete incorrect file name 2022-02-03 08:16:32 +01:00