summaryrefslogtreecommitdiffstats
path: root/net/8021q/vlanproc.c
diff options
context:
space:
mode:
authorEric Dumazet <dada1@cosmosbay.com>2009-05-18 00:35:38 +0000
committerDavid S. Miller <davem@davemloft.net>2009-05-18 15:15:06 -0700
commit450c4ea15ecb89567e6a75b89cbb8a598a7efb75 (patch)
tree5e99e5e58ca2e5e046d47963773ef66857bec46a /net/8021q/vlanproc.c
parent7004bf252c53da18f6b55103e0c92f777f846806 (diff)
downloadop-kernel-dev-450c4ea15ecb89567e6a75b89cbb8a598a7efb75.zip
op-kernel-dev-450c4ea15ecb89567e6a75b89cbb8a598a7efb75.tar.gz
vlan: use struct netdev_queue counters instead of dev->stats
We can update netdev_queue tx_bytes/tx_packets/tx_dropped counters instead of dev->stats ones, to reduce number of cache lines dirtied in xmit path. This fixes a performance problem on SMP when many different cpus take vlan tx path. Signed-off-by: Eric Dumazet <dada1@cosmosbay.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/8021q/vlanproc.c')
-rw-r--r--net/8021q/vlanproc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/8021q/vlanproc.c b/net/8021q/vlanproc.c
index 3628e0a..b55a091 100644
--- a/net/8021q/vlanproc.c
+++ b/net/8021q/vlanproc.c
@@ -279,13 +279,14 @@ static int vlandev_seq_show(struct seq_file *seq, void *offset)
{
struct net_device *vlandev = (struct net_device *) seq->private;
const struct vlan_dev_info *dev_info = vlan_dev_info(vlandev);
- struct net_device_stats *stats = &vlandev->stats;
+ const struct net_device_stats *stats;
static const char fmt[] = "%30s %12lu\n";
int i;
if (!is_vlan_dev(vlandev))
return 0;
+ stats = dev_get_stats(vlandev);
seq_printf(seq,
"%s VID: %d REORDER_HDR: %i dev->priv_flags: %hx\n",
vlandev->name, dev_info->vlan_id,
OpenPOWER on IntegriCloud