FreeBSD/src 049331bsys/dev/ixgbe ixgbe.h if_ix.c

ixgbe: Report SR-IOV VF status

Expose cached VF configuration, policy, and runtime state through the
iflib VF status method.  Include access or trunk VLAN mode, transmit and
receive queue counts selected by the current virtualization mode,
negotiated mailbox API, PF traffic permission, fault containment, and
quarantine state.

Initialize every cached API version before VF enumeration so an
unconfigured slot cannot be mistaken for API 1.0.

The query does not issue mailbox requests or read hardware registers.

Sponsored by:   BBOX.io
DeltaFile
+104-1sys/dev/ixgbe/if_sriov.c
+3-1sys/dev/ixgbe/ixgbe_sriov.h
+2-1sys/dev/ixgbe/if_ix.c
+1-0sys/dev/ixgbe/ixgbe.h
+110-34 files

FreeBSD/src 6d3e3afsys/netinet tcp_usrreq.c

tcp: remove redundant assignments

Since the struct inpcb in embedded in the struct tcpcb, the
relationship can't change. So there is no need to reassign the tp
anymore.
No functional change intended.

Reported by:            Hannes Elfert
Reviewed by:            glebius
MFC after:              1 week
MFC to:                 stable/15
Differential Revision:  https://reviews.freebsd.org/D59384
DeltaFile
+0-2sys/netinet/tcp_usrreq.c
+0-21 files

FreeBSD/src 8d14fc8sys/dev/e1000 if_em.c if_igb_iov.h

igb: Report SR-IOV VF status

Expose cached per-VF configuration through the iflib VF status method.
Report mailbox handshake state, MAC address, access or trunk VLAN mode,
hardware transmit and receive queue counts, administrator policy, and
fault-containment state.

The query does not issue mailbox requests or read hardware registers.

Sponsored by:   BBOX.io
DeltaFile
+67-0sys/dev/e1000/if_igb_iov.c
+2-0sys/dev/e1000/if_igb_iov.h
+1-0sys/dev/e1000/if_em.c
+70-03 files

FreeBSD/src 9872a04sys/sys param.h

Bump __FreeBSD_version for SR-IOV VF status

Bump for the new ifnet and iflib VF-status provider KBI and the
rtnetlink VF-status interface.
DeltaFile
+1-1sys/sys/param.h
+1-11 files

FreeBSD/src 41418a7sbin/ifconfig ifconfig.h ifconfig_netlink.c, usr.sbin/iovctl iovctl.conf.5 iovctl.8

ifconfig: Add SR-IOV VF status output

Add NIC-specific VF status to the existing ifconfig -v output.  Fetch
the data through libifconfig using a separate native route Netlink
query.

Group optional identity, initialization, resources, VLAN policy,
administrator policy, protocol, traffic-permission, and
fault containment fields.  Omitted fields remain distinct from false or
zero.

Refer users to iovctl -L for device-neutral PCI attachment and
passthrough state.

This is a Netlink-native evolution of the original interface by Eric
Joyner.

Relnotes:       yes
Sponsored by:   Intel Corporation (initial version)

    [4 lines not shown]
DeltaFile
+300-0sbin/ifconfig/ifvfstatus.c
+69-1sbin/ifconfig/ifconfig.8
+9-1usr.sbin/iovctl/iovctl.8
+5-3sbin/ifconfig/ifconfig_netlink.c
+8-0usr.sbin/iovctl/iovctl.conf.5
+3-0sbin/ifconfig/ifconfig.h
+394-51 files not shown
+395-57 files

FreeBSD/src a8eca53lib/libifconfig Symbol.map libifconfig.h

libifconfig: Add a native SR-IOV VF status query

Request RTEXT_FILTER_VF through route Netlink and parse the common VF
status schema into typed public structures.  Preserve per-field
presence using IFLAF_VF_* attribute numbers as mask bit indices so
callers can distinguish omitted values from false or zero.

Validate required VF indices, repeated driver namespaces, and their
versioned typed fields while allowing unknown optional attributes.

Return VF records through a pointer vector so append-only growth of the
public VF structure does not change the array stride seen by existing
consumers.

Sponsored by:   BBOX.io
Differential Revision:  https://reviews.freebsd.org/D58777
DeltaFile
+303-0lib/libifconfig/libifconfig_nl.c
+109-0lib/libifconfig/libifconfig.h
+5-0lib/libifconfig/Symbol.map
+417-03 files

FreeBSD/src 2019f3dshare/man/man4 rtnetlink.4, sys/net if_vf_status.h if.c

rtnetlink: Add native SR-IOV VF status

Add a transport neutral kernel snapshot for NIC-specific SR-IOV VF
status and an optional iflib provider method.  Providers gather state
under driver defined synchronization.

Honor RTEXT_FILTER_VF on RTM_GETLINK requests and encode the status as
native typed route Netlink attributes.  Represent VFs, driver
namespaces, and namespace fields as directly repeated nested attributes.
Presence masks in consumers can distinguish omission from false or zero.

Drivers may add custom status under stable, versioned namespaces.  The
named, typed representation lets generic transports and consumers carry
or display fields without knowing their driver-specific schemas, while
the driver retains ownership of their names and meanings.

Document the ABI and add parser and RTM_GETLINK coverage.

Reviewed by:    melifaro, iflib (gallatin), kgalazka (previous version)

    [2 lines not shown]
DeltaFile
+584-20sys/netlink/route/iface.c
+413-0tests/sys/netlink/test_snl.c
+355-0sys/netlink/netlink_snl_route_parsers.h
+187-1share/man/man4/rtnetlink.4
+165-0sys/net/if.c
+157-0sys/net/if_vf_status.h
+1,861-2111 files not shown
+2,175-2317 files

FreeBSD/src 7e34176sys/dev/dpaa2 dpaa2_io.h dpaa2_swp.h

dpaa2: Make software portal holdoff time a sysctl tunable

When debugging the D59463 review, it is very handy to be able
to change the software portal holdoff time without recompiling
the kernel. This commit makes the holdoff time a sysctl tunable,
so it can be changed at runtime.

Tested by:              dsl
Obtained from:          flo_purplekraken.com
MFC after:              3 weeks
Differential Revision:  https://reviews.freebsd.org/D59461
Event:                  Berlin Hackathon 202609
DeltaFile
+53-1sys/dev/dpaa2/dpaa2_io.c
+10-8sys/dev/dpaa2/dpaa2_swp.c
+6-2sys/dev/dpaa2/dpaa2_swp.h
+3-0sys/dev/dpaa2/dpaa2_io.h
+72-114 files

FreeBSD/src 4c84a6alibexec/rc/tests Makefile svcj_test.sh

rc.subr tests: service jail behaviour of run_rc_command

Twenty cases over where each rc option and each method executes for a
jailed service, the jail's lifetime, and the svcj option handling.  Each
case drives the service inside a chroot built in its ATF work directory.

MFC after:              1 week
MFC to:                 stable/15
Assisted-by:    Claude Code (Opus 5)

(cherry picked from commit b5dcd8f9d6ae702adbc1627839b5235a28839370)
DeltaFile
+1,178-0libexec/rc/tests/svcj_test.sh
+1-1libexec/rc/tests/Makefile
+1,179-12 files

FreeBSD/src af97285libexec/rc rc.subr, share/man/man5 rc.conf.5

rc.subr: svcj - add a setaudit option

setaudit(8) is prefixed to the command inside the jail when
${name}_audit_user is set, and needs allow.setaudit.

This is not added automatically when ${name}_audit_user is set, this
needs an administrative setting of the options on purpose.

MFC after:      1 week
MFC to:         stable/15

(cherry picked from commit 9125bc0727dbbf82b1c6a5f7c380f7b8c27b74dd)
DeltaFile
+5-1share/man/man5/rc.conf.5
+3-0libexec/rc/rc.subr
+8-12 files

FreeBSD/src f1cc2f5share/man/man5 rc.conf.5

rc.conf.5: note that a negative nice value does not reach a service jail

Raising a process' priority is not permitted inside a jail, and nice(1)
warns and executes the command anyway, so the service comes up at its login
class priority.

Not changing the date, as a commit a moment before this, one changed it
already.

MFC after:      1 week
MFC to:         stable/15

(cherry picked from commit be834d62e990b58eb2e67ce9b48b635b645dcea1)
DeltaFile
+8-0share/man/man5/rc.conf.5
+8-01 files

FreeBSD/src f74c4cblibexec/rc rc.subr

rc.subr: svcj - run a service's own restart and status methods in its jail

A script that defines non-default restart_cmd or status_cmd should
execute them in the service jail.  Where there is no jail to enter,
restart starts the service instead of failing.

Fixes:                  2efbd480f1d3 rc: add service jails framework
MFC after:              1 week
MFC to:                 stable/15
Assisted-by:    Claude Code (Opus 5)

(cherry picked from commit 327dae5081059eb97af0cf319a444b3937ff4db2)
DeltaFile
+17-1libexec/rc/rc.subr
+17-11 files

FreeBSD/src 37a4bc1libexec/rc rc.subr

rc.subr: svcj - remove the service jail when the service is not running

A service whose tracked process had died while another process of its own
kept the jail alive, therefore left svcj-${name} behind, and the next start
would fail.

Fixes:                  2efbd480f1d3 rc: add service jails framework
MFC after:              1 week
MFC to:                 stable/15
Assisted-by:    Claude Code (Opus 5)

(cherry picked from commit a70ca1ebd8add7ea99b5674de715ae5fbf389dce)
DeltaFile
+4-0libexec/rc/rc.subr
+4-01 files

FreeBSD/src 2c9ed2blibexec/rc rc.conf rc.subr

rc.subr: svcj - let svcj_all_enable enable service jails

Fix the logic for svcj_all_enable.

Fixes:          2efbd480f1d3 rc: add service jails framework
MFC after:      1 week
MFC to:         stable/15

(cherry picked from commit 21e53eeaffcac0be3427b7edb3b8739344a65174)
DeltaFile
+2-1libexec/rc/rc.subr
+2-0libexec/rc/rc.conf
+4-12 files

FreeBSD/src e48af5flibexec/rc rc.subr

rc.subr: svcj - send the stop signal from inside the service jail

A service running under ${name}_user was signalled from the host as that
user, which the parent of a jail may no longer do: since 8a5ceebece03 an
unprivileged process would need allow.unprivileged_parent_tampering.
Stop and reload therefore failed and left both the service and its jail
running.

MFC after:      1 week
MFC to:         stable/15

(cherry picked from commit 6155e17019f6ae08c74913b7ffb9312434f33a9f)
DeltaFile
+3-0libexec/rc/rc.subr
+3-01 files

FreeBSD/src f66c868usr.bin/look look.c

look(1): Capsicumise

Reviewed by:    fuz, oshogbo
Approved by:    fuz (mentor)
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1489
DeltaFile
+47-16usr.bin/look/look.c
+47-161 files

FreeBSD/src f63ed60sys/kern kern_fork.c

sys/kern/kern_fork.c: fix typo in error message
DeltaFile
+1-1sys/kern/kern_fork.c
+1-11 files

FreeBSD/src 5c45e22sys/dev/ixgbe if_ix.c

ixgbe: Probe additional controller variants

The shared base code already selects and configures the 82598 BX,
82599 KR, 82599 SFP Express Module, X552 XFI, X553 QSFP, and X553 N
QSFP device IDs, but the FreeBSD probe table omits them while DPDK lists
them.

Sponsored by:   BBOX.io

(cherry picked from commit 27f0491e3648722a892558416a768dda77850ad9)
DeltaFile
+12-0sys/dev/ixgbe/if_ix.c
+12-01 files

FreeBSD/src 4a5177esys/x86/iommu amd_drv.c

amd_iommu: Bound IVHD device-entry parsing

Validate the IVRS table and every subtable length before using either
to form iterator bounds. Reject truncated typed IVHD blocks instead of
passing them to a type-specific callback.

Within each IVHD payload, correct the lower-bound comparison for
extended range entries and validate fixed-size entries, paired range
terminators, the fixed HID body, and the variable HID UID before
dereferencing or advancing. Malformed firmware can no longer drive
either iterator beyond its enclosing object.

Reviewed by:    kib
Sponsored by:   BBOX.io
Differential Revision:  https://reviews.freebsd.org/D58724

(cherry picked from commit 4a2494d76ad03c755f2cb0ed5e1311b03bb2a8e2)
DeltaFile
+102-36sys/x86/iommu/amd_drv.c
+102-361 files

FreeBSD/src 792307dsys/x86/iommu amd_drv.c

amd_iommu: Bound IVHD device-entry parsing

Validate the IVRS table and every subtable length before using either
to form iterator bounds. Reject truncated typed IVHD blocks instead of
passing them to a type-specific callback.

Within each IVHD payload, correct the lower-bound comparison for
extended range entries and validate fixed-size entries, paired range
terminators, the fixed HID body, and the variable HID UID before
dereferencing or advancing. Malformed firmware can no longer drive
either iterator beyond its enclosing object.

Reviewed by:    kib
Sponsored by:   BBOX.io
Differential Revision:  https://reviews.freebsd.org/D58724

(cherry picked from commit 4a2494d76ad03c755f2cb0ed5e1311b03bb2a8e2)
DeltaFile
+102-36sys/x86/iommu/amd_drv.c
+102-361 files

FreeBSD/src 1b08c8asys/dev/ixgbe if_ix.c

ixgbe: Probe additional controller variants

The shared base code already selects and configures the 82598 BX,
82599 KR, 82599 SFP Express Module, X552 XFI, X553 QSFP, and X553 N
QSFP device IDs, but the FreeBSD probe table omits them while DPDK lists
them.

Sponsored by:   BBOX.io

(cherry picked from commit 27f0491e3648722a892558416a768dda77850ad9)
DeltaFile
+12-0sys/dev/ixgbe/if_ix.c
+12-01 files

FreeBSD/src 589235dsys/dev/e1000 if_em.h e1000_defines.h

igb: Report 82580 memory ECC errors

82580 exposes clear-on-read, saturating corrected error counters for
the receive and transmit packet buffers.  Its two PCIe command memories
expose RW1C indications for uncorrectable ECC errors.

Sample the packet buffer counters and PCIe indications from the regular
hardware statistics update.  Fatal recovery samples the PCIe indications
from the serialized admin path rather than the interrupt filter.  Thus,
either the regular statistics pass or recovery reads and clears each
indication, but they cannot both account it.  Also preserve indications
observed while initialization is completing.

Expose the exact packet buffer error total and observed PCIe command
memory indications under the memory_errors sysctl node.  Multiple PCIe
errors between samples can collapse into one indication per memory.

Validated on an Intel I340-T2 (82580, revision 1).  A clean boot and
three down/up cycles left the packet-buffer, PCIe, and region-specific

    [11 lines not shown]
DeltaFile
+56-12sys/dev/e1000/if_em.c
+1-0sys/dev/e1000/if_em.h
+1-0sys/dev/e1000/e1000_defines.h
+58-123 files

FreeBSD/src 5aceda2sys/dev/e1000 if_em.h e1000_regs.h

e1000: Recover from 82580 memory errors

82580 reports fatal parity and uncorrectable ECC errors through ICR.FER
and its four region PEIND hierarchy.  Region specific status registers
identify PCIe, DMA transmit, DMA receive, DMA host, and LAN port
memories that can leave traffic stopped.

Enable the documented DMA, PCIe, packet-buffer, and host-owned LAN
parity and ECC checks only after initializing queue and filter tables.
Leave the flexible filter parity controls under management firmware
ownership.  Capture read-clear and RW1C status in the interrupt filter
and keep FER masked until the admin task resolves the event.

Reset for a host-owned region or an unknown FER source.  Leave
management-only recovery to firmware.  Use CTRL.RST before master
disable because fatal 82580 memory errors can stop PCIe traffic.  Do not
use CTRL.DEV_RST: specification update item 9 declares that bit reserved
and says it must always be written as zero.  Wait for EEPROM auto read
completion; STATUS bit 21 is reserved on 82580, not PF_RST_DONE.

    [22 lines not shown]
DeltaFile
+184-21sys/dev/e1000/if_em.c
+12-0sys/dev/e1000/e1000_defines.h
+9-0sys/dev/e1000/e1000_regs.h
+2-0sys/dev/e1000/if_em.h
+207-214 files

FreeBSD/src 2e33355usr.sbin/pmc headers.hh view.cc

pmc: avoid illegal flexible array member

Remove struct pmchdr_cpuidinfo which was just a wrapper around a
flexible array member of uint32_t.  Flexible array members are
non-standard in C++, and even in C are not allowed as the only member
of a struct.

GCC errored out on pmchdr_cpuidinfo, but did not complain about
pmchdr_pmcinfo, so I left it alone here, though it is also non-standard.

Fixes:  93da997ef759 ("pmc: new pmc log processing framework")
Reviewed by:    Ali Mashtizadeh <ali at mashtizadeh.com>
Differential Revision:  https://reviews.freebsd.org/D59355
DeltaFile
+7-7usr.sbin/pmc/view.cc
+0-5usr.sbin/pmc/headers.hh
+7-122 files

FreeBSD/src 3581b6dusr.bin/find find.1

find.1: fix rendering of find -s example

The period here is part of the literal string in the example.  Adding a
space caused the example to be quoted wrongly.  Instead, a trailing
zero-width space keeps the linter mandoc -T happy.

Reviewed by:    ziaee
Differential Revision:  https://reviews.freebsd.org/D59353
DeltaFile
+2-2usr.bin/find/find.1
+2-21 files

FreeBSD/src 9dec0cdsys/compat/linuxkpi/common/include/linux dma-mapping.h, sys/compat/linuxkpi/common/src linux_pci.c

LinuxKPI: implement dma_sync_sg_for_{cpu, device}()

Implement dma_sync_sg_for_{cpu, device}() and
dma_sync_sgtable_for_device().
These functions are useful for my GSoC 2026 project, udmabuf.

Reviewed by:    bz
MFC after:      3 days
Differential Revision: https://reviews.freebsd.org/D57766
DeltaFile
+48-3sys/compat/linuxkpi/common/include/linux/dma-mapping.h
+11-0sys/compat/linuxkpi/common/src/linux_pci.c
+59-32 files

FreeBSD/src 33574d4sys/compat/linuxkpi/common/include/linux dma-mapping.h

LinuxKPI: Correct nents passed to dma_{un,}map_sg_attrs()

According to Linux documentation the nents argument to dma_unmap_sg()
must be the number one passed in, not the number of DMA addresses.

In LinuxKPI this means orig_nents and not nents, so adjust this.

Given nents and orig_nents should always be the same in LinuxKPI,
this should only be a NOP for correctness.

Reviewed by:    bz, aokblast (LGTM)
MFC after:      3 days
Differential Revision: https://reviews.freebsd.org/D57842
DeltaFile
+2-2sys/compat/linuxkpi/common/include/linux/dma-mapping.h
+2-21 files

FreeBSD/src 4dc810busr.sbin/pciconf pciconf.8 pciconf.c

pciconf: extend tree mode to also print numerical IDs

Also print the vendor/device and subvendor/subdevice IDs in addition
to any strings from the database found if the -v flag is given more
than once.
This helps with device identification if the strings resolve to
identical values for entire product families as well as when the
exact card cannot be determined from the string.
In theory a second call to pciconf could present that information in
non-tree mode but that kind-of defeats the purpose.

Reviewed by:    jhb
MFC after:      3 days
Differential Revision: https://reviews.freebsd.org/D56248
DeltaFile
+8-1usr.sbin/pciconf/pciconf.c
+3-1usr.sbin/pciconf/pciconf.8
+11-22 files

FreeBSD/src 8929675lib/libmagic Makefile

libmagic: Add swap.c and magic.h to SRCS.

file 5.48 added swap.c and swap.h for byte-swapping operations, which are
required on hosts that lack <byteswap.h> or <sys/bswap.h> (e.g. macOS cross-building
or older FreeBSD bootstrap environments).

Also add magic.h to SRCS so object files depend on the generated header
before compiling, avoiding falling back to the host's /usr/include/magic.h
during parallel builds.

Reported by:    wosch
MFC after:      1 week
Fixes:          7af41682a96b ("MFV: file 5.48")
DeltaFile
+4-2lib/libmagic/Makefile
+4-21 files

FreeBSD/src 6e4229esys/dev/asmc asmcvar.h asmc.c

asmc: add system state and board identity sysctls

Add dev.asmc.0.system subtree with read-only sysctls for SMC diagnostic
and identity keys: shutdown_cause (MSSD), sleep_cause (MSSP),
thermal_status (MSAL), time_of_day (CLKT), power_state (MSPS),
board_id (RPlt), and chip_gen (RGEN).

Each sysctl is registered only if the key exists on the hardware.

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

(cherry picked from commit 6a1bd5212f290933d1429a6d4787394ee53e3181)
DeltaFile
+220-0sys/dev/asmc/asmc.c
+86-0sys/dev/asmc/asmcvar.h
+306-02 files