net/virtio: unmap PCI device in secondary process
authorYuan Wang <yuanx.wang@intel.com>
Mon, 6 Jun 2022 15:55:43 +0000 (23:55 +0800)
committerMaxime Coquelin <maxime.coquelin@redhat.com>
Tue, 21 Jun 2022 09:24:15 +0000 (11:24 +0200)
commit5729407fa4d612b93ceefacef13f57c1de2ceaa6
tree025d1bbc18969af579ae6182b11b5f2310beff19
parent4414bb67010dfec2559af52efe8f479b26d55447
net/virtio: unmap PCI device in secondary process

In multi-process, the secondary process will remap PCI during
initialization, but the mapping is not removed in the uninit path,
the device is not closed, and the device busy error will be reported
when the device is hotplugged.

This patch unmaps PCI device at secondary process uninitialization
based on virtio_rempa_pci.

Fixes: 36a7a2e7a53f ("net/virtio: move PCI device init in dedicated file")
Cc: stable@dpdk.org
Signed-off-by: Yuan Wang <yuanx.wang@intel.com>
Tested-by: Wei Ling <weix.ling@intel.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
drivers/net/virtio/virtio_pci_ethdev.c