FreeBSD/src aafeb0e — contrib/netbsd-tests/lib/libc/gen t_assert.c

[tests] lib/libc/gen:assert_test: skip tests when NDEBUG set

In the event that NDEBUG is specified in CFLAGS--which is most likely
triggered via `MK_ASSERT_DEBUG` == "no" -- all assert(3) statements are
optimized out by design. This breaks the assert(3) tests as they
specifically rely on assert(3) actually raising a `SIGABRT` instead of
quietly succeeding.

Skip both tests if `NDEBUG` is set. There's no sense running the
`assert(true)` test if the result could instead be a false positive.

MFC after:      2 weeks

(cherry picked from commit 6f3445006aa05550f14af65b04276c3d25169941)
DeltaFile
+20-0contrib/netbsd-tests/lib/libc/gen/t_assert.c
+20-01 files

FreeBSD/src fe7fe52 — contrib/netbsd-tests/lib/libc/gen t_assert.c

[tests] lib/libc/gen:assert_test: undefine `NDEBUG`

In the event `NDEBUG` was defined, `assert` would become a no-op,
breaking some of the expectations in `assert_test` around `assert(..)`
failing generating a coredump.

This is a better approach than the previous one committed in 6f3445006a
as it continues to test the `assert(..)` function instead of just
skipping it if `NDEBUG` was defined.

Suggested by:   kevans
MFC after:      4 days
MFC with:       6f3445006a
Fixes:          6f3445006a
Differential Revision: https://reviews.freebsd.org/D60253

(cherry picked from commit 9d5a33d9c294b01cead6ff65b0773b5b5ab85ccd)
DeltaFile
+6-20contrib/netbsd-tests/lib/libc/gen/t_assert.c
+6-201 files

FreeBSD/src e4532b8 — share/mk bsd.confs.mk

share/mk/bsd.confs.mk: fix trivial typo in message

The error message noting that the file should not be included said
"bsd.conf.mk" before this change. Now it correctly says "bsd.confs.mk".

MFC after:      3 days

(cherry picked from commit a3214d4e9b661fb173fc25b06b7ee9902b0b57e3)
DeltaFile
+1-1share/mk/bsd.confs.mk
+1-11 files

FreeBSD/src a38180f — share/mk bsd.confs.mk

share/mk/bsd.confs.mk: fix trivial typo in message

The error message noting that the file should not be included said
"bsd.conf.mk" before this change. Now it correctly says "bsd.confs.mk".

MFC after:      3 days

(cherry picked from commit a3214d4e9b661fb173fc25b06b7ee9902b0b57e3)
DeltaFile
+1-1share/mk/bsd.confs.mk
+1-11 files

FreeBSD/src acc5475 — sys/arm/rockchip files.rk32xx

clk: add config(5) entry for `rk_clk_mmc.c`

This is needed in order to unbreak the build on armv7.

Reported by:    Jenkins
Fixes:          e32b082ba28b ("clk: rockchip: Add the MMC phase clock")
DeltaFile
+1-0sys/arm/rockchip/files.rk32xx
+1-01 files

FreeBSD/src 91fcc2d — contrib/atf FREEBSD-upgrade

atf/FREEBSD-upgrade: update document/rewrite in Markdown

The document does not reflect current reality with how updates/releases
should be managed with contrib/atf . Update it to a state that better
reflects current practices with git, as well as information about where
the latest version of the project can be found, etc.

This change will be used as a template for adding instructions on how to
update contrib/kyua and contrib/lutok in future commits.

MFC after:      1 month
Reviewed by:    ziaee, carlavilla
Differential Revision:  https://reviews.freebsd.org/D59879
DeltaFile
+81-32contrib/atf/FREEBSD-upgrade
+81-321 files

FreeBSD/src a50d83e — sys/dev/ice ice_common.c

ice: Roll back Tx queues after scheduler setup failures

Add Tx LAN Queues commits the PQM queue and PSM leaf before returning
success.  ice_ena_vsi_txq() can subsequently fail to create the software
scheduler node or replay its saved bandwidth configuration.  Returning
at that point leaves an allocated queue that the caller does not record.
Later queue setup can fail until a function or PF reset removes it.

Issue Disable Tx LAN Queues directly from the completed Add response
before returning a post-add error.  Keep the rollback buffer on the
stack so the allocation failure being recovered cannot also prevent
cleanup.  Remove any software node and invalidate its queue context only
after firmware accepts the disable.  Preserve the queue context and any
software node when rollback fails so active hardware state is not
hidden.

This follows the Add and Disable command lifecycle documented in the
Intel E810 Datasheet, document 613875-003, section 10.5.5.8.


    [3 lines not shown]
DeltaFile
+52-1sys/dev/ice/ice_common.c
+52-11 files

FreeBSD/src 322d422 — contrib/libarchive/libarchive archive_read_support_format_iso9660.c archive_read.c, contrib/libarchive/libarchive/test test_read_format_zip_streamable_skip.c test_archive_write_close_callback.c

libarchive: merge from vendor branch

libarchive 3.8.11

ChangeLog:
https://github.com/libarchive/libarchive/compare/v3.8.10...v3.8.11

Obtained from:  libarchive
Vendor commit:  03036ffa409a2aa1c5bbad35be2202641a040fda
MFC after:      3 days
DeltaFile
+170-0contrib/libarchive/libarchive/test/test_write_format_pax_mac_meta.c
+65-98contrib/libarchive/tar/creation_set.c
+98-48contrib/libarchive/libarchive/archive_read.c
+106-0contrib/libarchive/libarchive/test/test_archive_write_close_callback.c
+60-43contrib/libarchive/libarchive/archive_read_support_format_iso9660.c
+99-0contrib/libarchive/libarchive/test/test_read_format_zip_streamable_skip.c
+598-18988 files not shown
+2,556-46994 files

FreeBSD/src a0f2994 — sys/dev/iavf iavf_iflib.h iavf_lib.c

iavf: Report the programmed VF RSS configuration

Implement the iflib RSS key and hash query methods for register-based
and PF-managed RSS. Cache the programmed key and HENA selections so hn
can synchronize its synthetic RSS configuration with the VF without
reading hardware or issuing mailbox requests from the query path.

For PF-managed RSS, publish the snapshot only after successful replies
to both CONFIG_RSS_KEY and SET_RSS_HENA. Failed sends, rejected requests,
and missing replies leave it unavailable. Protect the snapshot with
vc_mtx and invalidate it at init, stop, mailbox loss, and reset
notification. Gate queries with the existing running, reset, and mailbox
state.

Report the first 40 key bytes used by standard IPv4/IPv6 tuples, or the
shorter key length supplied by the PF. Preserve register byte order and
report the merged HENA on the direct-programming path. Translate the six
representable IPv4/IPv6 TCP/UDP selections without treating fragment
PCTYPEs as IPv6 extension-header selections. The single-queue register

    [9 lines not shown]
DeltaFile
+84-0sys/dev/iavf/if_iavf_iflib.c
+44-6sys/dev/iavf/iavf_vc_common.c
+25-0sys/dev/iavf/iavf_lib.c
+8-0sys/dev/iavf/iavf_iflib.h
+161-64 files

FreeBSD/src 808527f — libarchive archive_read_support_format_iso9660.c archive_read.c, libarchive/test test_read_format_zip_streamable_skip.c test_archive_write_close_callback.c

Update vendor/libarchive to 3.8.11

ChangeLog:
https://github.com/libarchive/libarchive/compare/v3.8.10...v3.8.11

Obtained from:          libarchive
Libarcive commit:       03036ffa409a2aa1c5bbad35be2202641a040fda
DeltaFile
+170-0libarchive/test/test_write_format_pax_mac_meta.c
+65-98tar/creation_set.c
+98-48libarchive/archive_read.c
+106-0libarchive/test/test_archive_write_close_callback.c
+60-43libarchive/archive_read_support_format_iso9660.c
+99-0libarchive/test/test_read_format_zip_streamable_skip.c
+598-189102 files not shown
+2,614-513108 files

FreeBSD/src af58db5 — contrib/tzcode zic.8 theory.html

tzcode: Update to 2026f

MFC after:      1 week
Event:          Oslo Hackathon 2026
DeltaFile
+94-19contrib/tzcode/NEWS
+11-59contrib/tzcode/zic.c
+47-20contrib/tzcode/localtime.c
+25-39contrib/tzcode/tz-link.html
+18-20contrib/tzcode/theory.html
+9-24contrib/tzcode/zic.8
+204-1816 files not shown
+237-20112 files

FreeBSD/src a5f3339 — tests/sys/netpfil/pf igmp.py

tests/pf/igmp: fix attribute error with newer versions of scapy

This fixes the flaky testcase in CI[0].

While here:
* fix a typo in a comment
* remove an unnecessary import
* fix this deprecation warning:

  /usr/local/lib/python3.12/site-packages/scapy/contrib/igmp.py:12:
  DeprecationWarning: scapy.contrib.igmp is deprecated. Please use
  scapy.layers.igmp instead !

[0] https://ci.freebsd.org/job/FreeBSD-main-amd64-test/29813/testReport/junit/sys.netpfil.pf.igmp/py/TestIGMP__test_ip_opts/

Reviewed by:    kp
MFC after:      3 days
Sponsored by:   The FreeBSD Foundation

(cherry picked from commit d9d6e77965b32a8d2f9eeffd34e519a087e603e2)
DeltaFile
+9-10tests/sys/netpfil/pf/igmp.py
+9-101 files

FreeBSD/src a7a4583 — sys/dev/rge if_rge.c

rge: Preserve replacement mbufs after defragmentation

m_defrag() has pointer-return ownership semantics: success frees the
original chain and returns a replacement, while failure returns NULL and
leaves the original owned by the caller.  rge_encap() compared that
pointer as an integer status and could return failure after success,
causing rge_tx_task() to free its stale old head.

Pass the mbuf by reference, retain the replacement returned by
m_defrag(), and publish it to the caller before retrying DMA mapping.  A
later mapping failure is then cleaned up through the current chain, and
a successful transmission uses that same chain for BPF and TX ownership.

An unprivileged process can reach the EFBIG branch in mapped-sendfile
mode.

Signed-off-by: Andrew Griffiths <andrew at calif.io>

Reviewed by:    adrian, markj

    [4 lines not shown]
DeltaFile
+16-10sys/dev/rge/if_rge.c
+16-101 files

FreeBSD/src fec497b — sys/fs/nfsclient nfs_clrpcops.c

nfs_clrpcops.c: Get rid of bogus rpc_free_rdma_reduction() calls

The calls to rpc_free_rdma_reduction() were cruft left over from
a previous variant of the NFS over RDMA client code.  They resulted
in double free's of the reduction mbuf.

This patch gets rid of them and makes sure that reduction is only
done when an array of pages is provided, so that no anonymous pages
will be allocated.

The reduction mbuf is free'd with the rest of the argument mbuf list
in the client side krpc.

Suggested by:   ferrao at versatushpc.com.br
MFC after:      1 month
Fixes:  884ee8d6c9b4 ("nfscl: Add some glue for client side NFS over RDMA")
DeltaFile
+5-26sys/fs/nfsclient/nfs_clrpcops.c
+5-261 files

FreeBSD/src 424339c — sys/dev/rge if_rge.c

rge: fix multicast add/removal by using if_getdrvflags()

Using if_getflags() to check IFF_DRV_RUNNING is wrong;
if_getdrvflags() is required.  This issue resulted in the
multicast filter not being updated.

This was an oversight by me in my initial port.

Thanks to danilo@ for reporting it and Oleg <oleglelchuk at gmail.com>
for the fix.

PR: kern/295176
(cherry picked from commit 7aa34e12c9e198bf8b7e74370ff702def5ec2649)
DeltaFile
+1-1sys/dev/rge/if_rge.c
+1-11 files

FreeBSD/src 5211e43 — sys/dev/rge if_rge.c

rge: Fix 32-bit powerpc build

Book-E powerpc has 64-bit bus_addr_t but only a 32-bit bus_size_t.  Use
the right macros for maxsize and maxsegsize to fix the build.

Fixes:  4bf8ce037 ("if_rge: initial import of if_rge driver from OpenBSD.")
Reviewed by:    adrian
Differential Revision:  https://reviews.freebsd.org/D57794

(cherry picked from commit 2b5d1d8e298b2f5aff68fd5106d9b09d59fda907)
DeltaFile
+2-2sys/dev/rge/if_rge.c
+2-21 files

FreeBSD/src 9971ac5 — sys/dev/rge if_rge.c

rge: fix VLAN hardware tagging

Set the correct value in the TX descriptor for the vlan header.

PR: kern/295175
(cherry picked from commit 76f9bb488e77ae4cc220b0bbbc53f1a7315ef977)
DeltaFile
+1-1sys/dev/rge/if_rge.c
+1-11 files

FreeBSD/src 75a29ec — share/man/man4 rge.4, sys/dev/rge if_rgevar.h if_rge_sysctl.c

rge: add disable_aspm tunable for PCIe power management

Add a per-interface loader tunable dev.rge.%d.disable_aspm to
disable PCIe ASPM (L0s/L1) and ECPM on the RTL8125/8126/8127.

Disabling ASPM reduces latency at the cost of higher power
consumption. Default is off (ASPM left as configured by BIOS).

Signed-off-by: Christos Longros <chris.longros at gmail.com>

Reviewed by:    adrian
Differential Revision:  https://reviews.freebsd.org/D56103

(cherry picked from commit 4390c37b5c94b6de4cb4bdbcc3967efe74fa7517)
DeltaFile
+12-16sys/dev/rge/if_rge.c
+9-0share/man/man4/rge.4
+5-0sys/dev/rge/if_rge_sysctl.c
+1-0sys/dev/rge/if_rgevar.h
+27-164 files

FreeBSD/src 4f624f8 — share/man/man4 rge.4, sys/dev/rge if_rge_vendor.h if_rge.c

rge: add the Intel Killer E5000 PCI ID

This and the E3000 are both handled by the r8169 driver in Linux, and
reportedly this is infact just a straight re-brand of the RTL8126.

Tested by:      "Sinetek" on Discord
Reviewed by:    adrian
Differential Revision:  https://reviews.freebsd.org/D56917

(cherry picked from commit 92f623e4a98876c897669be0f1220887c996918e)
DeltaFile
+3-1share/man/man4/rge.4
+1-0sys/dev/rge/if_rge_vendor.h
+1-0sys/dev/rge/if_rge.c
+5-13 files

FreeBSD/src e50d25e — sys/dev/rge if_rgevar.h if_rge.c

rge: handle interface flags changes

Handle interface flags like other drivers do.

Reviewed by:    zlei, adrian
Differential Revision:  https://reviews.freebsd.org/D55728

(cherry picked from commit f7fd4e79fa0943446aa5900147f737a70c73d9e3)
DeltaFile
+9-14sys/dev/rge/if_rge.c
+2-0sys/dev/rge/if_rgevar.h
+11-142 files

FreeBSD/src 071c56d — share/man/man4 rge.4, sys/dev/rge if_rgevar.h if_rge.c

rge: make rx_process_limit a sysctl tunable

The number of packets processed per interrupt was hardcoded to 16.
Add a per-interface sysctl dev.rge.%d.rx_process_limit tunable so
users can adjust this value at runtime.

Signed-off-by: Christos Longros <chris.longros at gmail.com>

Reviewed by:    ziaee, adrian
Differential Revision:  https://reviews.freebsd.org/D56014

(cherry picked from commit 930a790c2abb3680a3449a1f9ce2eff2be7acc36)
DeltaFile
+5-0sys/dev/rge/if_rge_sysctl.c
+5-0share/man/man4/rge.4
+2-1sys/dev/rge/if_rge.c
+2-0sys/dev/rge/if_rgevar.h
+14-14 files

FreeBSD/src 652c0e8 — share/man/man4 rge.4

rge.4: fix incorrect speed range in HARDWARE section

The HARDWARE section stated "PCIe 1GB to 1GB Ethernet devices"
which is incorrect. The RTL8125/8126/8127 chips support speeds
from 1Gbps to 10Gbps. Correct the range.

Signed-off-by: Christos Longros <chris.longros at gmail.com>

rge.4: note that the driver manages PHY directly

The rge(4) driver does not use the miibus(4) interface for PHY
management. Instead, it accesses PHY registers directly via the
chip's OCP (On-Chip Peripheral) bus. Document this in the
DESCRIPTION section.

Signed-off-by: Christos Longros <chris.longros at gmail.com>

Reviewed by:    adrian
Differential Revision:  https://reviews.freebsd.org/D55995

    [2 lines not shown]
DeltaFile
+17-2share/man/man4/rge.4
+17-21 files

FreeBSD/src f2ba059 — sys/dev/rge if_rgevar.h if_rge.c

rge: use C style comments instead of C++

FreeBSD style(9) mandates C style comments. The initial import from
OpenBSD left several C++ style // comments in if_rge.c and if_rgevar.h.
Replace them with proper /* */ comments.

Also fix a malformed comment that mixed // with a closing */.

Signed-off-by: Christos Longros <chris.longros at gmail.com>

Reviewed by:    adrian
Differential Revision:  https://reviews.freebsd.org/D55743

(cherry picked from commit 9976cff55e8897f74d970567e61512103216cf58)
DeltaFile
+0-4sys/dev/rge/if_rgevar.h
+2-2sys/dev/rge/if_rge.c
+2-62 files

FreeBSD/src 99d566e — share/man/man4 rge.4, sys/dev/rge if_rge_hw.h if_rge_hw.c

rge: add Wake-on-LAN support for magic packet

Advertise IFCAP_WOL_MAGIC when PCI power management is available
and enable it by default.  On suspend or shutdown, rge_setwol()
enables the WOL_MAGIC and WOL_LANWAKE bits in CFG3/CFG5, disables
the RXDV gate, and enables PM so the NIC stays powered to watch
for magic packets.

Move hardware-specific WOL register configuration into
rge_wol_config() in if_rge_hw.c to keep hardware-specific
functions in sync with OpenBSD.

Update rge.4 to document WoL support.

Tested on FreeBSD 16.0-CURRENT bare metal with Realtek RTL8125
on a Gigabyte B650 Gaming X AX motherboard.

Signed-off-by: Christos Longros <chris.longros at gmail.com>


    [4 lines not shown]
DeltaFile
+27-30sys/dev/rge/if_rge.c
+21-34sys/dev/rge/if_rge_hw.c
+3-3share/man/man4/rge.4
+1-0sys/dev/rge/if_rge_hw.h
+52-674 files

FreeBSD/src 01e4d2b — sys/dev/rge if_rge.c

rge: log silicon revision during attach

The initial import from OpenBSD contained chip revision printf() calls
commented out, as OpenBSD's bare printf() style does not translate to
FreeBSD's device_printf() idiom. The result is that users cannot
distinguish RTL8125 from RTL8125B, RTL8125D_1, RTL8125D_2 etc. via
dmesg alone, even though all variants show as '<RTL8125>' from the PCI
probe string.

Add proper device_printf() calls including the raw hwrev value,
consistent with how re(4) reports chip revisions.

Signed-off-by: Christos Longros <chris.longros at gmail.com>

Reviewed by:    zlei, imp, adrian
Differential Revision:  https://reviews.freebsd.org/D55402

(cherry picked from commit acbf7498f5e11b00ffcd6c12bdb8bd1eddeb6d7f)
DeltaFile
+7-7sys/dev/rge/if_rge.c
+7-71 files

FreeBSD/src 818d219 — sys/dev/rge if_rge.c

rge: fix callout setup/teardown; handle invalid ethernet address

* Do the callout init early; since some of the teardown path expects
  the callout to be valid

* Handle an invalid ethernet address by generating a local one.

PR:     kern/293307

Reviewed by:    zlei
Differential Revision:  https://reviews.freebsd.org/D55419

(cherry picked from commit d5ca52182e522a192d0c8fbdaa438f50e200082f)
DeltaFile
+14-5sys/dev/rge/if_rge.c
+14-51 files

FreeBSD/src 3e5ac54 — share/man/man4 rge.4

rge.4: correct media types in the manual page

Correct media types for 1000Mbit/s, 2500Mbit/s, 5000Mbit/s and 10Gbit/s.

Reviewed by:    adrian
Differential Revision:  https://reviews.freebsd.org/D55496

(cherry picked from commit 25e89051df7ace23ae4953c21402e568cfce78b4)
DeltaFile
+8-8share/man/man4/rge.4
+8-81 files

FreeBSD/src 9c67ab2 — sys/dev/rge if_rge.c

rge: correctly free busdma memory / zero things out only if allocated

* Only free busdma memory that was allocated
* Don't free tx/rx rings until their buffers have also been freed

PR:     kern/293307

Reviewed by:    zlei
Differential Revision:  https://reviews.freebsd.org/D55420

(cherry picked from commit d1947d0a1a55f905e5ed076d46d4f75a00c6f823)
DeltaFile
+18-15sys/dev/rge/if_rge.c
+18-151 files

FreeBSD/src e1dfc6d — share/man/man4 rge.4 re.4

re(4), rge(4): improve Realtek driver man pages

Add D-Link DGE-530(T) and Killer E2600 to the re(4) HARDWARE list.
Both are supported by the driver but were missing from the man page.

Also add cross-references between re(4) and rge(4) in SEE ALSO,
as both are Realtek NIC drivers.

Signed-off-by: Christos Longros <chris.longros at gmail.com>

Reviewed by:    adrian
Differential Revision:  https://reviews.freebsd.org/D55745

(cherry picked from commit e6f4e4ab8a51f5bec178f5d937e541e227efb561)
DeltaFile
+5-0share/man/man4/re.4
+1-0share/man/man4/rge.4
+6-02 files

FreeBSD/src 4dce344 — sys/dev/rge if_rgevar.h if_rgereg.h

if_rge: sync with up to date OpenBSD code

a0b4d9e5bd63984bc3ad25b7f2881741e0d73980
Add support for RTL8126 chip revision 0x64a00000 from Carl Henriksson.
While here, update and add microcode for the RTL8126 chipset variant.

46810ff569a9416642fc5f8e86501028008a2e95
For RTL8125, there's no need to check whether RGE_CMD_STOPREQ has been
completed.  As with other chip variants, RGE_CMD_STOPREQ never acknowledges
completion.

5729fb17b5eeba56781da0b5c0525c198c5c2cd8
remove duplicate RGE_PHYSTAT_5000MBPS test

Reviewed by:    adrian
Differential Revision:  https://reviews.freebsd.org/D54517
Obtained from:  OpenBSD

(cherry picked from commit 5d73fca1f4b2bac8833e2b9233fa496059dab745)
DeltaFile
+3,506-7,285sys/dev/rge/if_rge_microcode.h
+249-48sys/dev/rge/if_rge_hw.c
+17-14sys/dev/rge/if_rge.c
+5-1sys/dev/rge/if_rgereg.h
+2-1sys/dev/rge/if_rgevar.h
+3,779-7,3495 files