]> git.baikalelectronics.ru Git - kernel.git/commit
vlan: Precise RX stats accounting
authorEric Dumazet <eric.dumazet@gmail.com>
Tue, 17 Nov 2009 04:53:09 +0000 (04:53 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 18 Nov 2009 07:51:55 +0000 (23:51 -0800)
commit9cab65e33f8fd7e32529de92b78c10d642fd428a
tree5f7a347c3a6b32a49e54f1f6ead1c96f2351208c
parent52026f15a49dd8a7242f220c16d032b3129d8374
vlan: Precise RX stats accounting

With multi queue devices, its possible that several cpus call
vlan RX routines simultaneously for the same vlan device.

We update RX stats counter without any locking, so we can
get slightly wrong counters.

One possible fix is to use percpu counters, to get precise
accounting and also get guarantee of no cache line ping pongs
between cpus.

Note: this adds 16 bytes (32 bytes on 64bit arches) of percpu
data per vlan device.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/8021q/vlan.h
net/8021q/vlan_core.c
net/8021q/vlan_dev.c