]> git.baikalelectronics.ru Git - kernel.git/commit
net: rtnetlink: add linkxstats callbacks and attribute
authorNikolay Aleksandrov <nikolay@cumulusnetworks.com>
Sat, 30 Apr 2016 08:25:27 +0000 (10:25 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 3 May 2016 02:27:06 +0000 (22:27 -0400)
commit844d6a16bb8ae85678207a1107b74eaabecd7a12
tree10bc448c6ffb007070c0e031976178d821205a00
parent57f078d9ae1b7f67b07406623ed8ced3a0cb1131
net: rtnetlink: add linkxstats callbacks and attribute

Add callbacks to calculate the size and fill link extended statistics
which can be split into multiple messages and are dumped via the new
rtnl stats API (RTM_GETSTATS) with the IFLA_STATS_LINK_XSTATS attribute.
Also add that attribute to the idx mask check since it is expected to
be able to save state and resume dumping (e.g. future bridge per-vlan
stats will be dumped via this attribute and callbacks).
Each link type should nest its private attributes under the per-link type
attribute. This allows to have any number of separated private attributes
and to avoid one call to get the dev link type.

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/core/rtnetlink.c