The offloaded HW stats are designed to allow per-netdevice enablement and disablement. Add an attribute, IFLA_STATS_SET_OFFLOAD_XSTATS_L3_STATS, which should be carried by the RTM_SETSTATS message, and expresses a desire to toggle L3 offload xstats on or off. As part of the above, add an exported function rtnl_offload_xstats_notify() that drivers can use when they have installed or deinstalled the counters backing the HW stats. At this point, it is possible to enable, disable and query L3 offload xstats on netdevices. (However there is no driver actually implementing these.)
Showing the changes to include/uapi (2 of 4 files). Show all
Unified · Split
| @@ -1227,6 +1227,7 @@ enum { · 1226 unmodified lines | ||
| 1227 | 1227 | IFLA_STATS_GET_FILTERS, /* Nest of IFLA_STATS_LINK_xxx, each a u32 with |
| 1228 | 1228 | * a filter mask for the corresponding group. |
| 1229 | 1229 | */ |
| 1230 | + IFLA_STATS_SET_OFFLOAD_XSTATS_L3_STATS, /* 0 or 1 as u8 */ | |
| 1230 | 1231 | __IFLA_STATS_GETSET_MAX, |
| 1231 | 1232 | }; |
| 1232 | 1233 | |
| @@ -767,6 +767,8 @@ enum rtnetlink_groups { · 766 unmodified lines | ||
| 767 | 767 | #define RTNLGRP_MCTP_IFADDR RTNLGRP_MCTP_IFADDR |
| 768 | 768 | RTNLGRP_TUNNEL, |
| 769 | 769 | #define RTNLGRP_TUNNEL RTNLGRP_TUNNEL |
| 770 | + RTNLGRP_STATS, | |
| 771 | +#define RTNLGRP_STATS RTNLGRP_STATS | |
| 770 | 772 | __RTNLGRP_MAX |
| 771 | 773 | }; |
| 772 | 774 | #define RTNLGRP_MAX (__RTNLGRP_MAX - 1) |