search for: netbk_get_stats_count

Displaying 1 result from an estimated 1 matches for "netbk_get_stats_count".

2009 Feb 05
0
[PATCH] netback: add ethtool stat to track copied skbs
...truct net_device *dev, + struct ethtool_drvinfo *info) +{ + strcpy(info->driver, "netbk"); +} + +static const struct netif_stat { + char name[ETH_GSTRING_LEN]; + u16 offset; +} netbk_stats[] = { + { "copied_skbs", offsetof(netif_t, nr_copied_skbs) }, +}; + +static int netbk_get_stats_count(struct net_device *dev) +{ + return ARRAY_SIZE(netbk_stats); +} + +static void netbk_get_ethtool_stats(struct net_device *dev, + struct ethtool_stats *stats, u64 * data) +{ + void *netif = netdev_priv(dev); + int i; + + for (i = 0; i < ARRAY_SIZE(netbk_stats); i++) + data[i] = *(int *)(ne...