Skip to content

fix multi-process VF hotplug

[email protected] 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 4 repliesIn review
  2. v37 patches 2 repliesSuperseded
  3. v20 of 8 patches 0 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v18 patches2 repliesSuperseded

Changes in v4 from the cover letter

- Patch 1: Check hn_vf_add() return value in netvsc_hotplug_retry
- Patch 1: Track fresh_attach to avoid tearing down original VF attachment when configure/start fails on an -EEXIST path
- Patch 2: Move counter decrement and netvsc_uninit_once() after device cleanup in eth_hn_remove() to prevent use-after-free of shared data
- Patch 2: Clear netvsc_shared_data on init failure paths to prevent dangling pointer

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7net/netvsc: fix race conditions on VF add/remove eventsdrivers/net/netvsc/hn_ethdev.c drivers/net/netvsc/hn_rxtx.c drivers/net/netvsc/hn_var.h +1 more+106 -870 replies
2/7net/netvsc: add multi-process VF device removal supportdrivers/net/netvsc/hn_ethdev.c drivers/net/netvsc/hn_nvs.h drivers/net/netvsc/hn_vf.c+295 -52 replies
3/7net/mana: fix PD resource leak on device closedrivers/net/mana/mana.c+14 -00 replies
4/7net/netvsc: fix devargs memory leak on hotplugdrivers/net/netvsc/hn_ethdev.c+2 -00 replies
5/7net/mana: fix fast-path ops setup in secondary processdrivers/net/mana/mp.c+6 -00 replies
6/7net/mlx5: fix fast-path ops setup in secondary processdrivers/net/mlx5/linux/mlx5_mp_os.c+4 -00 replies
7/7net/mlx4: fix fast-path ops setup in secondary processdrivers/net/mlx4/mlx4_mp.c+4 -00 replies

Reviews trailers per patch

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

Read the v4 thread

Cover letter [PATCH v4 0/7] fix multi-process VF hotplug

From: Long Li <[email protected]>

Fix several issues with VF hotplug and multi-process support in netvsc, mana, mlx5, and mlx4 drivers:

- Fix race conditions between VSP notifications and DPDK device events during VF add/remove, with proper locking of VF-related fields
- Add multi-process communication infrastructure for coordinating VF removal across primary and secondary processes
- Fix Protection Domain resource leak on device close in mana
- Fix devargs memory leak during VF hotplug in netvsc
- Fix fast-path ops (rte_eth_fp_ops) setup in secondary processes for mana, mlx5, and mlx4, preventing segfaults on VF hot-add

v4:
- Patch 1: Check hn_vf_add() return value in netvsc_hotplug_retry
- Patch 1: Track fresh_attach to avoid tearing down original VF attachment when configure/start fails on an -EEXIST path
- Patch 2: Move counter decrement and netvsc_uninit_once() after device cleanup in eth_hn_remove() to prevent use-after-free of shared data
- Patch 2: Clear netvsc_shared_data on init failure paths to prevent dangling pointer

v3:
- Fix review comments from v2

v2:
- Initial rework of VF add/remove locking

Long Li (7):
net/netvsc: fix race conditions on VF add/remove events net/netvsc: add multi-process VF device removal support net/mana: fix PD resource leak on device close net/netvsc: fix devargs memory leak on hotplug net/mana: fix fast-path ops setup in secondary process net/mlx5: fix fast-path ops setup in secondary process net/mlx4: fix fast-path ops setup in secondary process

 drivers/net/mana/mana.c             |  14 ++
 drivers/net/mana/mp.c               |   6 +
 drivers/net/mlx4/mlx4_mp.c          |   4 +
 drivers/net/mlx5/linux/mlx5_mp_os.c |   4 +
 drivers/net/netvsc/hn_ethdev.c      | 300 +++++++++++++++++++++++++++-
 drivers/net/netvsc/hn_nvs.h         |   6 +
 drivers/net/netvsc/hn_rxtx.c        |  40 ++--
 drivers/net/netvsc/hn_var.h         |   1 +
 drivers/net/netvsc/hn_vf.c          | 148 ++++++++------
 9 files changed, 431 insertions(+), 92 deletions(-)
Signature · 1 line
2.43.0