Skip to content

net/iavf: harden reset recovery and data path on link flap

Anurag Mandal dpdk-dev 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest7 patches 1 replyIn review
  2. v37 patches 4 repliesSuperseded
  3. v27 patches 7 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v15 patches5 repliesSuperseded

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7net/iavf: discard empty AdminQ descriptors on resetdrivers/net/intel/iavf/iavf_vchnl.c+5 -00 replies
2/7net/iavf: defer device start when PF VSI not readydrivers/net/intel/iavf/iavf.h drivers/net/intel/iavf/iavf_ethdev.c drivers/net/intel/iavf/iavf_vchnl.c+62 -40 replies
3/7net/iavf: drain in-flight Tx before resetdrivers/net/intel/iavf/iavf_rxtx.c drivers/net/intel/iavf/iavf_rxtx.h drivers/net/intel/iavf/iavf_vchnl.c+110 -00 replies
4/7net/iavf: change no_poll flag to atomicdrivers/net/intel/iavf/iavf.h drivers/net/intel/iavf/iavf_ethdev.c drivers/net/intel/iavf/iavf_rxtx.c +1 more+15 -50 replies
5/7net/iavf: improve VF reset detection on fast ARQ flipdrivers/net/intel/iavf/iavf.h drivers/net/intel/iavf/iavf_ethdev.c+29 -90 replies
6/7net/iavf: keep watchdog armed for the whole reset windowdrivers/net/intel/iavf/iavf_vchnl.c+3 -10 replies
7/7net/iavf: skip flow flush during PF-initiated resetdrivers/net/intel/iavf/iavf_ethdev.c+3 -10 replies

Reviews trailers per patch

All 7 patches have a Reviewed-by or Acked-by.

PatchCiara Loftus
1/7A-b
2/7A-b
3/7A-b
4/7A-b
5/7A-b
6/7A-b
7/7A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH v4 0/7] net/iavf: harden reset recovery and data path on link flap

V4-changes:
- Addressed Bruce Richardson's review comment on Patch-3
- Removed Tx drain on link down

V3-changes:
- Addressed Ciara Loftus's review comments on Fixes tag
- Added missing watchdog enable in Patch-6
- Removed extra space in commit msg of Patch-5

V2-changes:
- Addressed Ciara Loftus's review comments.
- Split Watchdog and flow flush from other patches.
- Shortened multiple comments and commit msg
- Prevented iavf_resume_pending_start() looping

During PF-initiated reset or a remote/ToR switch link-flap, the VF might miss the reset event, race on the no_poll gate, leak in-flight Tx descriptors, and stay down if dev_start ran before the PF VSI was ready.

This patch series build on the earlier reset-recovery fixes with the following:

- Reset detection: complement the ARQLEN1 check with VFGEN_RSTAT (VIRTCHNL_VFR_INPROGRESS) and poll at a 5 ms interval, matching the kernel iavf driver, so fast ARQ flips are not missed. When the VFR is still not observed, recover anyway instead of bailing out, keeping PF and VF state in sync.

- no_poll: make the flag atomic (RTE_ATOMIC) with release/acquire ordering so the data-plane lcores observe gate changes reliably.

- Tx drain: add iavf_dev_tx_drain() to flush in-flight Tx descriptors on impending-reset events before teardown, preventing MDD events and descriptor leaks.

- Deferred start: when dev_start fails during recovery (PF VSI inactive), defer it via start_pending and resume on the next link-up event so the VF comes back without manual intervention.

- AdminQ: discard zeroed (opcode 0) descriptors seen during PF-initiated resets to avoid the "Request 0 is not supported" log flood.

- Watchdog: keep watchdog armed for the whole reset window

- Flow flush: skip flow flush during PF-initiated reset

Anurag Mandal (7):
net/iavf: discard empty AdminQ descriptors on reset net/iavf: defer device start when PF VSI not ready net/iavf: drain in-flight Tx before reset net/iavf: change no_poll flag to atomic net/iavf: improve VF reset detection on fast ARQ flip net/iavf: keep watchdog armed for the whole reset window net/iavf: skip flow flush during PF-initiated reset

 drivers/net/intel/iavf/iavf.h        |   5 +-
 drivers/net/intel/iavf/iavf_ethdev.c | 108 +++++++++++++++++++++++----
 drivers/net/intel/iavf/iavf_rxtx.c   | 108 ++++++++++++++++++++++++++-
 drivers/net/intel/iavf/iavf_rxtx.h   |   6 ++
 drivers/net/intel/iavf/iavf_vchnl.c  |  20 ++++-
 5 files changed, 227 insertions(+), 20 deletions(-)
Signature · 1 line
2.34.1