From nobody Tue Aug 15 21:39:50 2023 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 4RQPn244lBz4qSJj; Tue, 15 Aug 2023 21:39:50 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RQPn23Fz4z4Fy4; Tue, 15 Aug 2023 21:39:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1692135590; 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=9u6w/hShzPs1ZnLvvWEKjbOhQVOiy9JZTOTqvvTqjPU=; b=UBN0pvhdOc+M4dEDneJfuRWuwxE7NhoR6LOc94QwwlNwHhh9dM1TxtkiUTGwUhNhbDhFK+ 5Y6NFRj4PBL72JROfyoMeptEkEqJpYQQHJiMuo3FriexbxfyQJ2PEH30o1WG8ixF5G7Neo zVUv+WiRrffJw7xuQbIj+zlCTYJB8hKGgiCl/476MOHFY7LOkZgbuplgB+vMAydy3doxLE ExUPBPAZzjafIEI3of9YMOT3yqnbWz+Jounwrej9fwnX+GTQYBsYzEUR0913OfnRwWhylK +kB2gNTlsETbgubdbpW/QIItJQnSTgLIBMfr9ePKMPRfcJrQYcEYAE2SuWqJWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1692135590; 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=9u6w/hShzPs1ZnLvvWEKjbOhQVOiy9JZTOTqvvTqjPU=; b=WBgvVHnEKxVPmJrN5h1fshDyW9aVeCuOJ4O7E6W1uQZJSFlHL5Fds49UZ9es11caT6Mkf1 SKm71TMRdDd3D+RhxLUYZetOugnpC1yMiNw8W73FI+0t+5llUsK5Es7x1hzSDqpvUeH/mf i/hjnlG8W0WxqCN3u3lnPJNuv5mycxQO3KKmd5d9rTmeVTg+mf47s548R9ihhdcHllooNZ +k/sQQFmQPe9XL/mzR5U5pAgY5N9phhF9FgYgMR0BCYHykPY8mw5s28+HL5HefJejWqqKa h8hiqoXN/+kPWAqr8pg6nAjZ/7iFaAqEJ+DctrOFeNL8vyqQ2kucs4YZVEI+7Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1692135590; a=rsa-sha256; cv=none; b=yJ3KAB+37c4rMXovO9nfnohVrXgBvYls+0oRzR2PZxRMTmGoiRi7AUxcBhwPXs4vQXkg6S jDk7l35AtbYVeyj1hmP9tWYIRLXawpgXOCkjkIBL38ElenZunMQvHhJML5G5smW1zdIghZ BxWiyZ+7Y/7ftVPsPgNiB1ZoflcxrLY009Cq8jkC1cxKlr6BAhiPuGmaYSx6R1bAZZ+cs0 k1txk0NqCTTwwZSaBS8R8LYVpYv6mF7GwZbrF7MVSG7lZXyMQaE8ZhlQ6qjjY/fHQrmm1Q KwgHQqObd9xUl5F7WlRzm7xKL5l/iJ1/mBMnFwraP+b5srT/ZZKADZUNy0nA7Q== 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 4RQPn22BZ8zBNT; Tue, 15 Aug 2023 21:39:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 37FLdonP026291; Tue, 15 Aug 2023 21:39:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37FLdoXT026288; Tue, 15 Aug 2023 21:39:50 GMT (envelope-from git) Date: Tue, 15 Aug 2023 21:39:50 GMT Message-Id: <202308152139.37FLdoXT026288@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kevin Bowling Subject: git: eac761e967b3 - main - e1000: Fix off by one ipcse 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: eac761e967b34066aa7183474249df87d79a2f32 Auto-Submitted: auto-generated The branch main has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=eac761e967b34066aa7183474249df87d79a2f32 commit eac761e967b34066aa7183474249df87d79a2f32 Author: Kevin Bowling AuthorDate: 2023-08-15 21:37:43 +0000 Commit: Kevin Bowling CommitDate: 2023-08-15 21:39:35 +0000 e1000: Fix off by one ipcse This has been off by one in the FreeBSD drivers as far back as I've looked. Emperically HW and SW emulations I have available don't seem to mind. Noticed while debugging other issues. MFC after: 3 days --- sys/dev/e1000/em_txrx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/e1000/em_txrx.c b/sys/dev/e1000/em_txrx.c index b90ab21cd825..765458d621f9 100644 --- a/sys/dev/e1000/em_txrx.c +++ b/sys/dev/e1000/em_txrx.c @@ -290,7 +290,7 @@ em_transmit_checksum_setup(struct e1000_softc *sc, if_pkt_info_t pi, offsetof(struct ip, ip_sum); if (csum_flags & CSUM_IP) { *txd_upper |= E1000_TXD_POPTS_IXSM << 8; - TXD->lower_setup.ip_fields.ipcse = htole16(hdr_len); + TXD->lower_setup.ip_fields.ipcse = htole16(hdr_len - 1); cmd |= E1000_TXD_CMD_IP; } else if (csum_flags & (CSUM_IP6_TCP | CSUM_IP6_UDP)) TXD->lower_setup.ip_fields.ipcse = htole16(0);