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")
archivers/py-unrardll: New port
unrardll is a Python wrapper around the UnRAR DLL (libunrar) that allows
listing, reading and extracting files from RAR archives, including
multi-volume and password protected archives.
WWW: https://github.com/kovidgoyal/unrardll
PR: 300310
[NFC][AMDGPU] Don't create call site AACallEdges for direct calls
AAAMDGPUMinAGPRAlloc and AAAMDGPUNoLDSDMA asked for a call site AACallEdges for
every call that is not an intrinsic, only to get its callees. For a direct call
whose callee has no callback metadata, that callee is the only one, so use it
directly, like AACallEdgesFunction does since #232616. Calls to callback brokers
still use AACallEdges, because thebroker also calls the callback target.
On a generated module with 2,001 functions and 15,986 calls,
-passes=amdgpu-attributor creates 2,001 instead of 11,987 abstract attributes,
and the median wall time goes from 95 ms to 84 ms.
This PR was assisted by AI but I reviewed all the changes.
[AST] Avoid duplicate isOutOfLine() calls (NFC) (#237621)
This is fairly expensive, so make sure we only call it once.
Improves compile-time for C++ code, by -0.4% on the clang build.
Suggested by LLM. Original motivation was to reduce ASLR noise on
beman-execution.
18525 bhyve: allocate vCPUs and their state on first use
Reviewed by: ixi meow <illumos at iximeow.net>
Reviewed by: Luqman Aden <luqman at oxide.computer>
Approved by: Gordon Ross <gordon.w.ross at gmail.com>
[NFC][Attributor] Reach fixpoint in call site AACallEdges for direct calls
A direct call whose callee has no callback metadata only calls its callee, so
its call site AACallEdges cannot change after initialization. Add the edge in
initialize and reach a fixpoint there, instead of updating the attribute twice
to find out. AACallEdgesFunction already skips the call site attribute for such
calls since #232616; both now share getOnlyCallee().
Other attributes still create call site AACallEdges for direct calls, e.g.,
AAInterFnReachability and the AMDGPU attributor. On a generated module with
2,001 functions and 15,986 calls, this removes all updates of call site
AACallEdges. The total number of updates goes from 304,263 to 272,291 with
-passes=attributor, from 207,815 to 175,843 with -passes=attributor-light, and
from 35,977 to 16,005 with -passes=amdgpu-attributor. The wall time does not
change measurably on that module, because these updates are cheap.
This PR was assisted by AI but I reviewed all the changes.
en/news: document new and returning src committers in 2026
The dates picked for the news entries is based on the date that the
entry was added in the access file under the `internal/admin` branch.
This only includes new/returning src commit bits; some docs and ports
commit bits may have been missed in this change.
Reviewed by: carlavilla
Approved by: carlavilla
Differential Revision: https://reviews.freebsd.org/D61075
[AMDGPU] Allow legal shuffles of four 16-bit lanes
Preserve packed 16-bit pairs so lowering can use op_sel and
v_pk_mov_b32 instead of extracting each half into a separate register.
Keep scalarization for other vector shapes to avoid inhibiting load
narrowing or introducing extra register copies.
[SelectionDAG] Reject promoted extracts in build-vector shuffle folds
A promoted EXTRACT_VECTOR_ELT result can be wider than the source vector element. Require matching types before constructing the shuffle mask to avoid an incorrect lane count and assertions.
[scudo] Use memmove to move leftover elements in drain. (#237444)
Rather than loop over the array and move one by one, use the memmove
function. On a 64 bit Android device, in the system_server process, the
average time went from 68ns to 55ns. The worst case also went from
~250,000ns to ~45,000ns.
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)
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)
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)
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)
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)
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]
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)
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]
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)
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)
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)
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)
if_rge: fix typo in man page
Fix the list of devices supported by the driver: RTL8125 occured
twice, should have been RTL8127 in one case.
Approved by: adrian
(cherry picked from commit cf5eed71591563ecfc7a40c28d7c4f001f903219)