From nobody Fri Aug 04 01:23:37 2023 X-Original-To: dev-commits-src-all@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 4RH7Jp3RFGzZXnf; Fri, 4 Aug 2023 01:23:38 +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 4RH7Jp255Cz4Ygn; Fri, 4 Aug 2023 01:23:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691112218; 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=gIwdQddtL+EfFuoCkByeTi/+PM3WECB1MWJmzSJXy/E=; b=I8DxG+VbKTVNkbTUAFGB/s5c0TKHevHHtQQohuMlbpyaqiBBOQ4FedAb7NPl/egM2Z5wUQ HXMUt9vMye+h5CBXdeodj59spMZYhXMy2VogrbXSyVdgfpw8De0LCew8Wz9YRMRLg7GJC5 7V3xW+CiqxfJtL7XyNWkFfL45AjZCWZS5t2NLoE+/JzbqyR+cMpTmHOvScTdRwQ6xPz7c6 lWNvBMmjYMX40jhZvG5hS9SSY4XuVr0PvtVlEiRpl0Woc86Nz7pwf1dlZbUIOjL8EwzjAg 2kQao1+np0Cdkd/U4tcVLEGmWnYdORgt4Y18MA4Hor6jyJs3hxZ+00wNTEjB2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691112218; 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=gIwdQddtL+EfFuoCkByeTi/+PM3WECB1MWJmzSJXy/E=; b=GFWiVZcz9sqJLmvNFQ0IcUYlfoh9XE2ApcujZCNPBc0cI3JK3bkJLz1UglBWVInOdWi9Rn /pWOzcjIp2yWDNWm0K5JF7TgKgWfJPX5AU9ahWMKDDw2JApz2DB8lD81RfTF2PCjjorpxE mlXA88oNYsoKRj1FYFMP+XRXETh2CvwuZBNK4h7HS1iEwEjiF7xcVYX/+Avr4CoyJwUZTU Peg3enZd/7sLv6iPFWjcS2EFYoMag+eeAyNDRioUpWr+3Z7HY1f0E49uTYodo1wa+zhO/i NU2DgkZra5i0ieJJ7vHkEHGXImVsCOQt0YpB3Cr0Osd02N9z6RR4zg3EhXKjsA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691112218; a=rsa-sha256; cv=none; b=cZ/O/miG7mtKW5ireKOOdiKSCo9CnXeAR6nGnLNJLr0jnEB1w1NKAtK9eAq4LDCacaDuNV 1be6LxQxqSqlwmYcEfDOap5nGG533l0HpPkfx3nSRsaHaR/c+5hfCWFm4+3l2vDyNU/ahl nuO/XNBuj8Ynqx1j0I2DnYLRZQ775VAFml1B5Y/EC5shU2nWdrKNkd/JPMPjpigWpsiKLo v4Dus7tTOqIzbNPBv9/JdRRzXoRYRQxeriAq3ADQDcRY/TwuZW6PwoYUqPdlseLy3bLyWv EwkxnmMtKpkk1HLZAD2vsy7Rp3oQe1qftRNW2O3nxVNBv8HzLE1UAJaGURsuVQ== 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 4RH7Jp0Py5zkQ7; Fri, 4 Aug 2023 01:23:38 +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 3741NbNa021263; Fri, 4 Aug 2023 01:23:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3741NbZC021262; Fri, 4 Aug 2023 01:23:37 GMT (envelope-from git) Date: Fri, 4 Aug 2023 01:23:37 GMT Message-Id: <202308040123.3741NbZC021262@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: 17b587e0ba8e - stable/13 - e1000: Fix/enable IPv6 transmit checksum offload List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 17b587e0ba8ed4d1092537232b969b755b7a92f1 Auto-Submitted: auto-generated The branch stable/13 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=17b587e0ba8ed4d1092537232b969b755b7a92f1 commit 17b587e0ba8ed4d1092537232b969b755b7a92f1 Author: Kevin Bowling AuthorDate: 2023-07-22 22:58:34 +0000 Commit: Kevin Bowling CommitDate: 2023-08-04 01:21:41 +0000 e1000: Fix/enable IPv6 transmit checksum offload Fixes and enables txcsum6 offload for lem(4) and em(4). MFC after: 2 weeks (cherry picked from commit 4f9a44a215f873c6842a693f2e81e0abbe1531cf) --- sys/dev/e1000/em_txrx.c | 4 ++-- sys/dev/e1000/if_em.h | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/sys/dev/e1000/em_txrx.c b/sys/dev/e1000/em_txrx.c index 069a1c00a4b2..1192286d1c9c 100644 --- a/sys/dev/e1000/em_txrx.c +++ b/sys/dev/e1000/em_txrx.c @@ -285,13 +285,13 @@ em_transmit_checksum_setup(struct e1000_softc *sc, if_pkt_info_t pi, cmd |= E1000_TXD_CMD_IP; } - if (csum_flags & (CSUM_TCP|CSUM_UDP)) { + if (csum_flags & (CSUM_TCP | CSUM_UDP | CSUM_IP6_TCP | CSUM_IP6_UDP)) { uint8_t tucso; *txd_upper |= E1000_TXD_POPTS_TXSM << 8; *txd_lower = E1000_TXD_CMD_DEXT | E1000_TXD_DTYP_D; - if (csum_flags & CSUM_TCP) { + if (csum_flags & CSUM_TCP | CSUM_IP6_TCP) { tucso = hdr_len + offsetof(struct tcphdr, th_sum); cmd |= E1000_TXD_CMD_TCP; } else diff --git a/sys/dev/e1000/if_em.h b/sys/dev/e1000/if_em.h index a46ce2fdb6ae..8c5abf5b48cb 100644 --- a/sys/dev/e1000/if_em.h +++ b/sys/dev/e1000/if_em.h @@ -333,10 +333,13 @@ #define EM_TSO_SIZE 65535 #define EM_TSO_SEG_SIZE 4096 /* Max dma segment size */ #define ETH_ZLEN 60 -#define EM_CSUM_OFFLOAD (CSUM_IP | CSUM_IP_UDP | CSUM_IP_TCP) /* Offload bits in mbuf flag */ + +/* Offload bits in mbuf flag */ +#define EM_CSUM_OFFLOAD (CSUM_IP | CSUM_IP_UDP | CSUM_IP_TCP | \ + CSUM_IP6_UDP | CSUM_IP6_TCP) #define IGB_CSUM_OFFLOAD (CSUM_IP | CSUM_IP_UDP | CSUM_IP_TCP | \ CSUM_IP_SCTP | CSUM_IP6_UDP | CSUM_IP6_TCP | \ - CSUM_IP6_SCTP) /* Offload bits in mbuf flag */ + CSUM_IP6_SCTP) #define IGB_PKTTYPE_MASK 0x0000FFF0 #define IGB_DMCTLX_DCFLUSH_DIS 0x80000000 /* Disable DMA Coalesce Flush */