summaryrefslogtreecommitdiffstats
path: root/include/net/rtnetlink.h
diff options
context:
space:
mode:
authorNikolay Aleksandrov <nikolay@cumulusnetworks.com>2016-06-28 10:57:05 -0400
committerDavid S. Miller <davem@davemloft.net>2016-06-30 06:15:04 -0400
commit80e73cc563c4359be809a03bcb8e7e28141a813a (patch)
treef4b7cd5513a07dc840c336fa5e630fe1dae0d2e7 /include/net/rtnetlink.h
parent545c321ba3c524045ebc26f6c81b3ec3ba966836 (diff)
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>
Diffstat (limited to 'include/net/rtnetlink.h')
-rw-r--r--include/net/rtnetlink.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/net/rtnetlink.h b/include/net/rtnetlink.h
index 006a7b81d758..4113916cc1bb 100644
--- a/include/net/rtnetlink.h
+++ b/include/net/rtnetlink.h
@@ -98,10 +98,11 @@ struct rtnl_link_ops {
98 const struct net_device *dev, 98 const struct net_device *dev,
99 const struct net_device *slave_dev); 99 const struct net_device *slave_dev);
100 struct net *(*get_link_net)(const struct net_device *dev); 100 struct net *(*get_link_net)(const struct net_device *dev);
101 size_t (*get_linkxstats_size)(const struct net_device *dev); 101 size_t (*get_linkxstats_size)(const struct net_device *dev,
102 int attr);
102 int (*fill_linkxstats)(struct sk_buff *skb, 103 int (*fill_linkxstats)(struct sk_buff *skb,
103 const struct net_device *dev, 104 const struct net_device *dev,
104 int *prividx); 105 int *prividx, int attr);
105}; 106};
106 107
107int __rtnl_link_register(struct rtnl_link_ops *ops); 108int __rtnl_link_register(struct rtnl_link_ops *ops);