]> git.baikalelectronics.ru Git - kernel.git/commit
net: rtnetlink: add support for the IFLA_STATS_LINK_XSTATS_SLAVE attribute
authorNikolay Aleksandrov <nikolay@cumulusnetworks.com>
Tue, 28 Jun 2016 14:57:05 +0000 (16:57 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 30 Jun 2016 10:15:04 +0000 (06:15 -0400)
commitf6807b45f2d58df2de5e95d4260f567bc0b84e45
treef4b7cd5513a07dc840c336fa5e630fe1dae0d2e7
parent7011924e52d39afd64e646fc3bd6c24b8299664b
net: rtnetlink: add support for the IFLA_STATS_LINK_XSTATS_SLAVE attribute

This patch adds support for the IFLA_STATS_LINK_XSTATS_SLAVE attribute
which allows to export per-slave statistics if the master device supports
the linkxstats callback. The attribute is passed down to the linkxstats
callback and it is up to the callback user to use it (an example has been
added to the only current user - the bridge). This allows us to query only
specific slaves of master devices like bridge ports and export only what
we're interested in instead of having to dump all ports and searching only
for a single one. This will be used to export per-port IGMP/MLD stats and
also per-port vlan stats in the future, possibly other statistics as well.

Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/rtnetlink.h
include/uapi/linux/if_link.h
net/bridge/br_netlink.c
net/core/rtnetlink.c