Re: [PATCH/RFC] virtio_test: A module for testing virtio via userspace

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am Mittwoch 24 Juni 2009 05:40:34 schrieb Rusty Russell:
> > o  the general idea of a virtio_test module
> > o  the user interface ioctls
> > o  further ideas and comments
>
> Not mugging real drivers would be a requirement, I think.

Ok, I try to find a proper way to avoid that virtio_test binds to devices that 
have real drivers available. That patch to virtio_dev_match should be relatively 
easy.
The open question I have:  Should virtio_test bind to a device if no other 
driver is (yet) available?

> > +config VIRTIO_TEST
> > +	tristate "Virtio test driver (EXPERIMENTAL)"
> > +	select VIRTIO
> > +	select VIRTIO_RING
>
> Perhaps these should be depends?  Plus, depends on EXPERIMENTAL.
>
> > +	 If unsure, say M.
>
> That's "N" I think.

Yes. 

>
> > +	case VIOTEST_IOCGETBUF:
> > +		ret = do_get_buf(vtest, (struct viotest_getbuf __user *) arg);
> > +		break;
> > +	case VIOTEST_IOCGETCBS:
> > +		ret = get_callbacks(vtest, (struct viotest_cbinfo __user *) arg);
> > +		break;
>
> Generally the point of callbacks is to tell you you have new buffers; in
> fact you're insulated from callbacks which don't show new buffers.  So I'm
> not sure these two need to be separate?
> In which case, a read/write interface starts to make sense (write for
> addbuf and kick, read for get_buf).  That fits nicely with O_NONBLOCK and
> poll().

Hmm - makes sense. I will try to propose a 2nd version of the interface. The 
interface must handle multiple virtqueues per device, should allow non-blocking 
mode etc. Lets see what ideas come to my mind.

Thanks for the comments

Christian
_______________________________________________
Virtualization mailing list
Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/virtualization

[Index of Archives]     [KVM Development]     [Libvirt Development]     [Libvirt Users]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux