netmap: Handle TX buffers larger than MCLBYTES
The generic netmap TX pool always allocates standard clusters
(zone_clust), even though the buffer size may be larger.
INVARIANTS kernels panic in nm_os_get_mbuf() on first transmit through a
non-native NIC (e.g. re or epair) using netmap with jumbo frames
configured. Release kernels silently truncate frames in
nm_os_generic_xmit_frame().
Implement cluster zone selection based on the requested size. Catch
oversized requests in nm_os_catch_tx() and return EINVAL. Add a KASSERT
before the truncation fallback in xmit. Make nm_os_get_mbuf() take a
uint32_t size, matching the type of the value passed to it.
Tested using epair, pkt-gen, and tcpdump on release (15.1) and
INVARIANTS (main) kernels at buffer sizes 2048/4096/9216/16384.
Reviewed by: vmaffione, kevans, markj
[2 lines not shown]
liblua: Accept + and e in io.popen mode
Our popen(3) accepts more than the historical "r" and "w" types. Define
the appropriate macro to provide a custom mode check accepting all valid
pipe types.
Reviewed by: kevans
Approved by: kevans (mentor)
Differential Revision: https://reviews.freebsd.org/D61175
libifconfig: Fix SFP table generators for Lua 5.5
This fixes Lua 5.5 compat in the .c template, where the first loop
variable '_' becomes const in Lua 5.5. Use select() to discard inside
the loop instead.
While here, fix a mismatched variable name in the corresponding header
template.
Reported by: Austin Horstman <khaneliman12 at gmail.com>
Reviewed by: kevans
Approved by: kevans (mentor)
Closes: https://github.com/freebsd/freebsd-src/pull/2473
Differential Revision: https://reviews.freebsd.org/D61455
lua: Prune unused luaconf.h copies
Both stand and lib use luaconf.h from contrib and make local
customizations in their respective luaconf.local.h files since
8c784bb8cf36.
Reviewed by: kevans, imp
Approved by: kevans (mentor)
Fixes: 8c784bb8cf36 ("lua: Update to 5.4.4")
MFC after: 3 days
MFC to: stable/14, stable/15
Differential Revision: https://reviews.freebsd.org/D61456
sysutils/vm-bhyve-devel: Fix plist
$ make check-plist
====> Checking for pkg-plist issues (check-plist)
===> Parsing plist
===> Checking for items in STAGEDIR missing from pkg-plist
Error: Orphaned: %%PORTEXAMPLES%%%%EXAMPLESDIR%%/freebsd-arm64.conf
Error: Orphaned: %%PORTEXAMPLES%%%%EXAMPLESDIR%%/linux-arm64.conf
===> Checking for items in pkg-plist which are not in STAGEDIR
===> Error: Plist issues found.
Approved by: portmgr (build fix blanket)
MFH: 2026Q4
(cherry picked from commit d69aa9260797b99a95351f586e632c70dcb3c421)
sysutils/vm-bhyve-devel: Fix plist
$ make check-plist
====> Checking for pkg-plist issues (check-plist)
===> Parsing plist
===> Checking for items in STAGEDIR missing from pkg-plist
Error: Orphaned: %%PORTEXAMPLES%%%%EXAMPLESDIR%%/freebsd-arm64.conf
Error: Orphaned: %%PORTEXAMPLES%%%%EXAMPLESDIR%%/linux-arm64.conf
===> Checking for items in pkg-plist which are not in STAGEDIR
===> Error: Plist issues found.
Approved by: portmgr (build fix blanket)
MFH: 2026Q4
tailscale: update to 1.104.7
Go is updated to Go 1.27.4, to explicitly resolve an issue in TLS
ClientHello where some middleboxes break connections to the Tailscale
control plane.
clang: Fix warnings in ARM GCS ACLE header
Including <arm_acle.h> in C code compiled with -Wstrict-prototypes
results in warnings (or errors if -Werror is in effect) due to missing
parameter lists for __gcspr() and __gcspopm().
Submitted upstream as PR#242286.
MFC after: 1 week
Reported by: Pete French <pete at twisted.org.uk>
Reviewed by: dim
Differential Revision: https://reviews.freebsd.org/D61503
[X86] combineX86ShuffleChain - lower to AND(FREEZE(X),MASK) for blend-with-zero shuffle patterns. (#242405)
Ensure we freeze the input to prevent `AND(poison,M) -> poison` folds.
[LoongArch] Load suitable immediates with LU12I.W+SLLI.D (#242357)
In V8[^0] and (in the future) SpiderMonkey[^1], immediates with fewer
than 19 significant bits in the upper word and all zeros in the lower
word are loaded with `LU12I.W; SLLI.D`. This shortens the current
loading sequence by 1 instruction. It especially benefits large
constants like NaN, floating-point constants, large addresses, etc.
A bonus effect is that many FP loads that originally go through constant
pools can now enjoy immediate loading with `LU12I.W; SLLI.D; MOVGR2FR.D`
and others. (See also the test changes for this.)
[^0]:
https://github.com/v8/v8/blob/cd5440417ebc15558b3fc626fb7c0cf1b6f97c66/src/codegen/loong64/macro-assembler-loong64.cc#L2083-L2085
[^1]: https://phabricator.services.mozilla.com/D342533
[LoongArch] Properly mask bits of LU{32,52}I.D in foldLargeOffset() (#242356)
`LU32I.D` sets the upper 32 bits by sign extension, and `LU52I.D` sets
the upper 12 bits[^0]. However, the current code only *toggles* bits
32--51 for `LU32I.D`, and bits 52--63 for `LU52I.D`. This leads to two
problems:
1. `LU32I.D` under-masks.
2. Bits toggled off by any of these two instructions that come first
will be toggled back on by the next.
Since the ranges of `LU32I.D` and `LU52I.D` overlap, both problems would
manifest.
Fix this by extending the upper bound of `LU32I.D`'s range to bit 63,
and using `Mask &= ~PATTERN`.
Fixes: #242341
[^0]:
https://loongson.github.io/LoongArch-Documentation/LoongArch-Vol1-EN.html#_lu12i_w_lu32i_d_lu52i_d
ixgbe: Classify missed packets only as input drops
Missed packets should be counted as drops, not as both drops
and errors. Errors should be reserved for things like link level
crc errors.
Reviewed by: kbowling
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D61523
website: Revert events with undefined dates
The website build fails because the added EuroBSDCon 2027 and
November 2027 FreeBSD Vendor Summit entries use placeholder dates
(""2027-09-xx"", ""2027-11-xx"") which cannot be parsed.
Revert these events for now. They should be re-added once the
exact dates are known.
devel/jsonnet: Update to 0.22.0
- Build with USE_SYSTEM_RAPIDYAML, so jsonnet keeps the system
rapidyaml and c4core. The rapidyaml release download is no longer
necessary.
- Add two upstream fixes for USE_SYSTEM_RAPIDYAML: the find_package()
call for ryml, and the ryml_std.hpp include in vm.cpp.
- Remove the patches for files that upstream removed or changed.
- Do not build the man pages. They need help2man.
The new CMakeLists.txt requires CMake 3.15 or later, so the port builds
with CMake 4.
PR: 298299
Changelog: https://github.com/google/jsonnet/releases/tag/v0.22.0
[mlir][scf] Compare vector reads and writes fully in parallel loop fusion (#241398)
`scf-parallel-loop-fusion` fuses a loop that writes a buffer with a later loop that reads it, when each iteration reads only what the same iteration of the first loop wrote. For vector reads it didn't check this fully: it ignored the vector types, the permutation maps, and a `vector.mask` around the write. A scalar `memref.load` after a masked `vector.transfer_write` had the same gap. After fusion, such a read can see elements before another iteration writes them.
For example, a `vector<1xf32>` write and then a `vector<4xf32>` read at the same index:
```mlir
func.func @xfer_type(%A: memref<8xf32>, %B: memref<8xf32>) {
%c0 = arith.constant 0 : index
%c1 = arith.constant 1 : index
%c5 = arith.constant 5 : index
%pad = arith.constant 0.0 : f32
%one = arith.constant dense<1.0> : vector<1xf32>
scf.parallel (%i) = (%c0) to (%c5) step (%c1) {
vector.transfer_write %one, %A[%i] {in_bounds = [true]} : vector<1xf32>, memref<8xf32>
scf.reduce
}
scf.parallel (%i) = (%c0) to (%c5) step (%c1) {
%r = vector.transfer_read %A[%i], %pad {in_bounds = [true]} : memref<8xf32>, vector<4xf32>
[14 lines not shown]
[libc][math] Add coshbf16 math function (#240859)
Closes #233065. Part of #177259.
Adds `coshbf16`, built on the shared `sinhcoshbf16_utils.h` helpers that
landed with `sinhbf16` (#224645). It computes
`eval_sinh_or_cosh</*IsSinh=*/false>` in the middle range and
`exp_half(|x|)` for |x| >= 6.875, and handles these cases directly:
- |x| <= 0x1.68p-4 rounds to 1 (or to the next value above 1 in RU).
- |x| >= 89.5 overflows to +Inf.
- NaN and Inf.
Testing:
- The exhaustive MPFR test (all bf16 inputs, all rounding modes, 0.5
ULP) passes.
- The smoke and shared-math tests pass.
Bazel targets are included, mirroring `sinhbf16`, but I haven't built
them locally.
[2 lines not shown]
[flang] Cache host variable lists for global captures (#240308)
This change addresses redundant work when lowering internal procedures
that access host globals: each internal procedure rebuilds the same host
variable list and reruns dependency analysis.
It caches the ordered variable list and selects the captured globals and
their EQUIVALENCE storage once per host. The list is reused when
lowering the host, and the selected bindings are reused by its internal
procedures in their original list order.
The cached host list and binding pointers are released after all entry
points and internal procedures have been lowered to bound retained
memory.
Tests cover host-associated scalar and EQUIVALENCE bindings across MAIN
and procedure scopes, including module storage, multiple internal
procedures and ENTRY points, zero-sized storage collisions, and mixed
EQUIVALENCE/THREADPRIVATE captures.
Assisted by GPT-6
[X86] Enable SlotIndexes compaction by default
Compacting SlotIndexes before greedy allocation drops the entries of
erased instructions, so live range sizes and instruction distances
reflect the code being allocated rather than how much was erased
before it. AMDGPU has done this since #235806; do the same for X86.
Codegen changes only through allocation: no new crashes, verifier
errors or allocation failures in the lit suites, including
EXPENSIVE_CHECKS, and a stage-2 build of LLVM, clang and lld with
-verify-machineinstrs passes its own tests. On llvm-test-suite at -O3,
spills drop 0.3% and .text 0.06%, with compile time unchanged.
Most test updates are regenerated checks. misched-matmul now inserts
20 spills instead of 24. live-debug-vars-stale-slotindexes.mir gets
one more use of %27 so that accumulate_fit still reaches the stale
index path it was written for.
[X86][APX] Test the relocation of an NF add
test_regclass_not_updated_by_regalloc_2 only produced an NDD/NF add
with a GOT operand because the allocator happened to give the add a
destination different from its source. With SlotIndexes compaction it
picks the same register, so the add is compressed to the legacy form
and the CODE_6 TODO lost its test.
Add a function whose add keeps its source live, so it stays NDD and
becomes NF under any allocation.