]> git.baikalelectronics.ru Git - kernel.git/commit
virtio-net: XDP support for small buffers
authorJason Wang <jasowang@redhat.com>
Fri, 23 Dec 2016 14:37:32 +0000 (22:37 +0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 23 Dec 2016 18:48:56 +0000 (13:48 -0500)
commitb763d5061bab3dd6b50121f808ad0b38b2215a38
tree3fb73f7fd7545d53be8ba17d64285fffc4768eed
parent57cd3ffe06742b509518e1a6e49bb6bf6919995e
virtio-net: XDP support for small buffers

Commit 571eac349c8d ("virtio_net: Add XDP support") leaves the case of
small receive buffer untouched. This will confuse the user who want to
set XDP but use small buffers. Other than forbid XDP in small buffer
mode, let's make it work. XDP then can only work at skb->data since
virtio-net create skbs during refill, this is sub optimal which could
be optimized in the future.

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