From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nl1IP-0000qZ-8X for qemu-devel@nongnu.org; Fri, 26 Feb 2010 09:36:01 -0500 Received: from [199.232.76.173] (port=35305 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nl1IO-0000qN-RP for qemu-devel@nongnu.org; Fri, 26 Feb 2010 09:36:00 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1Nl1IN-0008Di-7t for qemu-devel@nongnu.org; Fri, 26 Feb 2010 09:36:00 -0500 Received: from mx1.redhat.com ([209.132.183.28]:61532) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Nl1IM-0008DT-IZ for qemu-devel@nongnu.org; Fri, 26 Feb 2010 09:35:59 -0500 Date: Fri, 26 Feb 2010 16:32:42 +0200 From: "Michael S. Tsirkin" Message-ID: <20100226143242.GA23359@redhat.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: [Qemu-devel] Re: [PATCHv2 09/12] vhost: vhost net support List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Juan Quintela Cc: amit.shah@redhat.com, qemu-devel@nongnu.org, kraxel@redhat.com On Thu, Feb 25, 2010 at 08:04:21PM +0100, Juan Quintela wrote: > "Michael S. Tsirkin" wrote: > > This adds vhost net device support in qemu. Will be tied to tap device > > and virtio by following patches. Raw backend is currently missing, > > will be worked on/submitted separately. > > > > +obj-y += vhost_net.o > +obj-$(CONFIG_VHOST_NET) += vhost.o > > hy is vhost_net.o configured unconditionally? It includes stubs that return error. This way callers do not need to include any ifdefs. > > --- a/configure > > +++ b/configure > > @@ -1498,6 +1498,23 @@ EOF > > fi > > > This misses vhost_net var definition at the start of the file Seems to work without. Why is it needed? > and > --enable-vhost/--disable-vhost options. > I don't really see why we need --enable-vhost/--disable-vhost. Runtime flag is enough. > > ########################################## > > +# test for vhost net > > + > > +if test "$kvm" != "no"; then > > + cat > $TMPC < > +#include > > +int main(void) { return 0; } > > +EOF > > + if compile_prog "$kvm_cflags" "" ; then > > + vhost_net=yes > > + else > > + vhost_net=no > > + fi > > Indent please. > > > +else > > + vhost_net=no > > +fi > > + > > +########################################## > > # pthread probe > > PTHREADLIBS_LIST="-lpthread -lpthreadGC2" > > > > @@ -1968,6 +1985,7 @@ echo "fdt support $fdt" > > echo "preadv support $preadv" > > echo "fdatasync $fdatasync" > > echo "uuid support $uuid" > > +echo "vhost-net support $vhost_net" > > Otherwise this couldo not be there. What do you mean? vhost_net always gets a value, so it is safe to use here. > > if test $sdl_too_old = "yes"; then > > echo "-> Your SDL version is too old - please upgrade to have SDL support" > > @@ -2492,6 +2510,9 @@ case "$target_arch2" in > > if test "$kvm_para" = "yes"; then > > echo "CONFIG_KVM_PARA=y" >> $config_target_mak > > fi > > + if test $vhost_net = "yes" ; then > > + echo "CONFIG_VHOST_NET=y" >> $config_target_mak > > + fi > > fi > > esac > > echo "TARGET_PHYS_ADDR_BITS=$target_phys_bits" >> $config_target_mak > > > + for (;from < to; ++from) { > > + vhost_log_chunk_t log; > > ..... > > > + ffsll(log) : ffs(log))) { > > if you defines vhost_log_chuck_t, you also define vhost_log_ffs() and > you are done without this if. > > Later, Juan.