]> 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)
commite6475385e01bfb7c9329be602660839af5c6806b
tree10bc448c6ffb007070c0e031976178d821205a00
parent5d8e54f95e77616a8d223729156d33eb44aa6826
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