openvswitch / ovs-issues

Issue tracker repo for Open vSwitch
10 stars 3 forks source link

OVS-DPDK: Support for "virtio-pci" driver based nics #191

Closed tarun28jain closed 4 years ago

tarun28jain commented 4 years ago

Hi,

I have installed openstack with OVS-DPDK support. After launching a VM with DpdkVhostUser type of socket i have installed OVS-DPDK again inside the VM. Now this VM interfaces driver as observed from "dpdk-devbind --status" command is "virtio-pci". When i try to bind it to "vfio-pci" driver so it can be added to DPDK based ovs-bridge, dpdk-devind command fails and nic is unbinded from all the drivers.

root@test:~# dpdk-devbind --bind=vfio-pci 0000:00:04.0 Error: bind failed for 0000:00:04.0 - Cannot bind to driver vfio-pci Error: unbind failed for 0000:00:04.0 - Cannot open /sys/bus/pci/drivers//unbind

root@test:~# dpdk-devbind --status

Network devices using DPDK-compatible driver

`Network devices using kernel driver` `0000:00:03.0 'Virtio network device 1000' if=ens3 drv=virtio-pci unused=vfio-pci *Active*` `Other Network devices` `0000:00:04.0 'Virtio network device 1000' unused=vfio-pci` `Crypto devices using DPDK-compatible driver` So, i need to confirm if i can add "virtio-pci" driver based nics to OVS-DPDK and if support is present then how can i do that.
igsilya commented 4 years ago

It's not actually an OVS question. It's a question about configuration of your VM. In order to use vfio-pci driver inside VM you have 2 options:

Note that no-IOMMU mode requires support from the guest kernel and some distributions (fedora for example) doesn't have it compiled into default kernel.

Alternatively, you should be able to use uio_pci_generic driver instead of vfio-pci.