• Heng Qi's avatar
    virtio_net: fixing XDP for fully checksummed packets handling · 703eec1b
    Heng Qi authored
    The XDP program can't correctly handle partially checksummed
    packets, but works fine with fully checksummed packets. If the
    device has already validated fully checksummed packets, then
    the driver doesn't need to re-validate them, saving CPU resources.
    
    Additionally, the driver does not drop all partially checksummed
    packets when VIRTIO_NET_F_GUEST_CSUM is not negotiated. This is
    not a bug, as the driver has always done this.
    
    Fixes: 436c9453 ("virtio-net: keep vnet header zeroed after processing XDP")
    Signed-off-by: default avatarHeng Qi <hengqi@linux.alibaba.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    703eec1b
virtio_net.c 161 KB