]> git.baikalelectronics.ru Git - kernel.git/commit
virtio-net: do not reset during XDP set
authorJason Wang <jasowang@redhat.com>
Wed, 19 Jul 2017 08:54:48 +0000 (16:54 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 24 Jul 2017 20:37:00 +0000 (13:37 -0700)
commit48c25b1545369affb828d89a30fc8b829f731d38
tree4ec5fbe67190226d8402a1a73f42a4472079a3fb
parent3a32edd9b77f5a18c751e2a9c6707909ad1eb3ec
virtio-net: do not reset during XDP set

We currently reset the device during XDP set, the main reason is
that we allocate more headroom with XDP (for header adjustment).

This works but causes network downtime for users.

Previous patches encoded the headroom in the buffer context,
this makes it possible to detect the case where a buffer
with headroom insufficient for XDP is added to the queue and
XDP is enabled afterwards.

Upon detection, we handle this case by copying the packet
(slow, but it's a temporary condition).

Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/virtio_net.c