Page MenuHomeFreeBSD

iflib: Separate software admission from legacy driver flags
ClosedPublic

Authored by kbowling on Fri, Sep 11, 9:37 PM.
Tags
None
Referenced Files
F172541327: D59598.id186485.diff
Sat, Sep 19, 3:25 AM
F172519380: D59598.id.diff
Sat, Sep 19, 12:19 AM
F172508285: D59598.id186752.diff
Fri, Sep 18, 10:40 PM
F172501961: D59598.id186752.diff
Fri, Sep 18, 9:45 PM
Unknown Object (File)
Fri, Sep 18, 5:01 PM
Unknown Object (File)
Thu, Sep 17, 9:22 PM
Unknown Object (File)
Thu, Sep 17, 6:18 PM
Unknown Object (File)
Thu, Sep 17, 5:30 PM

Details

Summary
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
debug counter to txq_drain_stopped.

Document the accessor and its synchronization limits.  This does not
remove legacy flag reads elsewhere in the network stack or change the
existing queue-drain and device-stop contracts.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

This revision is now accepted and ready to land.Tue, Sep 15, 4:31 PM