[dpdk-dev] [Question] How pmd virtio works without UIO?

Peter Xu peterx at redhat.com
Wed Dec 23 02:55:54 CET 2015


On Tue, Dec 22, 2015 at 04:38:30PM +0000, Xie, Huawei wrote:
> On 12/22/2015 7:39 PM, Peter Xu wrote:
> > I tried to unbind one of the virtio net device, I see the PCI entry
> > still there.
> >
> > Before unbind:
> >
> > [root at vm proc]# lspci -k -s 00:03.0
> > 00:03.0 Ethernet controller: Red Hat, Inc Virtio network device
> >         Subsystem: Red Hat, Inc Device 0001
> >         Kernel driver in use: virtio-pci
> > [root at vm proc]# cat /proc/ioports | grep c060-c07f
> >   c060-c07f : 0000:00:03.0
> >     c060-c07f : virtio-pci
> >
> > After unbind:
> >
> > [root at vm proc]# lspci -k -s 00:03.0
> > 00:03.0 Ethernet controller: Red Hat, Inc Virtio network device
> >         Subsystem: Red Hat, Inc Device 0001
> > [root at vm proc]# cat /proc/ioports | grep c060-c07f
> >   c060-c07f : 0000:00:03.0
> >
> > So... does this means that it is an alternative to black list
> > solution?
> Oh, we could firstly check if this port is manipulated by kernel driver
> in virtio_resource_init/eth_virtio_dev_init, as long as it is not too late.

I guess there might be two problems? Which are:

1. How user avoid DPDK taking over virtio devices that they do not
   want for IO (chooses which device to use)

2. Driver conflict between virtio PMD in DPDK, and virtio-pci in
   kernel (happens on every virtio device that DPDK uses)

For the white/black list solution, I guess it's good enough to solve
(1) for customers. I am just curious about the 2nd.

Or say, even we black listed some virtio devices (or doing white
list), the virtio devices used by DPDK are still in danger if we
cannot make sure that virtio-pci will not touch the device any more
(even it will not touch it, it feels like errornous to not telling
virtio-pci to remove it before hand). E.g., if virtio-pci interrupt
is still working, when there are packets from outside to guest,
vp_interrupt() might be called? Then virtio-pci driver might do
read/write to vring as well? If so, that's problematic. Am I wrong?

Peter


More information about the dev mailing list