Page MenuHomeFreeBSD

iflib: Use private lifecycle state for control work
Needs ReviewPublic

Authored by kbowling on Fri, Sep 11, 9:21 PM.

Details

Reviewers
glebius
shurd
Group Reviewers
iflib
Summary
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 driver-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.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped