NET : loopback driver can use loopback_dev integrated net_device_stats
Subsystems (2)
PATCH 1/1 NET : loopback driver can use loopback_dev integrated net_device_stats
Hi David
Please find this patch against net-2.6.22
Thank you
[PATCH] NET : loopback driver can use loopback_dev integrated net_device_stats
Rusty added a new 'stats' field to struct net_device.
loopback driver can use it instead of declaring another struct net_device_stats This saves some memory.
drivers/net/loopback.c +1 -4
@@ -164,11 +164,9 @@ #endifreturn 0 ; } -static struct net_device_stats loopback_stats; -static struct net_device_stats *get_stats (struct net_device *dev) { -struct net_device_stats *stats = &loopback_stats; +struct net_device_stats *stats = &dev->stats;unsigned long bytes =0 ;unsigned long packets =0 ;int i;
@@ -208,7 +206,6 @@ static const struct ethtool_ops loopbackstruct net_device loopback_dev = { .name ="lo" , .get_stats = &get_stats, - .priv = &loopback_stats, .mtu = (16 *1024 ) +20 +20 +12 , .hard_start_xmit = loopback_xmit, .hard_header = eth_header,
From: Eric Dumazet <[email protected]>
Date: Tue, 10 Apr 2007 19:29:12 +0200
Quoted 6 lines
Hi David
Please find this patch against net-2.6.22
Thank you
Quoted 8 lines
[PATCH] NET : loopback driver can use
loopback_devintegratednet_device_statsRusty added a new 'stats' field to struct
net_device.loopback driver can use it instead of declaring another struct
net_device_statsThis saves some memory.Signed-off-by Eric Dumazet <[email protected]>
Applied, thanks Eric.