#include "netlink.h"
#include "common.h"
#include "bitset.h"
struct stats_req_info { … };
#define STATS_REQINFO(__req_base) …
struct stats_reply_data { … };
#define STATS_REPDATA(__reply_base) …
const char stats_std_names[__ETHTOOL_STATS_CNT][ETH_GSTRING_LEN] = …;
const char stats_eth_phy_names[__ETHTOOL_A_STATS_ETH_PHY_CNT][ETH_GSTRING_LEN] = …;
const char stats_eth_mac_names[__ETHTOOL_A_STATS_ETH_MAC_CNT][ETH_GSTRING_LEN] = …;
const char stats_eth_ctrl_names[__ETHTOOL_A_STATS_ETH_CTRL_CNT][ETH_GSTRING_LEN] = …;
const char stats_rmon_names[__ETHTOOL_A_STATS_RMON_CNT][ETH_GSTRING_LEN] = …;
const struct nla_policy ethnl_stats_get_policy[ETHTOOL_A_STATS_SRC + 1] = …;
static int stats_parse_request(struct ethnl_req_info *req_base,
struct nlattr **tb,
struct netlink_ext_ack *extack)
{ … }
static int stats_prepare_data(const struct ethnl_req_info *req_base,
struct ethnl_reply_data *reply_base,
const struct genl_info *info)
{ … }
static int stats_reply_size(const struct ethnl_req_info *req_base,
const struct ethnl_reply_data *reply_base)
{ … }
static int stat_put(struct sk_buff *skb, u16 attrtype, u64 val)
{ … }
static int stats_put_phy_stats(struct sk_buff *skb,
const struct stats_reply_data *data)
{ … }
static int stats_put_mac_stats(struct sk_buff *skb,
const struct stats_reply_data *data)
{ … }
static int stats_put_ctrl_stats(struct sk_buff *skb,
const struct stats_reply_data *data)
{ … }
static int stats_put_rmon_hist(struct sk_buff *skb, u32 attr, const u64 *hist,
const struct ethtool_rmon_hist_range *ranges)
{ … }
static int stats_put_rmon_stats(struct sk_buff *skb,
const struct stats_reply_data *data)
{ … }
static int stats_put_stats(struct sk_buff *skb,
const struct stats_reply_data *data,
u32 id, u32 ss_id,
int (*cb)(struct sk_buff *skb,
const struct stats_reply_data *data))
{ … }
static int stats_fill_reply(struct sk_buff *skb,
const struct ethnl_req_info *req_base,
const struct ethnl_reply_data *reply_base)
{ … }
const struct ethnl_request_ops ethnl_stats_request_ops = …;
static u64 ethtool_stats_sum(u64 a, u64 b)
{ … }
static void ethtool_aggregate_stats(void *aggr_stats, const void *emac_stats,
const void *pmac_stats, size_t stats_size,
size_t stats_offset)
{ … }
void ethtool_aggregate_mac_stats(struct net_device *dev,
struct ethtool_eth_mac_stats *mac_stats)
{ … }
EXPORT_SYMBOL(…);
void ethtool_aggregate_phy_stats(struct net_device *dev,
struct ethtool_eth_phy_stats *phy_stats)
{ … }
EXPORT_SYMBOL(…);
void ethtool_aggregate_ctrl_stats(struct net_device *dev,
struct ethtool_eth_ctrl_stats *ctrl_stats)
{ … }
EXPORT_SYMBOL(…);
void ethtool_aggregate_pause_stats(struct net_device *dev,
struct ethtool_pause_stats *pause_stats)
{ … }
EXPORT_SYMBOL(…);
void ethtool_aggregate_rmon_stats(struct net_device *dev,
struct ethtool_rmon_stats *rmon_stats)
{ … }
EXPORT_SYMBOL(…);