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.
MFC after: 2 weeks
ixgbe: Enable PF RSS across queues with SR-IOV
PSRTYPE is indexed by pool in VMDq+RSS mode, and its RQPL
field selects the number of receive queues available within the pool.
The PF occupies the last pool, but the driver programmed pool zero and
left the PF RQPL value at zero. As a result, all PF receive traffic
was directed to its first queue while SR-IOV was enabled.
Program PSRTYPE for the PF pool and encode its allocated receive queue
count.
MFC after: 2 weeks
ixv: Recover when the PF mailbox is unavailable
A failed VF reset or mailbox API negotiation currently returns from
the void ifdi_init callback. Iflib then marks the interface running
even though ixv left its adapter stopped. Stopped media queries can
continue polling the PF, and no timer remains active to retry when the
PF returns.
Track mailbox readiness and report unsuccessful initialization to
iflib. Stopped admin and media-status passes now publish cached
link-down state without touching the mailbox. While the VF remains
administratively up, retry complete initialization after 250 ms, one
second, four seconds, and then at a capped eight-second interval.
Preserve the requested MAC across reset, then program it once after
mailbox API negotiation. The previous two pre-reset requests each
could wait a full mailbox timeout after an established PF disappeared,
holding the iflib context lock for about two seconds before the reset
handshake.
[8 lines not shown]
[ORC] Construct EPCGenericMemoryAccess from ExecutionSession. (#215097)
Construct EPCGenericMemoryAccess objects from ExecutionSessions, rather
than ExecutorProcessControl objects. This is a step towards migrating
EPCGenericMemoryAccess off of raw callSPSWrapper* calls and on to the
new Proxy objects (d99bd3ed157).
igbv: Recover when the PF mailbox is unavailable
A VF reset can sanitize its retained queue registers even when the PF
does not complete the cooperative mailbox handshake. Keep those two
states separate. Do not program or enable the rings until both queue
sanitation and mailbox initialization have succeeded.
Report either initialization failure to iflib so the interface remains
stopped. Stopped admin and media-status passes now publish cached
link-down state without polling the mailbox. While the VF remains
administratively up, retry complete initialization after 250 ms, one
second, four seconds, and then at a capped eight-second interval.
Conditional iflib reset requests ensure an intervening administrative
down cancels a queued retry.
Avoid a redundant mailbox reset in the stop half of an immediate iflib
reinitialization; the following init performs the required reset.
Preserve the reset on an ordinary administrative stop and keep the
existing bounded queue-sanitation retry policy independent from
mailbox liveness recovery.
igbv: Recover when the PF mailbox is unavailable
A VF reset can sanitize its retained queue registers even when the PF
does not complete the cooperative mailbox handshake. Keep those two
states separate. Do not program or enable the rings until both queue
sanitation and mailbox initialization have succeeded.
Report either initialization failure to iflib so the interface remains
stopped. Stopped admin and media-status passes now publish cached
link-down state without polling the mailbox. While the VF remains
administratively up, retry complete initialization after 250 ms, one
second, four seconds, and then at a capped eight-second interval.
Conditional iflib reset requests ensure an intervening administrative
down cancels a queued retry.
Avoid a redundant mailbox reset in the stop half of an immediate iflib
reinitialization; the following init performs the required reset.
Preserve the reset on an ordinary administrative stop and keep the
existing bounded queue-sanitation retry policy independent from
mailbox liveness recovery.
iflib: Support recoverable initialization failure
The ifdi_init method cannot report an error, so iflib always marks an
interface running and enables its interrupts after the callback returns.
Drivers whose hardware initialization depends on an unavailable peer can
only return early and leave a falsely running interface.
Add iflib_init_failed() so a callback can leave the interface stopped.
Also add a conditional reset request for asynchronous recovery: it is
discarded if the interface is administratively down when the admin task
runs, preventing a queued retry from resurrecting a stopped interface.
Do not restore saved driver flags after an MTU or capability change when
initialization failed. Restoring the pre-init flags would overwrite the
stopped result with stale RUNNING state.
Document that reset requests require the caller to schedule the admin
task, that output remains blocked during recovery, and that iflib rather
than the driver owns the driver flags.
[2 lines not shown]
iflib: Support recoverable initialization failure
The ifdi_init method cannot report an error, so iflib always marks an
interface running and enables its interrupts after the callback returns.
Drivers whose hardware initialization depends on an unavailable peer can
only return early and leave a falsely running interface.
Add iflib_init_failed() so a callback can leave the interface stopped.
Also add a conditional reset request for asynchronous recovery: it is
discarded if the interface is administratively down when the admin task
runs, preventing a queued retry from resurrecting a stopped interface.
Do not restore saved driver flags after an MTU or capability change when
initialization failed. Restoring the pre-init flags would overwrite the
stopped result with stale RUNNING state.
Document that reset requests require the caller to schedule the admin
task, that output remains blocked during recovery, and that iflib rather
than the driver owns the driver flags.
[2 lines not shown]
cpuset(9): correct markup
- Remove `\(em` from .Nm section as it's not valid mandoc markup.
- Remove the section from the .Nm directive (it's handled under the .Dt
directive).
MFC after: 1 week
Reported by: make manlint
cpuset(9): correct markup
- Remove `\(em` from .Nm section as it's not valid mandoc markup.
- Remove the section from the .Nm directive (it's handled under the .Dt
directive).
MFC after: 1 week
Reported by: make manlint
pmc(8): add missing headers to not rely on header pollution
This mutes a number of complains from g++ about needing specific headers
for functionality related to C strings and other function prototypes.
Reported by: g++ 14
pmc(8): add missing headers to not rely on header pollution
This mutes a number of complains from g++ about needing specific headers
for functionality related to C strings and other function prototypes.
Reported by: g++ 14
pmc(8): resolve -Wshadow issues
- Prefix all structs with the struct keyword to avoid collisions between
the types and variables with the same "name".
- Use `_` suffixed variables in initializers to distinguish input
parameters from public members [1].
Resolve some trailing whitespace issues while here.
NOTE: this doesn't resolve the -pedantic issue reported by g++ with
`pmchdr_cpuidinfo::cpuid` about the field being a flexible array in an
otherwise empty struct.
1. I generally do this the other way around, i.e., suffix private/protected
members with `_`, but these are public members in structs and I don't want
to introduce a lot of churn in calling code.
Reported by: g++14 with FreeBSD CI (powerpc64 tinderbox)
Fixes: ce6ab51f ("pmc: enable the new pmc commands")
pmc(8): resolve -Wshadow issues
- Prefix all structs with the struct keyword to avoid collisions between
the types and variables with the same "name".
- Use `_` suffixed variables in initializers to distinguish input
parameters from public members [1].
Resolve some trailing whitespace issues while here.
NOTE: this doesn't resolve the -pedantic issue reported by g++ with
`pmchdr_cpuidinfo::cpuid` about the field being a flexible array in an
otherwise empty struct.
1. I generally do this the other way around, i.e., suffix private/protected
members with `_`, but these are public members in structs and I don't want
to introduce a lot of churn in calling code.
Reported by: g++14 with FreeBSD CI (powerpc64 tinderbox)
Fixes: ce6ab51f ("pmc: enable the new pmc commands")
HBSD: Enable -ftrivial-var-auto-init=zero for video(4)
FreeBSD introduced a new driver: video(4). Let's build it with that
mentioned in the subject line.
Signed-off-by: Shawn Webb <shawn.webb at hardenedbsd.org>
[PowerPC][AIX] Reject .weak_definition like ELF (#156072)
weak_definition is a Mach-O-specific directive and is not supported on
XCOFF. Previously it crashed the XCOFF streamer via report_fatal_error
in emitSymbolAttribute. Return false for MCSA_WeakDefinition like
MCELFStreamer does, so the parser rejects it with the same diagnostic as
ELF.