"Michael S. Tsirkin" <m...@redhat.com> 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? > --- a/configure > +++ b/configure > @@ -1498,6 +1498,23 @@ EOF > fi > This misses vhost_net var definition at the start of the file and --enable-vhost/--disable-vhost options. > ########################################## > +# test for vhost net > + > +if test "$kvm" != "no"; then > + cat > $TMPC <<EOF > +#include <linux/vhost.h> > +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. > 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.