From nobody Fri Aug 21 03:20:26 2026 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 4hR5Ct4dxnz6pcnb for ; Fri, 21 Aug 2026 03:20:26 +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 "YR2" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4hR5Ct3sSkz3L0B for ; Fri, 21 Aug 2026 03:20:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1787282426; 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=01w5fm3YynS133Kivx73t03HSo4cS/QjqK9/ymKtfnQ=; b=Iix+PJH+D+yANn8s/XqteTsple9nyrHZ0ip1AbZqc38p8eDo4dGBXxFRV8l+q1VAnVgjfT B435V3oa66YELyVTSf50GIRaVgXppphS+EROQnSc2+YDjNvC2xuaNBwxAiShd8SJVhaRP0 h2fqYwPxVgocoEe2pApxgigzbstSLS4ruTjGg6WlhUNXI9waD3WljHx16D2PbYXO0i1BGF qjFLZywaCRZONJmCgvfOebOlL2CcRiyhcoML3spUiZAY2gGBmctPxSZR+bDlAdrqdcBwlT vv1ZPNgWRGpVhn/6W9ei57qDXwE/S28rBe9zPlMbn69aTqi7V43GsODfM65QGQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1787282426; a=rsa-sha256; cv=none; b=xU+9ch6vxVniFM66drQP6ayQZEoA/O3QtPpp5jnuIbavXfI/fFYpcxFWkq7nzIibXKcOUE Sz6tRiat4Vhzsw9k9RbyYih46SeazOO4DsEXXrfIpV4tQTDtKYX2S2tccLpD+/1LzI8u8q 5VGbFEZFXv74f9v6hT+4fzj6JtEzCcAkMlLd82Rrnyn4tHluKiwt9dSYSPQ4SNYEGqjC1x iBt4iwqFM1qMz6lg74TnRq7d1Vc/uBPs8WR/kT30FfzOm0NnXPNqsvAokkHc53ZvbzQkaQ LF9f1ypzCFX/oAaY8FSN1b87FoVFRcTVR/FZdTa0pVDzrbMFSLRcAm4xpLdXhw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1787282426; 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=01w5fm3YynS133Kivx73t03HSo4cS/QjqK9/ymKtfnQ=; b=e945ncqFSEOOLvzqhlO4rD1c7TnVQmmwEYQTV4ppNWixl27KamuAaPXadwKPnqu2yh0Kqs r8Y/EVQja4N9pe2QJIlQWGL3+R1PivV7w8f10Blqhk8Qjhc7W917UxMUAdTrvtSWxHnkCz oL7yGTKNM4BeDpxN9NrztTVwMy9bqlI09yabEzBN2ntCOipISzpl+NOa2nKwrJrjVbd9dN 5t0YFY14GC7yF6RpvkfD7k4GOsMWGAKF6x/3sq/a53S3RVYub6XYbppcuJKvNhDN7vx10w t0NfJPuspQDnlzVBYRLEIG4RL0r6NETHOIYW1h5tFi+2SGnRlAfHgikN6rEiVA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4hR5Ct2j2CzmGQ for ; Fri, 21 Aug 2026 03:20:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3d301 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 21 Aug 2026 03:20:26 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Justin Hibbits Subject: git: 240d81169286 - main - dpaa/dtsec: advertise RX/TX csum 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 List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhibbits X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 240d81169286cd436368644f863aa1dea996fdee Auto-Submitted: auto-generated Date: Fri, 21 Aug 2026 03:20:26 +0000 Message-Id: <6a87c3fa.3d301.7750e483@gitrepo.freebsd.org> The branch main has been updated by jhibbits: URL: https://cgit.FreeBSD.org/src/commit/?id=240d81169286cd436368644f863aa1dea996fdee commit 240d81169286cd436368644f863aa1dea996fdee Author: Justin Hibbits AuthorDate: 2026-08-10 18:26:54 +0000 Commit: Justin Hibbits CommitDate: 2026-08-21 03:17:55 +0000 dpaa/dtsec: advertise RX/TX csum Apply 6464974 to dTSEC, since it supports the same offload capabilities as mEMAC. The DPAA_CSUM_TX_OFFLOAD macro moves from if_memac.c to the shared dpaa_eth.h since both drivers now reference it. --- sys/dev/dpaa/dpaa_eth.h | 4 ++++ sys/dev/dpaa/if_dtsec.c | 20 +++++++++++++++++++- sys/dev/dpaa/if_memac.c | 2 -- 3 files changed, 23 insertions(+), 3 deletions(-) diff --git a/sys/dev/dpaa/dpaa_eth.h b/sys/dev/dpaa/dpaa_eth.h index cc46dc5485d6..a897b43b725e 100644 --- a/sys/dev/dpaa/dpaa_eth.h +++ b/sys/dev/dpaa/dpaa_eth.h @@ -27,6 +27,10 @@ #ifndef DPAA_ETH_H_ #define DPAA_ETH_H_ +/* * TX csum-offload hwassist mask for dTSEC and mEMAC. */ +#define DPAA_CSUM_TX_OFFLOAD \ + (CSUM_IP | CSUM_DELAY_DATA | CSUM_DELAY_DATA_IPV6) + struct dpaa_pcpu_cnt { u_int cnt; } __aligned(CACHE_LINE_SIZE); diff --git a/sys/dev/dpaa/if_dtsec.c b/sys/dev/dpaa/if_dtsec.c index 0d886abc5345..a0ea6e69dee3 100644 --- a/sys/dev/dpaa/if_dtsec.c +++ b/sys/dev/dpaa/if_dtsec.c @@ -244,6 +244,7 @@ dtsec_if_ioctl(if_t ifp, u_long command, caddr_t data) { struct dtsec_softc *sc; struct ifreq *ifr; + uint32_t changed; int error; sc = if_getsoftc(ifp); @@ -272,6 +273,20 @@ dtsec_if_ioctl(if_t ifp, u_long command, caddr_t data) DTSEC_UNLOCK(sc); break; + case SIOCSIFCAP: + changed = if_getcapenable(ifp) ^ ifr->ifr_reqcap; + if ((changed & (IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6)) != 0) + if_togglecapenable(ifp, + IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6); + if ((changed & (IFCAP_TXCSUM | IFCAP_TXCSUM_IPV6)) != 0) { + if_togglecapenable(ifp, + IFCAP_TXCSUM | IFCAP_TXCSUM_IPV6); + if_togglehwassist(ifp, DPAA_CSUM_TX_OFFLOAD); + } + if ((changed & IFCAP_LRO) != 0) + if_togglecapenable(ifp, IFCAP_LRO); + break; + case SIOCGIFMEDIA: case SIOCSIFMEDIA: error = ifmedia_ioctl(ifp, ifr, &sc->sc_base.sc_mii->mii_media, @@ -515,8 +530,11 @@ dtsec_attach(device_t dev) if_setsendqready(ifp); #endif - if_setcapabilities(ifp, IFCAP_JUMBO_MTU | IFCAP_VLAN_MTU); + if_setcapabilities(ifp, IFCAP_JUMBO_MTU | IFCAP_VLAN_MTU | + IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6 | + IFCAP_TXCSUM | IFCAP_TXCSUM_IPV6); if_setcapenable(ifp, if_getcapabilities(ifp)); + if_sethwassist(ifp, DPAA_CSUM_TX_OFFLOAD); /* Attach PHY(s) */ error = mii_attach(sc->sc_base.sc_dev, &sc->sc_base.sc_mii_dev, diff --git a/sys/dev/dpaa/if_memac.c b/sys/dev/dpaa/if_memac.c index 6d0fa3f5e337..047cfea323a6 100644 --- a/sys/dev/dpaa/if_memac.c +++ b/sys/dev/dpaa/if_memac.c @@ -89,8 +89,6 @@ #define DEFAULT_PAUSE_QUANTA 0xf000 -#define DPAA_CSUM_TX_OFFLOAD (CSUM_IP | CSUM_DELAY_DATA | CSUM_DELAY_DATA_IPV6) - /** * @group FMan MAC routines.