From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rusty Russell Subject: Re: [PATCH/RFC] virtio_test: A module for testing virtio via userspace Date: Wed, 24 Jun 2009 13:10:34 +0930 Message-ID: <200906241310.35016.rusty@rustcorp.com.au> References: <200906190927.34831.borntraeger@de.ibm.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=iso-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Tim Hofmann , Christian Ehrhardt , Adrian Schneider , "virtualization@lists.linux-foundation.org" , KVM list To: Christian =?iso-8859-1?q?Borntr=E4ger?= Return-path: Received: from ozlabs.org ([203.10.76.45]:50126 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752106AbZFXDke convert rfc822-to-8bit (ORCPT ); Tue, 23 Jun 2009 23:40:34 -0400 In-Reply-To: <200906190927.34831.borntraeger@de.ibm.com> Content-Disposition: inline Sender: kvm-owner@vger.kernel.org List-ID: On Fri, 19 Jun 2009 04:57:34 pm Christian Borntr=E4ger wrote: > Hello Rusty, > > this is a result of a two month internship about virtio testing. Interesting! > I would like to get feedback on > > 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. > +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. > + case VIOTEST_IOCGETBUF: > + ret =3D do_get_buf(vtest, (struct viotest_getbuf __user *) arg); > + break; > + case VIOTEST_IOCGETCBS: > + ret =3D get_callbacks(vtest, (struct viotest_cbinfo __user *) arg)= ; > + break; Generally the point of callbacks is to tell you you have new buffers; i= n fact=20 you're insulated from callbacks which don't show new buffers. So I'm n= ot sure=20 these two need to be separate? In which case, a read/write interface starts to make sense (write for a= ddbuf=20 and kick, read for get_buf). That fits nicely with O_NONBLOCK and poll= (). Cheers, Rusty.