]> git.baikalelectronics.ru Git - kernel.git/commit
virtio-net: add missing virtqueue kick when flushing packets
authorJason Wang <jasowang@redhat.com>
Fri, 13 Apr 2018 06:58:25 +0000 (14:58 +0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 13 Apr 2018 15:26:40 +0000 (11:26 -0400)
commitbe9f43dd5f342776770307e3ae76f537db3a364c
tree2626b951ac295e8dbf8f156fbc2d63fd281514d9
parent09fa3234bad8cafe59620ceb96206160a76dc49b
virtio-net: add missing virtqueue kick when flushing packets

We tends to batch submitting packets during XDP_TX. This requires to
kick virtqueue after a batch, we tried to do it through
xdp_do_flush_map() which only makes sense for devmap not XDP_TX. So
explicitly kick the virtqueue in this case.

Reported-by: Kimitoshi Takahashi <ktaka@nii.ac.jp>
Tested-by: Kimitoshi Takahashi <ktaka@nii.ac.jp>
Cc: Daniel Borkmann <daniel@iogearbox.net>
Fixes: a7cb0cd8923a ("virtio-net: support XDP_REDIRECT")
Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/virtio_net.c