Searched hist:"608 b9977260f67d8b032ea170666a6174a48e2f1" (Results 1 – 1 of 1) sorted by relevance
/openbmc/linux/drivers/net/ |
H A D | tun.c | diff 608b9977260f67d8b032ea170666a6174a48e2f1 Wed Apr 13 03:52:20 CDT 2016 Paolo Abeni <pabeni@redhat.com> tun: use per cpu variables for stats accounting
Currently the tun device accounting uses dev->stats without applying any kind of protection, regardless that accounting happens in preemptible process context. This patch move the tun stats to a per cpu data structure, and protect the updates with u64_stats_update_begin()/u64_stats_update_end() or this_cpu_inc according to the stat type. The per cpu stats are aggregated by the newly added ndo_get_stats64 ops.
Signed-off-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
|