Hi Wenwu

On 8/22/2023 7:48 AM, Wenwu Ma wrote:
When doing IO port mapping for legacy device
in secondary process, the region information
is missing, so, we need to refill it.

Please use 72 columns in the commit log


Fixes: 4b741542ecde ("bus/pci: avoid depending on private kernel value")
Cc: [email protected]

Signed-off-by: Wenwu Ma <[email protected]>
---
v3:
  - adjusting variable settings
v2:
  - add release of device in pci_vfio_ioport_unmap

---
  drivers/bus/pci/linux/pci_vfio.c | 43 ++++++++++++++++++++++++++++++--
  1 file changed, 41 insertions(+), 2 deletions(-)

diff --git a/drivers/bus/pci/linux/pci_vfio.c b/drivers/bus/pci/linux/pci_vfio.c
index e634de8322..5ef26c98d1 100644
--- a/drivers/bus/pci/linux/pci_vfio.c
+++ b/drivers/bus/pci/linux/pci_vfio.c
@@ -1314,6 +1314,27 @@ pci_vfio_ioport_map(struct rte_pci_device *dev, int bar,
                return -1;
        }
+ if (rte_eal_process_type() == RTE_PROC_SECONDARY) {

One thing I am not fully convinced is that why VFIO setup is not required for primary process here?

Thanks,
Nipun

Reply via email to