ice: Quiesce queues after partial initialization
ice_if_init marks DRIVER_INITIALIZED only after all queue and filter
operations succeed, so ice_if_stop intentionally does nothing after an
initialization failure. Each failure path must therefore unwind any
hardware queues it may have configured before iflib releases their DMA
mappings.
Tx setup enables firmware scheduler queues one at a time, and Rx enable
similarly processes queues incrementally. Route failures from both
operations through cleanup paths for both the PF and mirror VSIs. The
cleanup helpers tolerate queues which were not configured, so they also
cover failures on the first queue.
This leaves failed initialization stopped as required by the
iflib_init_failed contract.
MFC after: 2 weeks
Sponsored by: BBOX.io
Differential Revision: https://reviews.freebsd.org/D59331
enetc: Correct transmit queue timeout detection
Test the producer and consumer indices after waiting for transmit
completion. The post-decrement loop leaves timeout at -1 on exhaustion,
so testing timeout == 0 missed the actual timeout and could report one
when the final poll completed successfully.
Leave the hardware shutdown sequence unchanged. This only corrects the
diagnostic; runtime FLR recovery and command-buffer lifetime handling
remain separate work.
MFC after: 2 weeks
Sponsored by: BBOX.io
mgb: Propagate DMA setup errors and use the requested channel
Check the receive DMA and frame transfer setup results that were
previously discarded. Return EINVAL for invalid ring/writeback addresses
rather than reporting success, and stop initialization through
iflib_init_failed() when a ring could not be configured.
Use the transmit queue count for transmit initialization and the supplied
channel index for DMA operations. The driver currently allocates one
queue in each direction, so those index/count corrections are latent.
MFC after: 2 weeks
Sponsored by: BBOX.io
axgbe: Propagate hardware and PHY initialization failures
Check hardware initialization instead of discarding its result, and
preserve the original initialization error across cleanup. Report a failed
init to iflib rather than publishing a running datapath. Return normalized
FreeBSD errors from attach_post. Reuse the existing native reset cleanup
on failure.
MFC after: 2 weeks
Sponsored by: BBOX.io
ixgbe: Report hardware initialization failures to iflib
Check the result of ixgbe_init_hw() before configuring queues. Report
failure through iflib_init_failed() instead of publishing a working
datapath after shared-code initialization failed.
MFC after: 2 weeks
Sponsored by: BBOX.io
ixl: Tie statistics baselines to hardware resource epochs
Raw VSI statistics belong to the firmware-assigned counter index and are
reset when firmware recreates the VSI. Reusing a baseline across either
event makes a counter decrease look like a full width rollover.
Reset the PF and main VSI baselines when rebuilding hardware resources.
Start a new baseline when firmware assigns a different PF counter index
and whenever it allocates a VF VSI. Ordinary interface reinits which
retain the hardware resources continue to retain their statistics.
This follows the lifecycle used by ice without placing an unconditional
statistics reset in ixl_initialize_vsi(), which also runs during ordinary
iflib initialization.
MFC after: 2 weeks
Sponsored by: BBOX.io
Differential Revision: https://reviews.freebsd.org/D59337
ixgbe: Defer flow control programming while admission is closed
Cache a validated flow control setting without touching hardware when
iflib has closed admission. The queues may still be live pending a
watchdog stop, or the device may already be stopped or suspended. RX
initialization and link setup replay the cached flow control policy.
For live updates, decide once under the context lock whether to touch
hardware, then mask MDD around SRRCTL writes regardless of a concurrent
watchdog closing admission. The context lock excludes actual stop and
reinitialization while these writes are in progress.
MFC after: 2 weeks
Sponsored by: BBOX.io
ixgbe: Apply DMAC changes through an if-up reset request
Serialize cached DMA coalescing policy with initialization and schedule
its application through the admin task. The old running check
preceded if_init() acquiring the context lock, so an intervening down
operation could be followed by an unconditional initialization.
Use the deferred if-up request so restart permission is checked when the
task runs. Changes made while stopped or suspended remain cached for
the next initialization. Do not schedule a reset for an unchanged value.
MFC after: 2 weeks
Sponsored by: BBOX.io
enic: Report device enable failures to iflib
Do not publish a running interface after vnic_dev_enable_wait() fails.
Run the existing stop cleanup for the queues configured before the enable
request, then report initialization failure to iflib.
Mark those queues as needing cleanup before submitting the enable request
so the stopped-state shortcut cannot skip the unwind.
MFC after: 2 weeks
Sponsored by: BBOX.io
enic: Clean the completion ring matching each queue
The transmit stop loop cleaned the receive completion ring, and the
receive stop loop cleaned the transmit completion ring. Use enic_cq_wq()
for transmit queues and enic_cq_rq() for receive queues, matching the
queue indices used by the remaining ring bookkeeping.
MFC after: 2 weeks
Sponsored by: BBOX.io
math/gap: update 4.14.0 → 4.16.1
30+ port options were added for all compiled packages.
This is in addition to non-compiled packages that come with
the base GAP.
ChangeLog: https://github.com/gap-system/gap/blob/v4.16.1/CHANGES.md
ice: Honor iflib transmit completion batching
ice marked every transmitted packet RS and recorded every last
descriptor in its report-status queue. Hardware therefore wrote
descriptor status for every packet, and the driver traversed every
packet while reclaiming completed descriptors.
iflib marks selected packets with IPI_TX_INTR as completion
checkpoints. It forces a checkpoint as deferred work or ring pressure
grows. Retain EOP on every packet, but set RS and record the descriptor
only at those checkpoints.
DPDK uses the same sparse-RS design and defaults tx_rs_thresh to 32.
Let iflib choose the adaptive interval for FreeBSD. This reduces PCIe
and memory traffic while preserving bounded descriptor reclamation.
Validated on an E810-XXV in an A-B-A test with five matched
four-stream, TSO-disabled transmit runs per phase. Median throughput
was 9.413, 9.413, and 9.414 Gbps. Median whole-system CPU was 21.54%,
[11 lines not shown]
ice: Defer RDMA critical error notifications
ice_msix_admin() runs as an interrupt filter inside a critical section.
ice_rdma_notify_pe_intr() acquires the global RDMA sx and invokes the
client event handler, both of which require sleepable thread context. A
PE or HMC critical error could therefore panic under WITNESS or sleep
from interrupt context.
Accumulate OICR causes atomically in the interrupt filter and mark them
pending in the driver state. Deliver the notification from the iflib
admin task before processing reset events. This preserves the existing
ordering, lets an iRDMA-requested reset run in the same admin pass, and
coalesces causes from multiple interrupts.
MFC after: 2 weeks
Sponsored by: BBOX.io
Differential Revision: https://reviews.freebsd.org/D59340