v4 changes:
 Rebase as IO port map is moved to EAL.
 Reword some commit messages.
 Don't fall back to PORT IO if VFIO/UIO fails.
v3 changes:
 Change log message to tell user that the virtio device is skipped
due to it is managed by kernel driver, instead of asking user to unbind
it from kernel driver.

v2 changes:
 Remove unnecessary assignment of NULL to dev->data->mac_addrs
 Ajust one comment's position
 change LOG level from ERR to INFO

virtio PMD doesn't set RTE_PCI_DRV_NEED_MAPPING in drv_flags of its
eth_driver. It will try igb_uio and PORT IO in turn to configure
virtio device. Even user in guest VM doesn't want to use virtio for
DPDK, virtio PMD will take over the device blindly.

The more serious problem is kernel driver is still managing the device,
which causes driver conflict.

This patch checks if there is kernel driver(other than UIO/VFIO)
managing the virtio device before virtio PMD uses port IO to configure
the device.

Huawei Xie (4):
  eal: make the comment more accurate
  eal: set kdrv to RTE_KDRV_NONE if kernel driver isn't managing the device.
  eal: call pci_ioport_map when kernel driver isn't managing the device
  virtio: return 1 to tell the upper layer we don't take over this device

 drivers/net/virtio/virtio_ethdev.c     |  9 +++++++--
 drivers/net/virtio/virtio_pci.c        | 15 ++++++++++++++-
 lib/librte_eal/common/eal_common_pci.c |  8 ++++----
 lib/librte_eal/linuxapp/eal/eal_pci.c  | 16 +++++++---------
 4 files changed, 32 insertions(+), 16 deletions(-)

-- 
1.8.1.4

Reply via email to