Re: [PATCH updated] net: add ability to clear per-interface networkstatistics via procfs

From: Patrick McHardy
Date: Sat May 17 2008 - 21:44:44 EST


Ben Hutchings wrote:
+ dev = dev_get_by_name(net,devname);
+ if (dev) {
+ if (dev->get_stats) {
+ struct net_device_stats *stats =
+ dev->get_stats(dev);
+ memset(stats,0,
+ sizeof(struct net_device_stats));

This doesn't work for devices that generate the stats (for
example by reading them from the hardware) in ->get_stats().

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/