Page MenuHomeFreeBSD

ice: Make VF queue transitions idempotent
Needs ReviewPublic

Authored by kbowling on Tue, Aug 18, 10:39 AM.
Tags
None
Referenced Files
F168528497: D58906.id184241.diff
Fri, Aug 28, 8:56 PM
F168509444: D58906.id.diff
Fri, Aug 28, 6:16 PM
Unknown Object (File)
Mon, Aug 24, 3:22 AM
Unknown Object (File)
Sun, Aug 23, 10:07 PM
Unknown Object (File)
Sun, Aug 23, 1:03 PM
Unknown Object (File)
Sat, Aug 22, 2:09 PM
Unknown Object (File)
Fri, Aug 21, 1:14 PM
Unknown Object (File)
Thu, Aug 20, 8:34 PM
Subscribers

Details

Reviewers
kgalazka
Group Reviewers
Intel Networking
Restricted Owners Package(Owns No Changed Paths)
Summary
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
fresh four-queue VF because it disabled never-configured Tx queues.
With this change, two VFs completed 20 stop/start cycles each, sustained
traffic in each direction, and recovered across PF and CORE resets
with no watchdog, MDD, or AQ errors.

MFC after:      2 weeks

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped