Skip to content
Snippets Groups Projects
Select Git revision
  • e59ff2c49ae16e1d179de679aca81405829aee6c
  • vme-testing default
  • ci-test
  • master
  • remoteproc
  • am625-sk-ov5640
  • pcal6534-upstreaming
  • lps22df-upstreaming
  • msc-upstreaming
  • imx8mp
  • iio/noa1305
  • vme-next
  • vme-next-4.14-rc4
  • v4.14-rc4
  • v4.14-rc3
  • v4.14-rc2
  • v4.14-rc1
  • v4.13
  • vme-next-4.13-rc7
  • v4.13-rc7
  • v4.13-rc6
  • v4.13-rc5
  • v4.13-rc4
  • v4.13-rc3
  • v4.13-rc2
  • v4.13-rc1
  • v4.12
  • v4.12-rc7
  • v4.12-rc6
  • v4.12-rc5
  • v4.12-rc4
  • v4.12-rc3
32 results

virtio_net.c

  • Jason Wang's avatar
    e59ff2c4
    virtio-net: disable guest csum during XDP set · e59ff2c4
    Jason Wang authored
    
    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: default avatarJesper 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: default avatarJason Wang <jasowang@redhat.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    e59ff2c4
    History
    virtio-net: disable guest csum during XDP set
    Jason Wang authored
    
    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: default avatarJesper 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: default avatarJason Wang <jasowang@redhat.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>