DPDK-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Anurag Mandal <anurag.mandal@intel.com>
To: dev@dpdk.org
Cc: bruce.richardson@intel.com, vladimir.medvedkin@intel.com,
	ciara.loftus@intel.com, Anurag Mandal <anurag.mandal@intel.com>
Subject: [PATCH v2 0/7] net/iavf: harden reset recovery and data path on link flap
Date: Thu, 13 Aug 2026 10:45:28 +0000	[thread overview]
Message-ID: <cover.1786617159.git.anurag.mandal@intel.com> (raw)
In-Reply-To: <cover.1786004043.git.anurag.mandal@intel.com>

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 link-down and 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  |  21 +++++-
 5 files changed, 228 insertions(+), 20 deletions(-)

-- 
2.34.1


  parent reply	other threads:[~2026-08-13 10:46 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-06  8:26 [PATCH 0/5] net/iavf: harden reset recovery and data path on link flap Anurag Mandal
2026-08-06  8:26 ` [PATCH 1/5] net/iavf: discard empty AdminQ descriptors on reset Anurag Mandal
2026-08-07 10:10   ` Loftus, Ciara
2026-08-06  8:26 ` [PATCH 2/5] net/iavf: defer device start when PF VSI not ready Anurag Mandal
2026-08-07 10:46   ` Loftus, Ciara
2026-08-06  8:26 ` [PATCH 3/5] net/iavf: drain in-flight Tx before reset Anurag Mandal
2026-08-07 10:51   ` Loftus, Ciara
2026-08-06  8:26 ` [PATCH 4/5] net/iavf: change no_poll flag to atomic Anurag Mandal
2026-08-07 10:56   ` Loftus, Ciara
2026-08-06  8:26 ` [PATCH 5/5] net/iavf: improve VF reset detection on fast ARQ flip Anurag Mandal
2026-08-07 11:08   ` Loftus, Ciara
2026-08-13 10:45 ` Anurag Mandal [this message]
2026-08-13 10:45   ` [PATCH v2 1/7] net/iavf: discard empty AdminQ descriptors on reset Anurag Mandal
2026-08-13 13:01     ` Loftus, Ciara
2026-08-13 10:45   ` [PATCH v2 2/7] net/iavf: defer device start when PF VSI not ready Anurag Mandal
2026-08-13 13:12     ` Loftus, Ciara
2026-08-13 13:17       ` Bruce Richardson
2026-08-13 10:45   ` [PATCH v2 3/7] net/iavf: drain in-flight Tx before reset Anurag Mandal
2026-08-13 13:24     ` Loftus, Ciara
2026-08-13 10:45   ` [PATCH v2 4/7] net/iavf: change no_poll flag to atomic Anurag Mandal
2026-08-13 10:45   ` [PATCH v2 5/7] net/iavf: improve VF reset detection on fast ARQ flip Anurag Mandal
2026-08-13 13:48     ` Loftus, Ciara
2026-08-13 10:45   ` [PATCH v2 6/7] net/iavf: keep watchdog armed for the whole reset window Anurag Mandal
2026-08-13 13:54     ` Loftus, Ciara
2026-08-13 10:45   ` [PATCH v2 7/7] net/iavf: skip flow flush during PF-initiated reset Anurag Mandal
2026-08-13 13:56     ` Loftus, Ciara

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1786617159.git.anurag.mandal@intel.com \
    --to=anurag.mandal@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=ciara.loftus@intel.com \
    --cc=dev@dpdk.org \
    --cc=vladimir.medvedkin@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox