From: Paolo Abeni <pab...@redhat.com>
Date: Wed, 13 Apr 2016 10:52:20 +0200

> 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 <pab...@redhat.com>

Ok this seems reasonable, applied, thanks.

I guess most applications use tuntap by having two threads, one
for transmit and one for receive processing?

Reply via email to