Re: [RFC 03/14] net: hstats: add basic/core functionality

2019-01-30 Thread David Ahern
On 1/30/19 10:44 AM, Jakub Kicinski wrote: > On Tue, 29 Jan 2019 21:18:28 -0700, David Ahern wrote: >> On 1/28/19 4:44 PM, Jakub Kicinski wrote: >>> @@ -4946,6 +4964,9 @@ static size_t if_nlmsg_stats_size(const struct >>> net_device *dev, >>> rcu_read_unlock(); >>> } >>> >>> +

Re: [RFC 03/14] net: hstats: add basic/core functionality

2019-01-30 Thread Jakub Kicinski
On Tue, 29 Jan 2019 21:18:28 -0700, David Ahern wrote: > On 1/28/19 4:44 PM, Jakub Kicinski wrote: > > @@ -4946,6 +4964,9 @@ static size_t if_nlmsg_stats_size(const struct > > net_device *dev, > > rcu_read_unlock(); > > } > > > > + if (stats_attr_valid(filter_mask, IFLA_STATS_L

Re: [RFC 03/14] net: hstats: add basic/core functionality

2019-01-29 Thread David Ahern
On 1/28/19 4:44 PM, Jakub Kicinski wrote: > @@ -4946,6 +4964,9 @@ static size_t if_nlmsg_stats_size(const struct > net_device *dev, > rcu_read_unlock(); > } > > + if (stats_attr_valid(filter_mask, IFLA_STATS_LINK_HSTATS, 0)) filter_mask is populated by RTEXT_FILTER_ from

[RFC 03/14] net: hstats: add basic/core functionality

2019-01-28 Thread Jakub Kicinski
Add basic hierarchical stats. For now there is no hierarchies or other fancy features. An ndo is added, and drivers can return multiple groups of stats by adding the to them dump with rtnl_hstat_add_grp(). Each group has attributes (qualifiers) which designate the direction of the statistic (TX