• Eric Dumazet's avatar
    vlan: Precise RX stats accounting · 9793241f
    Eric Dumazet authored
    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: default avatarEric Dumazet <eric.dumazet@gmail.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    9793241f
vlan_core.c 3.23 KB