OPNSense/src 5f261eesys/dev/qat/include/common adf_accel_devices.h, sys/dev/qat/qat_api/common/crypto/sym lac_sym_alg_chain.c lac_sym_dp.c

qat: driver updates to enhance qat infrastructure

- Updated QAT infrastructure FW version/AE mask/num_banks fields
  to facilitate integration of future QAT products.
- Exposed service as sym;asym instead of cy for gen4
- Enhanced cpaGetInstances() for accurate instance retrieval
- Added 57-bit virtual address support to lac_lock_free_stack
- Minor bug fixes and improvements

Signed-off-by: Hareshx Sankar Raj <hareshx.sankar.raj at intel.com>

Reviewed by:    markj
MFC after:      1 month
Differential Revision:  https://reviews.freebsd.org/D57746

(cherry picked from commit 682f135f5de39cfc24cfd529ea8a161e94c76c8e)
DeltaFile
+34-26sys/dev/qat/qat_api/common/utils/lac_lock_free_stack.h
+32-24sys/dev/qat/qat_api/common/crypto/sym/lac_sym_dp.c
+25-25sys/dev/qat/qat_hw/qat_4xxx/adf_4xxx_hw_data.c
+24-17sys/dev/qat/qat_api/common/crypto/sym/lac_sym_alg_chain.c
+17-18sys/dev/qat/qat_common/adf_freebsd_admin.c
+19-15sys/dev/qat/include/common/adf_accel_devices.h
+151-12541 files not shown
+390-31647 files

OPNSense/src da9693fsys/net if_vxlan.c

if_vxlan(4): Fix panic by validating unused drvspec values

Add validation for unused parameter values in the gap between
VXLAN_PARAM_WITH_LOCAL_ADDR4 and VXLAN_PARAM_WITH_LOCAL_ADDR6 to prevent
panics.

PR:             297151
Reported by:    Robert Morris <rtm at lcs.mit.edu>
Reviewed by:    markj
MFC after:      3 days
Differential Revision: https://reviews.freebsd.org/D58552

(cherry picked from commit c4d7745cd90fc99af3cbccfda7e11798ea7d187b)
DeltaFile
+2-1sys/net/if_vxlan.c
+2-11 files

OPNSense/src a6b97d3sys/dev/ice ice_drv_info.h

ice(4): Add two more 4-part IDs for E835 adapters

Two additional subdevice IDs were introduced
to distinguish between adapters with and without
manageability over USB support.

Signed-off-by: Krzysztof Galazka <krzysztof.galazka at intel.com>

Reviewed by:    erj
Tested by:      Mateusz Moga <mateusz.moga at intel.com>
Sponsored by:   Intel Corporation
Differential Revision:  https://reviews.freebsd.org/D57337

(cherry picked from commit f370d9e4d5844daa06d77e57236e03bd7c5f4ba1)
DeltaFile
+6-0sys/dev/ice/ice_drv_info.h
+6-01 files

OPNSense/src 716a3c0sys/dev/ice ice_drv_info.h

ice(4): Add support for E835 CNSA 2.0 adapters

Added support for E835 adapters with post-quantum cryptographic (PQC)
algorithms in firmware/software signage and in SPDM attestation.

Signed-off-by: Pawel Sobczyk <pawel.sobczyk at intel.com>

Reviewed by:    Miłosz Linkiewicz <milosz.linkiewicz at intel.com>
Differential Revision:  https://reviews.freebsd.org/D57868

(cherry picked from commit 8194c32827e9c3867d4b295edca9842b71608526)
DeltaFile
+30-0sys/dev/ice/ice_drv_info.h
+30-01 files

OPNSense/src 3b63e75sys/dev/ice if_ice_iflib.c

ice: Report initialization failures to iflib

The primary and mirror-VSI ifdi_init callbacks can return early when
reset state or hardware queue and filter setup prevents initialization.
Iflib then marks the interface running and enables interrupts although
the driver did not finish bringing it up.

Report each non-detach failure through iflib_init_failed().  Keep the
existing ice reset and subinterface-reinitialization machinery
responsible for scheduling recovery.

(cherry picked from commit dcdc00a41d3e4be0e75eb625cd3a23d5a927ed15)
DeltaFile
+13-9sys/dev/ice/if_ice_iflib.c
+13-91 files

OPNSense/src a5f6cebshare/man/man4 ice.4, sys/dev/ice ice_iflib.h if_ice_iflib.c

ice: Add led(4) identification support

Expose the firmware-controlled physical port identification LED
through /dev/led/ice*.  Use the AdminQ port-identification command to
select blinking mode and restore the netlist-selected original mode
before the interface is stopped.

Sponsored by:   BBOX.io

(cherry picked from commit a781965b91ea390f9576ae42c35c842db74aab86)
DeltaFile
+44-0sys/dev/ice/if_ice_iflib.c
+8-1share/man/man4/ice.4
+1-0sys/dev/ice/ice_iflib.h
+53-13 files

OPNSense/src b8a3d9csys/dev/e1000 if_em.h e1000_defines.h

e1000: Report corrected LAN management FIFO ECC errors

I350 and I354 report a corrected ECC error in the LAN transmit
management FIFO through LANPERRSTS bit 16.  Unlike the parity status in
the same register, this condition neither interrupts nor stops traffic.

Poll the latch with the other corrected error status, increment a
dedicated counter, and clear only its RW1C bit.  Expose it as
dev.igb.N.memory_errors.corrected_lan_mng_fifo.

Fatal error handling returns before the periodic statistics sweep and
may reset the device.  Drain all I350 and I354 corrected-error status in
the admin task before recovery so the reset does not discard pending
indications.

This follows section 6.21.16 of the Intel Atom Processor C2000 Product
Family Integrated GbE Controller Programmer's Reference Manual,
document 537426 revision 1.5.


    [3 lines not shown]
DeltaFile
+13-1sys/dev/e1000/if_em.c
+1-0sys/dev/e1000/if_em.h
+1-0sys/dev/e1000/e1000_defines.h
+15-13 files

OPNSense/src fb68099sys/dev/e1000 e1000_defines.h if_em.c

e1000: Handle I354 internal memory errors

The Atom C2000 integrated GbE programming reference documents the I354
internal memory error architecture.  It shares the I350 PEIND and
ICR.FER routing, DMA and packet-buffer status, LAN parity status, and
required reset recovery.

Extend the existing I350 recovery and corrected error accounting paths
to I354.  Keep the PCIe corrected error mask family-specific.  C2000
PCIEECCSTS ends at the transmit write-data indication in bit 4 and does
not implement the I350 retry buffer indication in bit 5.  Do not expose
the corresponding retry counter on I354.

The PRM overview says a PCIe region failure requires a system reboot,
while the individual PCIEERRSTS fields prescribe CTRL.RST followed by
port reinitialization.  Use the register specific recovery, matching the
existing I350 path; failed reinitialization still leaves the port down.

This follows sections 5.6 and 6.21 of the Intel Atom Processor C2000

    [6 lines not shown]
DeltaFile
+40-35sys/dev/e1000/if_em.c
+10-8sys/dev/e1000/e1000_defines.h
+50-432 files

OPNSense/src fae555asys/net if_media.h

net: Add ifmedia support for 10GBase-BX BiDi

10GBase-BX uses paired wavelengths to carry both directions over a
single strand of single-mode fiber.  The optics must be paired so that
the transmit and receive wavelengths cross over.

(cherry picked from commit 4220b52453c9701922955dcc1c1e1554d6a9f3ae)
DeltaFile
+3-0sys/net/if_media.h
+3-01 files

OPNSense/src 69461c0sys/net iflib.c

iflib: Remove an unused field from struct iflib_rxq

Reported by:    Alexander Sideropoulos <Alexander.Sideropoulos at netapp.com>
MFC after:      1 week

(cherry picked from commit fc09c7fee23b3cf3ddc95105ef6ef41d7956232f)
DeltaFile
+0-1sys/net/iflib.c
+0-11 files

OPNSense/src 3fbc6dasys/net iflib.c

iflib: Permit SR-IOV configuration on a down interface

Drivers which remap PF queues need a stop/mutate/restart transaction
only when the interface has live queues. Permit their IOV
initialization callback while the interface is administratively down
and leave it down afterward.

This restores the standard boot-time iovctl.conf workflow and
lets other opt-in drivers configure VFs before netif brings the PF up.

(cherry picked from commit 2cf580c694f6f392531a63f01c3fb89c0244f89a)
DeltaFile
+31-0sys/net/iflib.c
+31-01 files

OPNSense/src d9f8185sys/net iflib.h iflib.c

iflib: Add restart transactions for IOV reconfiguration

Some devices remap the PF queues when entering or leaving SR-IOV. Add
opt-in PCI IOV helpers that hold the iflib context lock across the
complete stop, driver callback, and restart transaction.

Existing drivers continue to use the non-restarting helpers.

Sponsored by:   BBOX.io

(cherry picked from commit f8fa2d77bc305bec519f9f02afe211e903c57573)
DeltaFile
+22-0sys/net/iflib.c
+2-0sys/net/iflib.h
+24-02 files

OPNSense/src 9ea9fbfsys/net iflib.c

iflib: Initialize the VFLR task unconditionally

The VFLR task was initialized only from drivers MSI-X interrupt
assignment paths.  ixl's legacy interrupt handler can nevertheless defer
VFLR work, leaving an uninitialized task.  Even with MSI-X, the admin
interrupt was established before the task was initialized.

Initialize it alongside the other private tasks.  The existing detach
check and private-taskqueue drains then cover its lifecycle for every
interrupt mode and registration failure.

Sponsored by:   BBOX.io

(cherry picked from commit b4208a67edc2eb7898a9ff2a6f3990c6852910e4)
DeltaFile
+1-1sys/net/iflib.c
+1-11 files

OPNSense/src 52a2571share/man/man4 iflib.4, sys/net iflib.c

iflib: Add an admin task detach fail point

Add an exact-device fail point immediately after the admin task checks
IFC_IN_DETACH. This makes the detach race reproducible without affecting
another interface.

Use a bounded delay to keep the task active while detach enters the
taskqueue drain.  Mark the point nonsleepable as a safety backstop, and
document a one-shot test for verifying that deregistration drains an
already-running task before ether_ifdetach().

Reviewed by:    gallatin, kgalazka
Sponsored by:   BBOX.io
Differential Revision:  https://reviews.freebsd.org/D58720

(cherry picked from commit ac56d36007a5a1a01fe69df370f272060e852e0b)
DeltaFile
+19-0share/man/man4/iflib.4
+11-0sys/net/iflib.c
+30-02 files

OPNSense/src 9ab0500sys/net iflib.c

iflib: Drain configuration tasks before interface detach

iflib_device_deregister() sets IFC_IN_DETACH before removing the
interface, but a task which already passed its detach check can still
report a link change.  This can re-arm if_linktask after
ether_ifdetach() has drained it and leave work pending across queue
teardown.

Drain the entire private taskqueue before ether_ifdetach().  Drivers
may register their own link-related configuration tasks there, so
draining only the framework admin task leaves the same race for those
drivers.

Differential Revision:  https://reviews.freebsd.org/D58452

Co-authored-by: Andrew Gallatin <gallatin at FreeBSD.org>
Co-authored-by: Kevin Bowling <kbowling at FreeBSD.org>
(cherry picked from commit ba353c8950d575f9d15b82c92658e660935fba25)
DeltaFile
+7-0sys/net/iflib.c
+7-01 files

OPNSense/src 10cf6e5share/man/man4 iflib.4, sys/net iflib.c

iflib: Add registration failure injection points

Add six device-scoped fail(9) points at the registration milestones
needed to exercise each unwind path. An exact, runtime-only device
selector prevents unrelated iflib devices from consuming an armed point.

Mark the points non-sleepable because registration holds the ifnet and
context locks. Document one-shot operation and bus-address reprobe so a
failed attach can be recovered without another kernel build.

Reviewed by:    gallatin
Sponsored by:   BBOX.io
Differential Revision:  https://reviews.freebsd.org/D58722

(cherry picked from commit 90e7dbe5e2ca47baff4e4c6d9e892a0554eec4db)
DeltaFile
+46-0sys/net/iflib.c
+40-0share/man/man4/iflib.4
+86-02 files

OPNSense/src 03842ccsys/net iflib.c ifdi_if.m

iflib: Allow conditional LED device support

A driver class may implement LED control even though the capability is
not available on every device or firmware version it supports.  Add an
optional capability method and consult it before creating the led(4)
device.  Default to supported so existing providers are unchanged.

This will be used by bnxt which blends PF and VF in the same driver.

(cherry picked from commit 2519e19f05e0c3e5925bf81b729b4c28f2ad1af6)
DeltaFile
+10-0sys/net/ifdi_if.m
+1-1sys/net/iflib.c
+11-12 files

OPNSense/src 5f7f556sys/net iflib.c

iflib: Create led(4) devices

When a driver implements ifdi_led_func, have the framework create its
led(4) device after attach completes and the ifnet and context locks are
released.

PR:             246885
Reported by:    jlduran
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D32389

(cherry picked from commit 6591a7f6919295f2ec2b463d1ae9554a8bbf6104)
DeltaFile
+7-0sys/net/iflib.c
+7-01 files

OPNSense/src 1077adasys/net iflib.c

iflib: Defer LED control to the device taskqueue

led(4) invokes driver callbacks while holding its mutex, including
from a callout.  iflib_led_func() cannot acquire the sleepable context
lock in those contexts without causing a lock-order reversal or sleeping
from the callout.

Record the latest requested state under the iflib state lock and
enqueue the existing per-device taskqueue.  The task can safely take
the context lock before invoking the driver.  Coalescing requests also
avoids accumulating stale blink transitions when hardware access is
slow.

Destroy the LED device before draining its task so no new callback can
race driver detach.

(cherry picked from commit 952994751911d5d059d53e73eb874e00ee98b9ed)
DeltaFile
+32-3sys/net/iflib.c
+32-31 files

OPNSense/src 332d07cshare/man/man4 bnxt.4, sys/dev/bnxt/bnxt_en bnxt_hwrm.h bnxt.h

bnxt: Add led(4) identification support

Query the firmware for the LEDs on each physical port and expose
/dev/led/bnxt* only when alternate blinking is supported.  Configure
every LED in the advertised group for identification and restore its
default firmware state before a function reset.

This follows the DPDK and Linux bnxt HWRM identification paths.

Reviewed against: DPDK, Linux

Reviewed by:    Sumit Saxena <sumit.saxena at broadcom.com>
Sponsored by:   BBOX.io

(cherry picked from commit 98b5640786f874949e441bee7c4ad5740cd6a649)
DeltaFile
+105-0sys/dev/bnxt/bnxt_en/bnxt_hwrm.c
+41-0sys/dev/bnxt/bnxt_en/if_bnxt.c
+15-0sys/dev/bnxt/bnxt_en/bnxt.h
+6-1share/man/man4/bnxt.4
+2-0sys/dev/bnxt/bnxt_en/bnxt_hwrm.h
+169-15 files

OPNSense/src e4f3672sys/dev/bnxt/bnxt_en if_bnxt.c

bnxt: Report initialization failures to iflib

HWRM failures currently return from the void ifdi_init callback.
iflib then marks the interface running and enables interrupts despite an
incomplete ring or VNIC setup.

Move the hardware setup into an error-returning helper.  The ifdi_init
wrapper can report failure through iflib_init_failed(), while firmware
recovery can propagate the same error through bnxt_open().  Also clear
the initialized state after partial setup is torn down.

(cherry picked from commit cb0e8f5fb6de03428137c096b1c8b62710829029)
DeltaFile
+16-4sys/dev/bnxt/bnxt_en/if_bnxt.c
+16-41 files

OPNSense/src 9a5d923sys/dev/ixgbe if_ix.c

ix(4): Sanitize negative error codes

Due to development history FreeBSD driver error codes are reported
the same way as in Linux (as negatives) which is inconsistent
with FreeBSD standard. It may cause unexpected behavior when driver
errors are interpreted by a kernel as syscall handler return values.
This patch converts error codes from negative to positive values for
NVM access functions.

Signed-off-by: Pawel Sobczyk <pawel.sobczyk at intel.com>

Reviewed by:    kbowling, erj, milosz.linkiewicz_intel.com
Tested by:      Mateusz Moga <mateusz.moga at intel.com>
Sponsored by:   Intel Corporation
Differential Revision:  https://reviews.freebsd.org/D57642

(cherry picked from commit 33e2eac3e3e738daa95a06f42d6c661b87ad9aac)
DeltaFile
+19-4sys/dev/ixgbe/if_ix.c
+19-41 files

OPNSense/src a1966b9sys/dev/ixgbe ixgbe_mbx.h

ixgbe: Add missing mailbox API 1.6 definition

The SR-IOV status change reports mailbox API 1.6 but omitted its enum
definition, leaving main unable to compile.

API 1.6 is an established ixgbe mailbox wire revision.  Add it at the
end of the revision enum, before the unknown sentinel as required by
the stable numbering contract.  Naming the revision does not enable
negotiation or operations which will come with the E610 support.

Reported by:    Herbert J. Skuhra <herbert at gojira.at>

(cherry picked from commit 6a1703c112ff2904feb39288f0746c8f0a04f938)
DeltaFile
+1-0sys/dev/ixgbe/ixgbe_mbx.h
+1-01 files

OPNSense/src 3add8f7sys/dev/ixgbe ixgbe_e610.c

ix(4): Remove workaround for 2.5/5G speeds on E610

The problem observed on X550 adapters with 2.5 and 5 Gbps speeds
negotiation on some switches is not affecting E610 adapters.
Remove workaround, which omitted those speeds in the list
of initially advertised speeds and advertise all speeds
supported by adapter.

Signed-off-by: Krzysztof Galazka <krzysztof.galazka at intel.com>

Reviewed by:    kbowling
Tested by:      Mateusz Moga <mateusz.moga at intel.com>
Sponsored by:   Intel Corporation
Differential Revision:  https://reviews.freebsd.org/D57339

(cherry picked from commit 62d5d119ee7d935ac05966f1c7c4333c33c4f3a9)
DeltaFile
+12-23sys/dev/ixgbe/ixgbe_e610.c
+12-231 files

OPNSense/src 2ed2a2bsys/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

OPNSense/src 43a3eeesys/dev/ixgbe if_ix.c

ixgbe: Enable per-pool RSS on X550 family devices

X550 family devices provide a separate RSS key, redirection table,
and MRQC register for every VMDq pool.  With SR-IOV enabled, the
driver continued programming only the global RSS state and never
selected MRQC.MULTIPLE_RSS.  VF-local RSS programming was therefore
ineffective.

Enable multiple-RSS mode for X550, X552, X553, and E610.  Initialize
the PF pool's 64-entry key, redirection table, and RSS hash controls.
Leave each VF pool untouched so its driver retains ownership of its
RSS key and mapping.

E610 folds IPv6 extension-header traffic into its base RSS selectors
and reserves the legacy EX selector bits.  Translate those requested
hash types rather than programming reserved bits.

With two E610 VFs active and four PF queue sets, eight fixed TCP flows
distributed across all four PF receive queues.

    [8 lines not shown]
DeltaFile
+69-20sys/dev/ixgbe/if_ix.c
+69-201 files

OPNSense/src e43ad0fsys/net iflib.c

iflib: Fix panic observed while doing sysctl -a with if_bnxt unload

Observed below kernel panic calltrace while performing sysctl -a
operation while unloading the if_bnxt driver,

Fatal trap 9: general protection fault while in kernel mode

KDB: stack backtrace:
db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe02a7569940
vpanic() at vpanic+0x136/frame 0xfffffe02a7569a70
panic() at panic+0x43/frame 0xfffffe02a7569ad0
trap_fatal() at trap_fatal+0x68/frame 0xfffffe02a7569af0
calltrap() at calltrap+0x8/frame 0xfffffe02a7569af0

trap 0x9, rip = 0xffffffff80c0b411, rsp = 0xfffffe02a7569bc0, rbp = 0xfffffe02a7569be0 ---
sysctl_handle_counter_u64() at sysctl_handle_counter_u64+0x61/frame 0xfffffe02a7569be0
sysctl_root_handler_locked() at sysctl_root_handler_locked+0x9c/frame 0xfffffe02a7569c30
sysctl_root() at sysctl_root+0x22f/frame 0xfffffe02a7569cb0
userland_sysctl() at userland_sysctl+0x196/frame 0xfffffe02a7569d50

    [23 lines not shown]
DeltaFile
+24-21sys/net/iflib.c
+24-211 files

OPNSense/src b32a0a9sys/net iflib.c

iflib: drain admin task and fix teardown order on register failure

When IFDI_ATTACH_POST() fails (or netmap attach fails), iflib tears down with
ether_ifdetach(), taskqueue_free(ifc_tq), and IFDI_DETACH(). CTX_LOCK is still
held after ether_ifattach. ether_ifdetach() and taskqueue_drain(admin) must not
run under CTX_LOCK.

Teardown ordering (match iflib_device_deregister):

- Free the per-interface admin taskqueue after IFDI_DETACH / IFDI_QUEUES_FREE, not before.
- Drop IFNET_WLOCK() across IFDI_DETACH / IFDI_QUEUES_FREE so driver detach can sleep in
LinuxKPI workqueue drain, then retake IFNET_WLOCK() before iflib_free_intr_mem and fail_unlock.

Reviewed by:    gallatin, kgalazka, #iflib
Differential Revision: https://reviews.freebsd.org/D56316

(cherry picked from commit 439132310ae1f623f6c0a3dc241d0a34e98e040b)
DeltaFile
+18-1sys/net/iflib.c
+18-11 files

OPNSense/src bd02e72sys/dev/ixgbe ixgbe_vf.h if_ixv.c

ixv: Preserve statistics across resets

The VF statistics registers are free running and are not cleared on
read.  The existing code records attach time bases and pre-reset totals,
but never uses either when publishing counters.  It instead replaces
the low hardware bits directly, so counters can inherit pre-attach
traffic or jump backward after a reset.

Accumulate modular 32- and 36-bit deltas, following DPDK, while keeping
the software totals across planned resets.  Establish a fresh hardware
baseline after each successful reset and invalidate the sampling epoch
when mailbox state is lost.  Detect unsolicited PF resets explicitly so
a reset while link is down cannot be mistaken for counter wrap.

Remove the unused base and saved-reset bookkeeping.

On E610, packet and octet counters remained monotonic across a VF FLR
and a PF down/up cycle.  Traffic after each reset advanced both RX and
TX counters.

    [4 lines not shown]
DeltaFile
+49-66sys/dev/ixgbe/if_ixv.c
+1-12sys/dev/ixgbe/ixgbe_vf.h
+50-782 files

OPNSense/src e8ca446sys/dev/ixgbe ixgbe.h if_ix.c

ixgbe: Defer E610 thermal shutdown to iflib

The E610 firmware event handler invoked ixgbe_if_stop() directly from
IFDI_UPDATE_ADMIN_STATUS().  This reset the device without the iflib
queue lifecycle and left the interface marked running after its hardware
was stopped.

Request an iflib reset instead.  Fail the automatic initialization once
so the reset transaction stops the interface and publishes that state.
A later operator-requested initialization remains possible, matching the
previous recovery policy without bypassing iflib.

(cherry picked from commit 3aac283613bd3fd0228a06d6c854ca0bf190ecfb)
DeltaFile
+14-5sys/dev/ixgbe/if_ix.c
+1-0sys/dev/ixgbe/ixgbe.h
+15-52 files