tuntap: correctly add the missing XDP flush
authorJason Wang <jasowang@redhat.com>
Sat, 24 Feb 2018 03:32:26 +0000 (11:32 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 9 Mar 2018 06:41:17 +0000 (22:41 -0800)
commit1903344b6320e18b82cb9f49c0e9b8fd0f80b695
tree1f7c4135fc66141c777afdcb8f9e1d676fe52d2f
parentabb4a8b870b5c644c9bb6d9bd372298002f0a65f
tuntap: correctly add the missing XDP flush

[ Upstream commit 1bb4f2e868a2891ab8bc668b8173d6ccb8c4ce6f ]

We don't flush batched XDP packets through xdp_do_flush_map(), this
will cause packets stall at TX queue. Consider we don't do XDP on NAPI
poll(), the only possible fix is to call xdp_do_flush_map()
immediately after xdp_do_redirect().

Note, this in fact won't try to batch packets through devmap, we could
address in the future.

Reported-by: Christoffer Dall <christoffer.dall@linaro.org>
Fixes: 761876c857cb ("tap: XDP support")
Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/tun.c