]> git.karo-electronics.de Git - linux-beck.git/commit
virtio-net: correctly handle XDP_PASS for linearized packets
authorJason Wang <jasowang@redhat.com>
Fri, 23 Dec 2016 14:37:27 +0000 (22:37 +0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 23 Dec 2016 18:48:54 +0000 (13:48 -0500)
commit1830f8935f3b173d229b86e9927b3b6d599aa1f6
tree24c26f9855edd7c1ca04942ca4685e3ccd6671d8
parent56a86f84b8332afe8c6fcb4b09d09d9bf094e2db
virtio-net: correctly handle XDP_PASS for linearized packets

When XDP_PASS were determined for linearized packets, we try to get
new buffers in the virtqueue and build skbs from them. This is wrong,
we should create skbs based on existed buffers instead. Fixing them by
creating skb based on xdp_page.

With this patch "ping 192.168.100.4 -s 3900 -M do" works for XDP_PASS.

Cc: John Fastabend <john.r.fastabend@intel.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Acked-by: John Fastabend <john.r.fastabend@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/virtio_net.c