From nobody Thu Oct 29 23:37:06 2026 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 4jG0xt3JHdz6xr4d for ; Thu, 29 Oct 2026 23:37: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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jG0xt1yz9z4sZR for ; Thu, 29 Oct 2026 23:37:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1793317026; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7BArNdUTPgYZl6hW0R1oZWhzuga4XoqiL18fMI2i59Q=; b=PYwY6nzWQz/1OX5YjtHuptRUO/GmubL2Kdm3ajmsYi6TiaNGyUivSR037z48oGazNMaBa5 glO13wSxRTYsEEsDfPDnRAVQR6meghgm7MBciAnNmFpsv/iFeJkcaKq+U8GkChpkTLmfTh apoO/5GPgxML8zHHC5elEzddV0De39rDkib7PhQSBSFnHpArRxlcxUcSAhFsAs4igurNw9 DsnU5XJUpc1QUboUcN0tMymDw+SODjUDygzDIT7aHXJeh4EMx+aw4dT609arouuV/ZGq1R KTKVsDgNVtg6IjpBx67cOJhlzg7ywI1cuFZoP2zM1pwrpQpByu3XSSQ73DjAzg== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1793317026; b=kqiNenAf3Utsu863rdEz+KtXEF3Lnpc3hCFa4KSaLT+PZ2i9PfUzbWtqKBqeX3ApJAxSbA 2NU9qpXO+u7NvjWKNL8pG6EWxz0k792KA7DCFp5CbgZxqr03wjTtIKb8LyaJcLdkdkx4p3 72iOebgDe3jtRjyGcdxwhE/WfQitGgX7T6ZT5m54OPaAj9rhVdUm+fdAcKzVE0f9Zij6Ib zMpbFbCPIqo0EIfmSWwyQBhHYlIAaXYEafB1TJckazounY4os50hnNWrurRIqTwyI1eJiU n8kwqOx3XObWLOTth1VPwajNNE4eNboq7phubqqO0PRysRcVwLjE59tpVel7Yw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1793317026; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7BArNdUTPgYZl6hW0R1oZWhzuga4XoqiL18fMI2i59Q=; b=yiCZ1Q42soWtOuuSX4WdNJVwiI6JjgdHrJLRWma4nB6BmiqP8HtUnLL23+5rDxz/HHGANK XzJ2bYNRbImfhjG8OAfsVsKXAymXDMQQzLtvQ0ONTAnU9THXjaS0EfSdzmkVJ1BSdMDqtt +c3CdbfQA1y1mX4zBfLLk2Ibd3/lLwrPHIPBN1E+S4hwchIyN0ks4JWml/NrBlzkh0vafM xHEtGFh5vudn6acEp0o4J1cZWkthQC7LgS5ammkJyAOFgDZCn8KSBIVMfauGmzHqZcDr1F 2pdT8Bg31jd4TNgel9F9qD1Ql6IpNI5Z3Wt6KS1dTVF0x1cYHSo0ClIiS05Kzw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jG0xt1dMlz1211 for ; Thu, 29 Oct 2026 23:37:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3c9d5 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 29 Oct 2026 23:37:06 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Sumit Saxena From: Kevin Bowling Subject: git: ae25b4889309 - stable/15 - iflib: Plumb per-packet RX hardware timestamps to mbufs List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: Commit messages for all branches of the src repository 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: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: ae25b4889309623a1015d95acfaf5ed13447380b Auto-Submitted: auto-generated Date: Thu, 29 Oct 2026 23:37:06 +0000 Message-Id: <6ae3d8a2.3c9d5.816b37b@gitrepo.freebsd.org> The branch stable/15 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=ae25b4889309623a1015d95acfaf5ed13447380b commit ae25b4889309623a1015d95acfaf5ed13447380b Author: Sumit Saxena AuthorDate: 2026-09-02 19:36:43 +0000 Commit: Kevin Bowling CommitDate: 2026-10-29 22:53:00 +0000 iflib: Plumb per-packet RX hardware timestamps to mbufs Add iri_rcv_tstmp to if_rxd_info so an isc_rxd_pkt_get() driver can report a hardware RX timestamp. Copy it into m_pkthdr.rcv_tstmp, reusing the generic mbuf timestamp path. Widen iri_flags from uint8_t to uint32_t and define the flags drivers may supply. Mask the flags before copying them into the mbuf so no other mbuf state can leak through the driver callback. Place the timestamp next to iri_frags to avoid an alignment hole, and document its nanoseconds-since-boot representation and validity flags. Bump __FreeBSD_version because changing if_rxd_info breaks KBI. Reviewed by: gallatin Signed-off-by: Sreekanth Reddy Differential Revision: https://reviews.freebsd.org/D58638 (cherry picked from commit 3c928ccadbb5d7baa3ce18d33d09d9a1d2770397) --- UPDATING | 4 ++++ share/man/man9/iflibtxrx.9 | 22 ++++++++++++++++++---- sys/net/iflib.c | 3 ++- sys/net/iflib.h | 10 +++++++++- sys/sys/param.h | 2 +- 5 files changed, 34 insertions(+), 7 deletions(-) diff --git a/UPDATING b/UPDATING index 2f056ee9d47e..9116e396bb8f 100644 --- a/UPDATING +++ b/UPDATING @@ -12,6 +12,10 @@ Items affecting the ports and packages system can be found in /usr/ports/UPDATING. Please read that file before updating system packages and/or ports. +20261029: + struct if_rxd_info now carries a receive timestamp. iflib drivers + must be rebuilt. __FreeBSD_version has been bumped to 1501506. + 20260925: less(1) has been updated to version 710, which removes the obsolete lesskey(1) utility. It is no longer built or installed, and the diff --git a/share/man/man9/iflibtxrx.9 b/share/man/man9/iflibtxrx.9 index df017dea0130..bbea0a3ed999 100644 --- a/share/man/man9/iflibtxrx.9 +++ b/share/man/man9/iflibtxrx.9 @@ -1,4 +1,4 @@ -.Dd December 17, 2020 +.Dd September 2, 2026 .Dt IFLIBTXTX 9 .Os .Sh NAME @@ -154,10 +154,24 @@ consumer queue. .It Va iri_flowid .Pq Vt "uint32_t" Value of the RSS hash for the packet. +.It Va iri_rcv_tstmp +.Pq Vt "uint64_t" +Receive timestamp in nanoseconds since boot. +The driver must set +.Dv M_TSTMP +in +.Va iri_flags +when the timestamp is valid, and may additionally set +.Dv M_TSTMP_HPREC +when the timestamp was taken by hardware at the port. .It Va iri_flags -.Pq Vt "uint" - Flags describing the operational parameters of the mbuf contained in the - receive packet. +.Pq Vt "uint32_t" +Flags to copy to the received mbuf. +Drivers may set only +.Dv M_VLANTAG , +.Dv M_TSTMP , +and +.Dv M_TSTMP_HPREC . .It Va iri_csum_flags .Pq Vt "uint32_t" Flags describing the checksum value contained in the receive packet. diff --git a/sys/net/iflib.c b/sys/net/iflib.c index 718bfc4d6508..8b6fb3fbb9f5 100644 --- a/sys/net/iflib.c +++ b/sys/net/iflib.c @@ -3240,7 +3240,7 @@ iflib_rxd_pkt_get(iflib_rxq_t rxq, if_rxd_info_t ri) } m->m_pkthdr.len = ri->iri_len; m->m_pkthdr.rcvif = ri->iri_ifp; - m->m_flags |= ri->iri_flags; + m->m_flags |= ri->iri_flags & IFLIB_IRI_VALID_FLAGS; m->m_pkthdr.ether_vtag = ri->iri_vtag; m->m_pkthdr.flowid = ri->iri_flowid; #ifdef NUMA @@ -3249,6 +3249,7 @@ iflib_rxd_pkt_get(iflib_rxq_t rxq, if_rxd_info_t ri) M_HASHTYPE_SET(m, ri->iri_rsstype); m->m_pkthdr.csum_flags = ri->iri_csum_flags; m->m_pkthdr.csum_data = ri->iri_csum_data; + m->m_pkthdr.rcv_tstmp = ri->iri_rcv_tstmp; return (m); } diff --git a/sys/net/iflib.h b/sys/net/iflib.h index d629e6b3c6b9..9bf1a1d8dbbf 100644 --- a/sys/net/iflib.h +++ b/sys/net/iflib.h @@ -66,6 +66,13 @@ typedef struct if_rxd_frag { /* bnxt supports 64 with hardware LRO enabled */ #define IFLIB_MAX_RX_SEGS 64 +/* + * iri_flags bits an isc_rxd_pkt_get() driver callback is permitted to + * set. iflib masks iri_flags against this set before copying the flags + * into an mbuf. + */ +#define IFLIB_IRI_VALID_FLAGS (M_VLANTAG | M_TSTMP | M_TSTMP_HPREC) + typedef struct if_rxd_info { /* set by iflib */ uint16_t iri_qsidx; /* qset index */ @@ -77,11 +84,12 @@ typedef struct if_rxd_info { /* updated by driver */ if_rxd_frag_t iri_frags; + uint64_t iri_rcv_tstmp; /* nanoseconds since boot */ uint32_t iri_flowid; /* RSS hash for packet */ uint32_t iri_csum_flags; /* m_pkthdr csum flags */ uint32_t iri_csum_data; /* m_pkthdr csum data */ - uint8_t iri_flags; /* mbuf flags for packet */ + uint32_t iri_flags; /* see IFLIB_IRI_VALID_FLAGS */ uint8_t iri_nfrags; /* number of fragments in packet */ uint8_t iri_rsstype; /* RSS hash type */ uint8_t iri_pad; /* any padding in the received data */ diff --git a/sys/sys/param.h b/sys/sys/param.h index 4b140fc5e4ff..14caee9369a2 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -74,7 +74,7 @@ * cannot include sys/param.h and should only be updated here. */ #undef __FreeBSD_version -#define __FreeBSD_version 1501505 +#define __FreeBSD_version 1501506 /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD,