net/netvsc: fix hot adding multiple VF PCI devices
authorLong Li <longli@microsoft.com>
Thu, 24 Mar 2022 17:46:17 +0000 (10:46 -0700)
committerFerruh Yigit <ferruh.yigit@xilinx.com>
Fri, 29 Apr 2022 21:36:59 +0000 (23:36 +0200)
commit7fc4c0997b046e2874a9806431b3d267bb684b41
treeeba03ea6a7adcc696628ceac8b48782ef179bfb6
parentc0c305ee9e0e7c9feca6412266a778f330d20c19
net/netvsc: fix hot adding multiple VF PCI devices

This patch fixes two issues with hot removing/adding a VF PCI device:
1. The original device argument is lost when it's hot added
2. If there are multiple VFs hot adding at the same time, some of the
   VFs may not get added successfully because only one single VF status
   is stored in the netvsc.

Fix these by storing the original device arguments and maintain a list
of hot add contexts to deal with multiple VF devices.

Fixes: a2a23a794b ("net/netvsc: support VF device hot add/remove")
Cc: stable@dpdk.org
Signed-off-by: Long Li <longli@microsoft.com>
drivers/net/netvsc/hn_ethdev.c
drivers/net/netvsc/hn_var.h
drivers/net/netvsc/hn_vf.c