• Jason Wang's avatar
    virtio-net: do not reset during XDP set · 4941d472
    Jason Wang authored
    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: default avatarJason Wang <jasowang@redhat.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    4941d472
virtio_net.c 70.4 KB