On 12/22/2015 5:57 PM, Peter Xu wrote: > On Tue, Dec 22, 2015 at 04:32:46PM +0800, Yuanhan Liu wrote: >> Actually, you are right. I mentioned in the last email that this is >> for configuration part. To answer your question in this email, you >> will not be able to go that further (say initiating virtio pmd) if >> you don't unbind the origin virtio-net driver, and bind it to igb_uio >> (or something similar). >> >> The start point is from rte_eal_pci_scan, where the sub-function >> pci_san_one just initates a DPDK bond driver. > I am not sure whether I do understand your meaning correctly > (regarding "you willl not be able to go that furture"): The problem > is that, we _can_ run testpmd without unbinding the ports and bind > to UIO or something. What we need to do is boot the guest, reserve > huge pages, and run testpmd (keeping its kernel driver as > "virtio-pci"). In pci_scan_one(): > > if (!ret) { > if (!strcmp(driver, "vfio-pci")) > dev->kdrv = RTE_KDRV_VFIO; > else if (!strcmp(driver, "igb_uio")) > dev->kdrv = RTE_KDRV_IGB_UIO; > else if (!strcmp(driver, "uio_pci_generic")) > dev->kdrv = RTE_KDRV_UIO_GENERIC; > else > dev->kdrv = RTE_KDRV_UNKNOWN; > } else > dev->kdrv = RTE_KDRV_UNKNOWN; > > I think it should be going to RTE_KDRV_UNKNOWN > (driver=="virtio-pci") here. I tried to run IO and it could work, > but I am not sure whether it is safe, and how.
Good catch, peter. Actually recently customers complain that with this feature, DPDK always tries to take over this virtio-pci device, which is unwanted behavior. Using blacklist could workaround this issue. However, the real serious problem is that kernel driver is still managing this device. Changchun, Thomas: I think we should fix this, but firstly i wonder why using port IO to get PCI resource is more secure. > > Also, I am not sure whether I need to (at least) unbind the > virtio-pci driver, so that there should have no kernel driver > running for the virtio device before DPDK using it. If you unbind, you have no entry under /proc/ioports for virtio IO port. > > Thanks > Peter > >> --yliu