[PATCH 24.11] net/netvsc: support multi-process VF device removal

Luca Boccassi luca.boccassi at gmail.com
Thu Mar 26 13:22:04 CET 2026


On Wed, 25 Mar 2026 at 22:06, Long Li <longli at microsoft.com> wrote:
>
> [ upstream commit f741298f702772570ff20df000050483488092d0 ]
>
> When a VF device is hot-removed by the primary process, secondary
> processes must be notified to release their references to the VF port.
> Without this, secondary processes retain stale port references leading
> to crashes or undefined behavior when accessing the removed device.
>
> This patch adds multi-process communication infrastructure to coordinate
> VF removal across all processes:
>
> - Shared memory (netvsc_shared_data) to track secondary process count
> - Multi-process message handlers (NETVSC_MP_REQ_VF_REMOVE) to notify
>   secondaries when primary removes a VF device
> - Secondary handler calls rte_eth_dev_release_port() to cleanly release
>   the VF port in its own process space
> - Primary waits for all secondaries to acknowledge removal before
>   proceeding
>
> The implementation uses rte_mp_request_sync() to ensure all secondary
> processes respond within NETVSC_MP_REQ_TIMEOUT_SEC (5 seconds) before
> the primary completes the VF removal sequence.
>
> Fixes: 7fc4c0997b04 ("net/netvsc: fix hot adding multiple VF PCI devices")
> Cc: stable at dpdk.org
>
> Signed-off-by: Long Li <longli at microsoft.com>
> ---
>  drivers/net/netvsc/hn_ethdev.c | 307 +++++++++++++++++++++++++++++++--
>  drivers/net/netvsc/hn_nvs.h    |   6 +
>  drivers/net/netvsc/hn_vf.c     |   4 +
>  3 files changed, 306 insertions(+), 11 deletions(-)

Thanks, applied


More information about the stable mailing list