bonding: Remove net_device_stats from bonding struct
Subsystems (3)
PATCH 1/1 bonding: Remove net_device_stats from bonding struct
There is no need to maintain stats in the bonding structure. Use the instance of net_device_stats in netdevice.
Signed-off-by Ajit Khaparde <[email protected]>
--- drivers/net/bonding/bond_main.c | 2 +- drivers/net/bonding/bonding.h | 1 - 2 files changed, 1 insertions(+), 2 deletions(-)
drivers/net/bonding/bond_main.c +1 -1
@@ -3742,7 +3742,7 @@ static int bond_close(struct net_device *bond_dev)static struct net_device_stats *bond_get_stats (struct net_device *bond_dev) {struct bonding *bond =netdev_priv (bond_dev); -struct net_device_stats *stats = &bond->stats; +struct net_device_stats *stats = &bond_dev->stats;struct net_device_stats local_stats;struct slave *slave;int i;
drivers/net/bonding/bonding.h +0 -1
@@ -197,7 +197,6 @@ struct bonding {s8 send_grat_arp;s8 send_unsol_na;s8 setup_by_slave; -struct net_device_stats stats;#ifdef CONFIG_PROC_FS struct proc_dir_entry *proc_entry;char proc_file_name[IFNAMSIZ ];
Signature · 1 line
1.6.3.3
Quoted 4 lines · Ajit Khaparde
There is no need to maintain stats in the bonding structure. Use the instance of
net_device_statsin netdevice.Signed-off-by Ajit Khaparde <[email protected]>
Note that the accumulation of stats across the slaves is done
into a separate local instance of net_device_stats, so partial results shouldn't be visible.
Signed-off-by Jay Vosburgh <[email protected]>
-J
Quoted 37 lines
---
drivers/net/bonding/bond_main.c | 2 +- drivers/net/bonding/bonding.h | 1 - 2 files changed, 1 insertions(+), 2 deletions(-)drivers/net/bonding/bond_main.c +1
-1@@ -3742,7 +3742,7 @@ static int bond_close(struct net_device *bond_dev)static struct net_device_stats *bond_get_stats (struct net_device *bond_dev) {struct bonding *bond =netdev_priv (bond_dev); -struct net_device_stats *stats = &bond->stats; +struct net_device_stats *stats = &bond_dev->stats;struct net_device_stats local_stats;struct slave *slave;int i;drivers/net/bonding/bonding.h +0
-1@@ -197,7 +197,6 @@ struct bonding {s8 send_grat_arp;s8 send_unsol_na;s8 setup_by_slave; -struct net_device_stats stats;#ifdef CONFIG_PROC_FS struct proc_dir_entry *proc_entry;char proc_file_name[IFNAMSIZ ];Signature · 6 lines
1.6.3.3 -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
From: Ajit Khaparde <[email protected]>
Date: Tue, 2 Feb 2010 05:36:52 +0530
Quoted 4 lines
There is no need to maintain stats in the bonding structure. Use the instance of
net_device_statsin netdevice.Signed-off-by Ajit Khaparde <[email protected]>
Applied.