Re: [PATCH] tun: make tun_build_skb() thread safe

2017-08-16 Thread Jason Wang
On 2017年08月17日 00:55, Michael S. Tsirkin wrote: On Wed, Aug 16, 2017 at 10:14:33PM +0800, Jason Wang wrote: From: Eric Dumazet tun_build_skb() is not thread safe since it uses per queue page frag, this will break things when multiple threads are sending through same queue. Switch to use per-t

Re: [PATCH] tun: make tun_build_skb() thread safe

2017-08-16 Thread David Miller
From: Jason Wang Date: Wed, 16 Aug 2017 22:14:33 +0800 > From: Eric Dumazet > > tun_build_skb() is not thread safe since it uses per queue page frag, > this will break things when multiple threads are sending through same > queue. Switch to use per-thread generator (no lock involved). > > Fixe

Re: [PATCH] tun: make tun_build_skb() thread safe

2017-08-16 Thread Michael S. Tsirkin
On Wed, Aug 16, 2017 at 10:14:33PM +0800, Jason Wang wrote: > From: Eric Dumazet > > tun_build_skb() is not thread safe since it uses per queue page frag, > this will break things when multiple threads are sending through same > queue. Switch to use per-thread generator (no lock involved). > > F

Re: [PATCH] tun: make tun_build_skb() thread safe

2017-08-16 Thread Jason Wang
On 2017年08月16日 22:14, Jason Wang wrote: From: Eric Dumazet tun_build_skb() is not thread safe since it uses per queue page frag, this will break things when multiple threads are sending through same queue. Switch to use per-thread generator (no lock involved). Fixes: 66ccbc9c87c2 ("tap: use

[PATCH] tun: make tun_build_skb() thread safe

2017-08-16 Thread Jason Wang
From: Eric Dumazet tun_build_skb() is not thread safe since it uses per queue page frag, this will break things when multiple threads are sending through same queue. Switch to use per-thread generator (no lock involved). Fixes: 66ccbc9c87c2 ("tap: use build_skb() for small packet") Tested-by: Ja