Message ID | 20210803163641.3743-3-alexandr.lobakin@intel.com (mailing list archive) |
---|---|
State | Changes Requested |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | ethtool, stats: introduce and use standard XDP stats | expand |
Context | Check | Description |
---|---|---|
netdev/cover_letter | success | Link |
netdev/fixes_present | success | Link |
netdev/patch_count | fail | Series longer than 15 patches |
netdev/tree_selection | success | Clearly marked for net-next |
netdev/subject_prefix | success | Link |
netdev/cc_maintainers | success | CCed 15 of 15 maintainers |
netdev/source_inline | success | Was 0 now: 0 |
netdev/verify_signedoff | success | Link |
netdev/module_param | success | Was 0 now: 0 |
netdev/build_32bit | success | Errors and warnings before: 1 this patch: 1 |
netdev/kdoc | success | Errors and warnings before: 0 this patch: 0 |
netdev/verify_fixes | success | Link |
netdev/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 15 lines checked |
netdev/build_allmodconfig_warn | success | Errors and warnings before: 1 this patch: 1 |
netdev/header_inline | success | Link |
diff --git a/net/ethtool/stats.c b/net/ethtool/stats.c index e35c87206b4c..8b5c27e034f9 100644 --- a/net/ethtool/stats.c +++ b/net/ethtool/stats.c @@ -117,6 +117,15 @@ static int stats_prepare_data(const struct ethnl_req_info *req_base, ops = dev->ethtool_ops; + BUILD_BUG_ON(sizeof(data->phy_stats) / sizeof(u64) != + __ETHTOOL_A_STATS_ETH_PHY_CNT); + BUILD_BUG_ON(sizeof(data->mac_stats) / sizeof(u64) != + __ETHTOOL_A_STATS_ETH_MAC_CNT); + BUILD_BUG_ON(sizeof(data->ctrl_stats) / sizeof(u64) != + __ETHTOOL_A_STATS_ETH_CTRL_CNT); + BUILD_BUG_ON(offsetof(typeof(data->rmon_stats), hist) / sizeof(u64) != + __ETHTOOL_A_STATS_RMON_CNT); + /* Mark all stats as unset (see ETHTOOL_STAT_NOT_SET) to prevent them * from being reported to user space in case driver did not set them. */