From: jan Date: Fri, 16 Aug 2024 13:02:44 +0000 (+0000) Subject: vio(4): Don't set IPv4 checksum OK flag for rx packets. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=9ec2faa373e12455a6b382f2b3af3dc82389999f;p=openbsd vio(4): Don't set IPv4 checksum OK flag for rx packets. The virtio specification just address TCP/UDP checksum offloading. Thus, we have to check the IPv4 checksum in our stack. ok sf@ --- diff --git a/sys/dev/pv/if_vio.c b/sys/dev/pv/if_vio.c index e6168ca3823..49013140134 100644 --- a/sys/dev/pv/if_vio.c +++ b/sys/dev/pv/if_vio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_vio.c,v 1.45 2024/08/01 11:13:19 sf Exp $ */ +/* $OpenBSD: if_vio.c,v 1.46 2024/08/16 13:02:44 jan Exp $ */ /* * Copyright (c) 2012 Stefan Fritsch, Alexander Fiveg. @@ -1133,9 +1133,6 @@ vio_rx_offload(struct mbuf *m, struct virtio_net_hdr *hdr) ether_extract_headers(m, &ext); - if (ext.ip4) - SET(m->m_pkthdr.csum_flags, M_IPV4_CSUM_IN_OK); - if (ext.tcp) { SET(m->m_pkthdr.csum_flags, M_TCP_CSUM_IN_OK); if (ISSET(hdr->flags, VIRTIO_NET_HDR_F_NEEDS_CSUM))