Skip to content

net/netvsc: fix VF hotplug and service reset handling

Long Li dpdk-dev 3 versions – Applied

Status from this message: Applied to next-net

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest7 patches 1 replyApplied
  2. v27 patches 2 repliesSuperseded
  3. v17 patches 2 repliesSuperseded

Changes in v3 from the cover letter

- Patch 1: wrapped rte_eal_alarm_set lines to fix checkpatch line-length warning
- Patch 4: changed "retry loop exiting" log from NOTICE to DEBUG to avoid noise on every successful VF re-attach
- Patch 6: removed dead -ENOTSUP fallback to rte_eth_stats_get, replaced with direct -ENOTSUP return; documented caller contract for zeroed buffers
- Patch 7: deferred all recovery callbacks via rte_eal_alarm_set consistent with INTR_RMV pattern; dropped unlocked vf_attached guard in recovery_failed; cancel new alarms in hn_vf_close

Patches in v3 Applied

#Subject and filesSizeRepliesApplied
1/7net/netvsc: retry VF hotplug indefinitely until PCI device disappearsdrivers/net/netvsc/hn_ethdev.c+31 -100 replies
2/7net/netvsc: retry on SIOCGIFHWADDR failure during VF hotplugdrivers/net/netvsc/hn_ethdev.c+11 -30 replies
3/7net/netvsc: retry full probe when IB device not ready during hotplugdrivers/net/netvsc/hn_ethdev.c+24 -50 replies
4/7net/netvsc: add debug logging for VF hotplug retrydrivers/net/netvsc/hn_ethdev.c+21 -10 replies
5/7net/netvsc: retry when no matching MAC found in net directorydrivers/net/netvsc/hn_ethdev.c drivers/net/netvsc/hn_var.h+36 -10 replies
6/7net/netvsc: forward per-queue stats from VF devicedrivers/net/netvsc/hn_vf.c+14 -30 replies
7/7net/netvsc: handle VF recovery events for service resetdrivers/net/netvsc/hn_vf.c+165 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [PATCH v3 0/7] net/netvsc: fix VF hotplug and service reset handling

This series fixes several issues in the netvsc PMD's VF hot-plug retry logic and adds support for MANA service reset (suspend/resume) recovery.

Patches 1-5 fix the VF hot-add retry path to handle Azure-specific timing issues: slow MANA driver probe (>100s), udev interface renames, asynchronous mana_ib registration, and multi-NIC staggered VF appearance.

Patch 6 fixes per-queue stats forwarding from VF to netvsc.

Patch 7 adds recovery event handling for MANA service resets, where the kernel suspends/resumes the VF without PCI remove.

v3:
- Patch 1: wrapped rte_eal_alarm_set lines to fix checkpatch line-length warning
- Patch 4: changed "retry loop exiting" log from NOTICE to DEBUG to avoid noise on every successful VF re-attach
- Patch 6: removed dead -ENOTSUP fallback to rte_eth_stats_get, replaced with direct -ENOTSUP return; documented caller contract for zeroed buffers
- Patch 7: deferred all recovery callbacks via rte_eal_alarm_set consistent with INTR_RMV pattern; dropped unlocked vf_attached guard in recovery_failed; cancel new alarms in hn_vf_close

v2:
- Patch 1: added comment explaining why indefinite retry is safe
- Patch 2: changed SIOCGIFHWADDR retry log to DEBUG
- Patch 3: restored ERR log for non-ENODEV/EEXIST failures
- Patch 4: changed per-iteration logs from NOTICE to DEBUG; used RTE_ETHER_ADDR_PRT_FMT macros
- Patch 5: fixed commit message (limit 120 not 30); changed mac_retry log to DEBUG; explicit NULL comparisons
- Patch 6: added comment for direct dev_ops call; added -ENOTSUP fallback
- Patch 7: added dev_started check in recovery_success; added vf_attached guard in recovery_failed

Long Li (7):
net/netvsc: retry VF hotplug indefinitely until PCI device disappears net/netvsc: retry on SIOCGIFHWADDR failure during VF hotplug net/netvsc: retry full probe when IB device not ready during hotplug net/netvsc: add debug logging for VF hotplug retry net/netvsc: retry when no matching MAC found in net directory net/netvsc: forward per-queue stats from VF device net/netvsc: handle VF recovery events for service reset

 drivers/net/netvsc/hn_ethdev.c | 142 +++++++++++++++++++++----
 drivers/net/netvsc/hn_var.h    |   1 +
 drivers/net/netvsc/hn_vf.c     | 182 ++++++++++++++++++++++++++++++++-
 3 files changed, 302 insertions(+), 23 deletions(-)
Signature · 1 line
2.43.0