e1000: Express TSO restart policy without OACTIVE
After a link speed change updates TSO capabilities, request a restart
when iflib is running or the interface is administratively up. Leave
an administratively down, stopped interface to apply the change at its
next initialization.
Do not infer initialization from IFF_DRV_OACTIVE, which also remains
set after stop and failed initialization. Use iflib_is_running() for
software admission and IFF_UP for intent; iflib retains responsibility
for quiescing any partially initialized queues before restarting.
This also permits a restart request for an administratively up
interface before its first initialization attempt.
Reviewed by: iflib (gallatin)
MFC after: 2 weeks
Sponsored by: BBOX.io
Differential Revision: https://reviews.freebsd.org/D59599
iflib: Use the framework run-state accessor in drivers
Replace direct IFF_DRV_RUNNING reads in igbv, ixgbe, ixv, iavf, ixl,
ice, bnxt Ethernet, aq, enic and the axgbe PCI frontend with
iflib_is_running(). Keep each existing mailbox-ready, fault-state,
link-state and administrative-up condition: framework admission is not
a substitute for device specific readiness.
This covers interrupt admission, operational link publication, VF
mailbox and VLAN replay, and live-configuration decisions. Remove
ifnet temporaries used only to read the driver flags.
Replace the em and igc debug dumps' RUNNING/OACTIVE text with one
framework admission snapshot. OACTIVE does not mean that the interface
or hardware is inactive. Label the result as software admission rather
than link state or proof that DMA has stopped, and retain the queue
head/tail dumps and separate RS diagnostics. Keep the filter register
and requested interface flags in the axgbe PCI promiscuous-mode trace,
but remove its unrelated legacy driver flags.
[14 lines not shown]
iflib: Separate software admission from legacy driver flags
Publish an atomic software run state snapshot through iflib_is_running().
Use it for iflib traffic admission, queue tasks, timers, debugnet and
live-configuration checks instead of reading the unsynchronized
ifnet driver flags. Keep admission closed after failed initialization
and close it when a watchdog requests deferred recovery.
Retain the context-locked datapath state for DMA ownership: a closed
admission gate does not establish that the hardware is stopped. Open
the gate after receive buffer setup and before interrupt enable, at the
existing RUNNING publication point. Serialize the writers with the
state mutex and continue publishing RUNNING/OACTIVE for network stack
consumers. The accessor takes no lock and is usable from filters, but
is only a snapshot, not a context reference or a queue-user drain.
Recheck multicast and VFLR admission under the context lock. Replace
the OACTIVE drain check with the same private admission gate, retaining
the separate per-queue descriptor backpressure policy. Rename its
[11 lines not shown]
iflib: Use private lifecycle state for control work
Use the context-locked datapath state for netmap initialization results,
resume completion and administrative work eligibility. Keep stopped
and failed interfaces eligible for link and mailbox recovery without
using IFF_DRV_OACTIVE as an implicit indication that initialization has
been attempted. Evaluate media and deferred admin eligibility under
the context lock rather than from an earlier IFF_DRV_ flag snapshot.
Always pass through iflib_stop() before an IOV-init callback which
changes the PF queue layout, as the IOV-uninit counterpart already does.
Neither administrative down nor a cleared IFF_DRV_RUNNING proves that
queue DMA is stopped. The private lifecycle state decides whether the
hardware stop is necessary; IFF_UP only decides whether to initialize
again afterward.
Reviewed by: iflib (gallatin)
MFC after: 2 weeks
Sponsored by: BBOX.io
Differential Revision: https://reviews.freebsd.org/D59597
video(4): add extended controls and remaining V4L2 compat symbols
Add the extended control interface
Values match the reference ABI; the new struct layouts are pinned
with static assertions.
Reported by: thierry
Reviewed by: adrian, thierry
Differential Revision: https://reviews.freebsd.org/D59496
intel: add hfsts debug-probe driver for Intel ME/HECI firmware status
Add an amd64-only, Intel-only diagnostic driver that reads ME Host
Firmware Status registers from PCI configuration space without mapping the messaging BAR.
Select the HFS register count per device generation, decode sparse
HFS1 state, mode, and error fields, and expose raw and summarized
status via sysctl. Register an ISA-side hfstsfd probe for supported
RCBA/FD2 generations so firmware-hidden HECI functions can be diagnosed.
Reviewed by: kbowling, adrian
Differential Revision: https://reviews.freebsd.org/D58863
iw_cxgbe: Remove unused return value from destroy_cq
Part of the original Linux commit was already applied during a prior
OFED update in commit b633e08c705fe43180567eae26923d6f6f98c8d9, but
this portion of the changes to the Linux iw_cxgb4 driver were not
included.
Obtained from: Linux commit a52c8e2469c30cf7ac453d624aed9c168b23d1af
iw_cxgbe: Fix qpid leak
Add await in destroy_qp() so that all references to qp are dereferenced
and qp is freed in destroy_qp() itself. This ensures freeing of all QPs
before invocation of dealloc_ucontext(), which prevents loss of in use
qpids stored in the ucontext.
Obtained from: Linux commit f70baa7ee3d1b5a9e66ac7549e31641a656f23c1
Sponsored by: Chelsio Communications
iw_cxgbe: Miscellaneous changes from the iw_cxgb4 driver
These include changes to use newer APIs, cosmetic changes to reduce
diffs between the two drivers, and other minor fixes.
Sponsored by: Chelsio Communications
Co-authored-by: Arjun V <arjun at chelsio.com>
Co-authored-by: Krishnamraju Eraparaju <krishna2 at chelsio.com>
Co-authored-by: Vishal Kulkarni <vishal at chelsio.com>
iw_cxgbe/libcxgb4: Pass ftid_base to libcxgb4 through status page
While here, fix incorrect frees in error paths in c4iw_alloc_context().
Sponsored by: Chelsio Communications
cxgbe: Enable RDMA WRITE_CMPL work requests if the firmware supports them
This work request permits combining RDMA WRITE and SEND_INV commands
into a single work request.
Sponsored by: Chelsio Communications
libcxgb4: remove update_qp_state()
Remove it because it is not needed. If we're flushing the qp, it is
because we've had a fatal error, so just set the user qp state to ERR
and continue on.
Sponsored by: Chelsio Communications
iw_cxgbe/libcxgb4: Support for RDMA WRITE_COMPL work requests
To optimize NVME-oF READ IOPs, use a specialized work request that
combines a RDMA WRITE and SEND_INV chain into a single request.
Sponsored by: Chelsio Communications
Co-authored-by: Potnuri Bharat Teja <bharat at chelsio.com>
iw_cxgbe: use __raw_write*() to allow write-combining
pio_copy() is suppose to be used for write-combining work requests.
However, for some architectures like powerpc and arm64, write[ql]()
include an explicit memory barrier which will flush the WC buffer and
render this path useless. To prevent that use the relaxed variant.
Sponsored by: Chelsio Communications
iw_cxgbe: Various fixes around waiting for replies to work requests
Allocate wait objects dynamically and add a refcount instead of
allocating them on the current thread's stack. This permits
c4iw_wait_for_reply() to safely fail with an error and mark the device
as dead if a reply is not received after C4IW_WR_TO seconds. Once a
device is marked dead, future requests fail immediately.
Sponsored by: Chelsio Communications
libcxgb4: Support send/recv drain work requests
This change allows libcxgb4 to post send/recv drain work requests
after a QP is flushed and schedules a CQE on the software CQ for the
application to note the drain's completion.
Sponsored by: Chelsio Communications
iw_cxgbe: Fixes around work queue flushing and draining
- Only insert drain CQEs if a work queue is flushed
- Preserve the request opcode of the original request when flushing a
request. Use bit 10 of the CQE header word to indicate the CQE is a
special drain completion, and save the original WR opcode in the cqe
header opcode field.
- If a work request chain was posted and needed to be flushed, only
the first request in the chain was completed with FLUSHED status.
The rest were never completed.
- When a CQ is shared by multiple QPs, c4iw_flush_hw_cq() needs to
acquire the corresponding QP lock before moving the CQEs into its
corresponding SW queue and accessing the SQ contents for completing
a WR.
- Once a user QP has been flushed, it cannot be flushed again.
[3 lines not shown]
iw_cxgbe/libcxgb4: Support 64B CQEs
The larger CQE exports the RSS header to userspace. Note that this
changes the ABI between the driver and library, so the ABI version is
bumped. A new user->kernel create_cq request message is defined to
disallow a CQE size mismatch between iw_cxgbe and libcxgb4.
Sponsored by: Chelsio Communications
Co-authored-by: Steve Wise <swise at opengridcomputing.com>