From: Jason Wang <hidden> Date: 2017-08-16 14:14:42
From: Eric Dumazet <redacted>
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: Jason Wang <redacted>
Signed-off-by: Eric Dumazet <redacted>
Signed-off-by: Jason Wang <redacted>
---
drivers/net/tun.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
From: Jason Wang <hidden> Date: 2017-08-16 14:30:09
On 2017年08月16日 22:14, Jason Wang wrote:
From: Eric Dumazet <redacted>
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: Jason Wang <redacted>
Signed-off-by: Eric Dumazet <redacted>
Signed-off-by: Jason Wang <redacted>
---
drivers/net/tun.c | 7 +------
From: "Michael S. Tsirkin" <mst@redhat.com> Date: 2017-08-16 16:55:18
On Wed, Aug 16, 2017 at 10:14:33PM +0800, Jason Wang wrote:
From: Eric Dumazet <redacted>
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: Jason Wang <redacted>
Signed-off-by: Eric Dumazet <redacted>
Signed-off-by: Jason Wang <redacted>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Jason, given the switch to task_frag, would it be worth it to look at
using higher order allocs along the lines of
5640f7685831e088fe6c2e1f863a6805962f8e81 as well?
From: David Miller <davem@davemloft.net> Date: 2017-08-16 21:27:54
From: Jason Wang <redacted>
Date: Wed, 16 Aug 2017 22:14:33 +0800
From: Eric Dumazet <redacted>
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: Jason Wang <redacted>
Signed-off-by: Eric Dumazet <redacted>
Signed-off-by: Jason Wang <redacted>
From: Jason Wang <hidden> Date: 2017-08-17 03:37:47
On 2017年08月17日 00:55, Michael S. Tsirkin wrote:
On Wed, Aug 16, 2017 at 10:14:33PM +0800, Jason Wang wrote:
quoted
From: Eric Dumazet<redacted>
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: Jason Wang<redacted>
Signed-off-by: Eric Dumazet<redacted>
Signed-off-by: Jason Wang<redacted>
Acked-by: Michael S. Tsirkin<mst@redhat.com>
Jason, given the switch to task_frag, would it be worth it to look at
using higher order allocs along the lines of
5640f7685831e088fe6c2e1f863a6805962f8e81 as well?
I think we've already used high order, don't we?
Thanks