git: 0ef06b5bccf4 - stable/15 - vtnet: don't provide VIRTIO_NET_HDR_F_DATA_VALID
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 12 Nov 2025 08:40:29 UTC
The branch stable/15 has been updated by tuexen:
URL: https://cgit.FreeBSD.org/src/commit/?id=0ef06b5bccf43ca807e237122746dec122600157
commit 0ef06b5bccf43ca807e237122746dec122600157
Author: Michael Tuexen <tuexen@FreeBSD.org>
AuthorDate: 2025-11-10 15:28:04 +0000
Commit: Michael Tuexen <tuexen@FreeBSD.org>
CommitDate: 2025-11-12 08:33:33 +0000
vtnet: don't provide VIRTIO_NET_HDR_F_DATA_VALID
According to section 5.1.6.2.1 of version 1.3 of the virtio
specification, the driver MUST NOT set VIRTIO_NET_HDR_F_DATA_VALID in
the flags. So don't do that.
Reviewed by: Timo Völker
Differential Revision: https://reviews.freebsd.org/D53650
(cherry picked from commit 836b3cd9d7910aff5225e9e58189067ca03fae30)
---
sys/dev/virtio/network/if_vtnet.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/sys/dev/virtio/network/if_vtnet.c b/sys/dev/virtio/network/if_vtnet.c
index 471c6b3714b2..a61b0aac0bfa 100644
--- a/sys/dev/virtio/network/if_vtnet.c
+++ b/sys/dev/virtio/network/if_vtnet.c
@@ -2505,10 +2505,6 @@ vtnet_txq_offload(struct vtnet_txq *txq, struct mbuf *m,
hdr->csum_start = vtnet_gtoh16(sc, csum_start);
hdr->csum_offset = vtnet_gtoh16(sc, m->m_pkthdr.csum_data);
txq->vtntx_stats.vtxs_csum++;
- } else if ((flags & (CSUM_DATA_VALID | CSUM_PSEUDO_HDR)) &&
- (proto == IPPROTO_TCP || proto == IPPROTO_UDP) &&
- (m->m_pkthdr.csum_data == 0xFFFF)) {
- hdr->flags |= VIRTIO_NET_HDR_F_DATA_VALID;
}
if (flags & (CSUM_IP_TSO | CSUM_IP6_TSO)) {
@@ -2622,8 +2618,7 @@ vtnet_txq_encap(struct vtnet_txq *txq, struct mbuf **m_head, int flags)
m->m_flags &= ~M_VLANTAG;
}
- if (m->m_pkthdr.csum_flags &
- (VTNET_CSUM_ALL_OFFLOAD | CSUM_DATA_VALID)) {
+ if (m->m_pkthdr.csum_flags & VTNET_CSUM_ALL_OFFLOAD) {
m = vtnet_txq_offload(txq, m, hdr);
if ((*m_head = m) == NULL) {
error = ENOBUFS;