ice: Make VF queue transitions idempotent
The VF mailbox handler unconditionally submitted queue-disable
commands, including when a VF repeated a request or negotiated after a
PF reset had already destroyed its queues. Firmware can reject stale
Tx queue metadata, causing a NACK and unnecessary VF recovery.
Track queue configuration and enable state across virtchnl operations,
and clear it at VF and PF reset. Apply only hardware transitions that
are not already complete while preserving progress after a partial
failure. Validate queue configurations before mutating hardware so the
state maps remain trustworthy.
FreeBSD configures Tx hardware in CONFIG_VSI_QUEUES rather than
ENABLE_QUEUES, so track Tx configuration separately from Rx
configuration and enable state. Linux ice similarly tracks per-VF Tx
and Rx queue state and skips redundant transitions.
On an E810-XXV, the prior code emitted AQ_RC_EINVAL while configuring a
[8 lines not shown]
ice: Rebuild VF VSIs after PF resets
PF and device resets discard all hardware VSI state. ice_rebuild()
only recreated the main PF VSI before replaying configuration for every
VSI. As a result, replay used stale VF VSI handles. Firmware rejected
it with AQ_RC_EACCES and the failure aborted the entire PF rebuild.
Re-add each VF VSI before replaying its configuration, and do not
publish VFACTIVE until both operations succeed. Clear the initialized
state so that the VF must negotiate again. If a VF rebuild fails, leave
it inactive and continue so that one guest cannot prevent the PF or
sibling VFs from recovering.
Mark it initialized only after the resource response is submitted
successfully, so the state follows completion of the mailbox handshake.
Make that failed state authoritative in the mailbox path. While the
firmware VSI is invalid, permit only VERSION and RESET_VF and reject
operations which require VSI state. A VFR may complete the hardware
[45 lines not shown]
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.
Sponsored by: BBOX.io
Differential Revision: https://reviews.freebsd.org/D59331
[2 lines not shown]
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.
Sponsored by: BBOX.io
(cherry picked from commit 9a1756f831a77ee8292821c9efd38c2125bff88c)
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.
Sponsored by: BBOX.io
(cherry picked from commit b263545980f44c0318afcc26188046ad7e559ceb)
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.
Sponsored by: BBOX.io
(cherry picked from commit 6a903d9837645a9dbf990b699f50c67ad984c043)
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.
Sponsored by: BBOX.io
Differential Revision: https://reviews.freebsd.org/D59337
(cherry picked from commit 444168adbe5217ea9b73773e42c60bf75fb7a6fd)
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.
Sponsored by: BBOX.io
(cherry picked from commit 5abfd8fe4d1adb74863231f27a9958cf176e3ded)
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.
Sponsored by: BBOX.io
(cherry picked from commit f5dc44c045c6f03a0f1bb2e81b0172e0781faec4)
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.
Sponsored by: BBOX.io
(cherry picked from commit 24f8c4e852d69189a1de1ff51c351ae8ee603dfa)
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.
Sponsored by: BBOX.io
(cherry picked from commit be36ceea1b8f75f7f537e77dddb75666671fef8f)
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%,
[12 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.
Sponsored by: BBOX.io
Differential Revision: https://reviews.freebsd.org/D59340
(cherry picked from commit aae5b168820a9c39e39c6dff2f31df0522f91901)
ice(4): Remove unused function
rss_getkey function is now available even if kernel RSS option
is disabled. This makes ice_get_default_rss_key no longer needed.
Signed-off-by: Krzysztof Galazka <krzysztof.galazka at intel.com>
Reviewed by: gallatin
Approved by: kbowling (mentor)
Fixes: 012ecdde3a810 ("ice: use newly exposed RSS hash key API rather than ad-hoc hashing")
Sponsored by: Intel Corporation
Differential Revision: https://reviews.freebsd.org/D54281
(cherry picked from commit ca10598b10bc906938195af2268256ae08647039)
{www,french,german,japanese,russian}/wordpress: update to 7.1.4
chinese/wordpress-zh_{CN,TW} remain IGNOREd as the 7.1.4 localized
distfiles are not yet available upstream.
[clangd] Index symbols declared inside export declarations (#234755)
SymbolCollector::shouldCollectSymbol only accepts symbols whose semantic
parent is a translation unit, namespace, linkage spec, enum, record or
one of a few ObjC containers. ExportDecl is a DeclContext and is
returned by getDeclContext(), so every entity declared with `export` or
inside an `export { ... }` block was dropped from the index. Members of
exported classes were still indexed, since their parent is the record.
In C++20 modules code this hides most of the exported interface from the
index: Go to Definition on an exported function stops at the declaration
in the module interface instead of reaching the definition in the
implementation unit, and workspace/symbol does not find it. Rename uses
the same check, so it rejects exported symbols as "not eligible for
indexing" (reported in clangd/clangd#2569).
Use getNonTransparentDeclContext() instead, so declarations inside
transparent contexts (export, extern "C", unscoped enums) are judged by
their enclosing context. Do the same in isIndexedForCodeCompletion, so
[4 lines not shown]
www/deno: Update 2.9.7 => 2.9.8
- Enable LTO again, as upstream does for release builds. It was
disabled without a stated reason in 2.2.5; it now builds fine and
makes deno about 11% smaller (122 MB -> 109 MB) and denort and
libdenort.so about 7% smaller, at the cost of a longer, mostly
single-threaded final link.
- Link with --icf=safe like upstream release builds to fold identical
functions.
- Remove the deno_panic patch: the crate is only used by the optional
panic-trace feature, which is not enabled.
Changelog: https://github.com/denoland/deno/releases/tag/v2.9.8
ixl: Initialize the extended RSS key
Zero the complete 52-byte RSS key buffer before fetching the common
40-byte key. Both the X722 AdminQ path and the register path consume all
52 bytes; the trailing extended-key bytes must not come from uninitialized
stack storage. This matches the zero padding already used by iavf and ice.
Remove the unused driver-default key helper and its declaration. Keep
the standard key, hash selections, and indirection policy unchanged.
Reviewed by: gallatin
Sponsored by: BBOX.io
Differential Revision: https://reviews.freebsd.org/D59791
(cherry picked from commit 0f7bdeadaf9d8101993dd39abee3a6a2ef4e2950)