From nobody Mon Nov 10 15:30:05 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d4trt0XHJz6Gs5Z; Mon, 10 Nov 2025 15:30:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d4trt023hz3xWn; Mon, 10 Nov 2025 15:30:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762788606; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fiD8qG7pcx8QwjdSfaC6PBBe4S/G3BdIlmAbmCztZX4=; b=KX/d7hsDmfAsCZu+H8YPfUukarMy3xIT2Tccl+K3Wqt1siYRD7asXzhUsZg+RHHOPeHewc VXlf6V9+QhfWGiHY57euczSVmj6fwyojRoV/e5aOlMfURJnX3ZtsvGzlXxJenoa2PUhDgp 96tEDS41OquNCxGmxGlj+gpsIUdBqtzUte5cw9TVyGzHhPIBElcsLkzOBEfJBGWDOHv1PA w65PadMNk0J/fkjvje13lvYArHyGV7PTSeip6/73N3erxZ0gghcMRDf2taKDVm4oAV95fn Si1bKV89zIld+OaRtN7fYlCtnOPURKQ8cW9pfLqDT67Q7ugnTaVQPinWC2S31Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762788606; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fiD8qG7pcx8QwjdSfaC6PBBe4S/G3BdIlmAbmCztZX4=; b=TVxTec9+yySBJ9Nwhrt/o1DlUKEJeTNblhrEW0Q/X8yjbhLpsGr4/OEjC8bbRGLGTv1DwJ 4U+t+LqIL2S7taamLted4stHJpn8dpaYTYbG2HF3fNzHDdDMOyEpfaifnwqDzng3ynpQUl iRHgBH7LH97ggV72s4f+2fuIkJz/0HzIA8ENOqzQyPnTwU1HLJuJVRAP6CDlqL+Dkga5J+ G9LMoCPRWzesqNztn5dcJW5bYM/j05huIP7yxbXw03uQcYhCj77UwdvCcvjObbgDUWO+Yw QMnxS+WsSUaGHudWXfYP6UpFDvXmhIPnvSVLoq8uRsm1TAM8FJoLBQQowSDkrw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762788606; a=rsa-sha256; cv=none; b=tsz2974pdAwNV3Q3cKd3VrWPXV2Uk1bzz7K9sqaSqetMgs8hX+wJS2V9bykvlpUaeIJOgr dlxRTPbwl9zRf5mBez0KFTD+p4gpzx2AhcgcA9531LkoyqFa0zgtU38OZ8gfQKHZ5M072L /0IDeZLfBJkmA5Zvr+oTWTuJ5cdsG2RQ3l0I3Ah6x9Ti9wTJbjfCY0/oEuamYg2IBktwfj Swp5TQYeLNY5akp9FMzLfdBkv353wi0huugHEl0JroVGM7SFAFpthq5NK9tZYOvbqXEd8z OL6iEqBDCT53721VHcD8idkk71bPwZKzcAGo7G3kGdGqX4a6++iinRujGHkfTQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d4trs6gzbz7Fx; Mon, 10 Nov 2025 15:30:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5AAFU55L003112; Mon, 10 Nov 2025 15:30:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5AAFU5vu003107; Mon, 10 Nov 2025 15:30:05 GMT (envelope-from git) Date: Mon, 10 Nov 2025 15:30:05 GMT Message-Id: <202511101530.5AAFU5vu003107@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: 836b3cd9d791 - main - vtnet: don't provide VIRTIO_NET_HDR_F_DATA_VALID List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 836b3cd9d7910aff5225e9e58189067ca03fae30 Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=836b3cd9d7910aff5225e9e58189067ca03fae30 commit 836b3cd9d7910aff5225e9e58189067ca03fae30 Author: Michael Tuexen AuthorDate: 2025-11-10 15:28:04 +0000 Commit: Michael Tuexen CommitDate: 2025-11-10 15:28:04 +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 MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D53650 --- 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;