• J
    virtio-net: disable guest csum during XDP set · 1af400be
    Jason Wang 提交于
    [ Upstream commit e59ff2c49ae16e1d179de679aca81405829aee6c ]
    
    We don't disable VIRTIO_NET_F_GUEST_CSUM if XDP was set. This means we
    can receive partial csumed packets with metadata kept in the
    vnet_hdr. This may have several side effects:
    
    - It could be overridden by header adjustment, thus is might be not
      correct after XDP processing.
    - There's no way to pass such metadata information through
      XDP_REDIRECT to another driver.
    - XDP does not support checksum offload right now.
    
    So simply disable guest csum if possible in this the case of XDP.
    
    Fixes: 3f93522f ("virtio-net: switch off offloads on demand if possible on XDP set")
    Reported-by: NJesper Dangaard Brouer <brouer@redhat.com>
    Cc: Jesper Dangaard Brouer <brouer@redhat.com>
    Cc: Pavel Popa <pashinho1990@gmail.com>
    Cc: David Ahern <dsahern@gmail.com>
    Signed-off-by: NJason Wang <jasowang@redhat.com>
    Signed-off-by: NDavid S. Miller <davem@davemloft.net>
    Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    1af400be
virtio_net.c 81.5 KB