]> www.infradead.org Git - users/willy/pagecache.git/commit
virtio_net: fixing XDP for fully checksummed packets handling
authorHeng Qi <hengqi@linux.alibaba.com>
Mon, 17 Jun 2024 13:15:24 +0000 (21:15 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 19 Jun 2024 09:52:44 +0000 (10:52 +0100)
commit703eec1b242276f2d97d98f04790ddad319ddde4
tree9f2ce98c768533a608c3d7f78c4ac5c98d387e53
parent604141c036e1b636e2a71cf6e1aa09d1e45f40c2
virtio_net: fixing XDP for fully checksummed packets handling

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: 436c9453a1ac ("virtio-net: keep vnet header zeroed after processing XDP")
Signed-off-by: Heng Qi <hengqi@linux.alibaba.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/virtio_net.c