All of lore.kernel.org
 help / color / mirror / Atom feed
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Yang Hongyang <yanghy@cn.fujitsu.com>
Cc: ian.campbell@citrix.com, wency@cn.fujitsu.com,
	stefano.stabellini@eu.citrix.com, andrew.cooper3@citrix.com,
	yunhong.jiang@intel.com, ian.jackson@eu.citrix.com,
	xen-devel@lists.xen.org, eddie.dong@intel.com,
	rshriram@cs.ubc.ca, laijs@cn.fujitsu.com, roger.pau@citrix.com
Subject: Re: [PATCH v12 2/7] remus: add libnl3 dependency for network buffering support
Date: Fri, 20 Jun 2014 10:43:08 -0400	[thread overview]
Message-ID: <20140620144308.GJ11545@laptop.dumpdata.com> (raw)
In-Reply-To: <1403247872-14382-3-git-send-email-yanghy@cn.fujitsu.com>

On Fri, Jun 20, 2014 at 03:04:27PM +0800, Yang Hongyang wrote:
> Libnl3 is required for controlling Remus network buffering.
> This patch adds dependency on libnl3 (>= 3.2.8) to autoconf scripts.
> Also provide ability to configure tools without libnl3 support, that
> is without network buffering support.
> 
> when there's no network buffering support,libxl__netbuffer_enabled()
> returns 0, otherwise returns 1. The callers of this api will be
> introduced in the rest of the series.
> 
> NOTE: This patch changes tools/configure.ac, please rerun
>       autogen.sh while apply the patch.
> Signed-off-by: Shriram Rajagopalan <rshriram@cs.ubc.ca>
> Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
> Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com>
> Reviewed-by: Wen Congyang <wency@cn.fujitsu.com>
> ---
>  README                          |  4 ++++
>  config/Tools.mk.in              |  4 ++++
>  tools/configure.ac              | 16 ++++++++++++++++
>  tools/libxl/Makefile            | 13 +++++++++++++
>  tools/libxl/libxl_internal.h    |  1 +
>  tools/libxl/libxl_netbuffer.c   | 31 +++++++++++++++++++++++++++++++
>  tools/libxl/libxl_nonetbuffer.c | 31 +++++++++++++++++++++++++++++++
>  tools/remus/README              |  6 ++++++
>  8 files changed, 106 insertions(+)
>  create mode 100644 tools/libxl/libxl_netbuffer.c
>  create mode 100644 tools/libxl/libxl_nonetbuffer.c
> 
> diff --git a/README b/README
> index 9bbe734..e770932 100644
> --- a/README
> +++ b/README
> @@ -72,6 +72,10 @@ disabled at compile time:
>      * cmake (if building vtpm stub domains)
>      * markdown
>      * figlet (for generating the traditional Xen start of day banner)
> +    * Development install of libnl3 (e.g., libnl-3-200,
> +      libnl-3-dev, etc).  Required if network buffering is desired
> +      when using Remus with libxl.  See tools/remus/README for detailed
> +      information.
>  
>  Second, you need to acquire a suitable kernel for use in domain 0. If
>  possible you should use a kernel provided by your OS distributor. If
> diff --git a/config/Tools.mk.in b/config/Tools.mk.in
> index 84b2612..06c9d25 100644
> --- a/config/Tools.mk.in
> +++ b/config/Tools.mk.in
> @@ -38,6 +38,9 @@ PTHREAD_LIBS        := @PTHREAD_LIBS@
>  
>  PTYFUNCS_LIBS       := @PTYFUNCS_LIBS@
>  
> +LIBNL3_LIBS         := @LIBNL3_LIBS@
> +LIBNL3_CFLAGS       := @LIBNL3_CFLAGS@
> +
>  # Download GIT repositories via HTTP or GIT's own protocol?
>  # GIT's protocol is faster and more robust, when it works at all (firewalls
>  # may block it). We make it the default, but if your GIT repository downloads
> @@ -56,6 +59,7 @@ CONFIG_QEMU_XEN     := @qemu_xen@
>  CONFIG_BLKTAP1      := @blktap1@
>  CONFIG_VTPM         := @vtpm@
>  CONFIG_QEMUU_EXTRA_ARGS:= @EXTRA_QEMUU_CONFIGURE_ARGS@
> +CONFIG_REMUS_NETBUF := @remus_netbuf@
>  
>  #System options
>  ZLIB                := @zlib@
> diff --git a/tools/configure.ac b/tools/configure.ac
> index 9db798b..6deed8f 100644
> --- a/tools/configure.ac
> +++ b/tools/configure.ac
> @@ -267,5 +267,21 @@ esac
>  # Checks for header files.
>  AC_CHECK_HEADERS([yajl/yajl_version.h sys/eventfd.h valgrind/memcheck.h utmp.h])
>  
> +# Check for libnl3 >=3.2.8. If present enable remus network buffering.
> +PKG_CHECK_MODULES(LIBNL3, [libnl-3.0 >= 3.2.8 libnl-route-3.0 >= 3.2.8],
> +    [libnl3_lib="y"], [libnl3_lib="n"])
> +
> +AS_IF([test "x$libnl3_lib" = "xn" ], [
> +    AC_MSG_WARN([Disabling support for Remus network buffering.
> +    Please install libnl3 libraries, command line tools and devel
> +    headers - version 3.2.8 or higher])
> +    AC_SUBST(remus_netbuf, [n])
> +    ],[
> +    AC_SUBST(remus_netbuf, [y])
> +])
> +
> +AC_SUBST(LIBNL3_LIBS)
> +AC_SUBST(LIBNL3_CFLAGS)
> +
>  AC_OUTPUT()
>  
> diff --git a/tools/libxl/Makefile b/tools/libxl/Makefile
> index 7fc42c8..fdffff3 100644
> --- a/tools/libxl/Makefile
> +++ b/tools/libxl/Makefile
> @@ -21,11 +21,17 @@ endif
>  
>  LIBXL_LIBS =
>  LIBXL_LIBS = $(LDLIBS_libxenctrl) $(LDLIBS_libxenguest) $(LDLIBS_libxenstore) $(LDLIBS_libblktapctl) $(PTYFUNCS_LIBS) $(LIBUUID_LIBS)
> +ifeq ($(CONFIG_REMUS_NETBUF),y)
> +LIBXL_LIBS += $(LIBNL3_LIBS)
> +endif
>  
>  CFLAGS_LIBXL += $(CFLAGS_libxenctrl)
>  CFLAGS_LIBXL += $(CFLAGS_libxenguest)
>  CFLAGS_LIBXL += $(CFLAGS_libxenstore)
>  CFLAGS_LIBXL += $(CFLAGS_libblktapctl) 
> +ifeq ($(CONFIG_REMUS_NETBUF),y)
> +CFLAGS_LIBXL += $(LIBNL3_CFLAGS)
> +endif
>  CFLAGS_LIBXL += -Wshadow
>  
>  LIBXL_LIBS-$(CONFIG_ARM) += -lfdt
> @@ -43,6 +49,13 @@ LIBXL_OBJS-y += libxl_blktap2.o
>  else
>  LIBXL_OBJS-y += libxl_noblktap2.o
>  endif
> +
> +ifeq ($(CONFIG_REMUS_NETBUF),y)
> +LIBXL_OBJS-y += libxl_netbuffer.o
> +else
> +LIBXL_OBJS-y += libxl_nonetbuffer.o
> +endif
> +
>  LIBXL_OBJS-$(CONFIG_X86) += libxl_cpuid.o libxl_x86.o
>  LIBXL_OBJS-$(CONFIG_ARM) += libxl_nocpuid.o libxl_arm.o
>  
> diff --git a/tools/libxl/libxl_internal.h b/tools/libxl/libxl_internal.h
> index a0d4f24..3fc90e2 100644
> --- a/tools/libxl/libxl_internal.h
> +++ b/tools/libxl/libxl_internal.h
> @@ -2470,6 +2470,7 @@ typedef struct libxl__save_helper_state {
>                        * marshalling and xc callback functions */
>  } libxl__save_helper_state;
>  
> +_hidden int libxl__netbuffer_enabled(libxl__gc *gc);
>  
>  /*----- Domain suspend (save) state structure -----*/
>  
> diff --git a/tools/libxl/libxl_netbuffer.c b/tools/libxl/libxl_netbuffer.c
> new file mode 100644
> index 0000000..8e23d75
> --- /dev/null
> +++ b/tools/libxl/libxl_netbuffer.c
> @@ -0,0 +1,31 @@
> +/*
> + * Copyright (C) 2013

.. There should be something past 2013. And you can just make
it 2014

> + * Author Shriram Rajagopalan <rshriram@cs.ubc.ca>
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU Lesser General Public License as published
> + * by the Free Software Foundation; version 2.1 only. with the special
> + * exception on linking described in file LICENSE.
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> + * GNU Lesser General Public License for more details.
> + */
> +
> +#include "libxl_osdeps.h" /* must come before any other headers */
> +
> +#include "libxl_internal.h"
> +
> +int libxl__netbuffer_enabled(libxl__gc *gc)
> +{
> +    return 1;
> +}
> +
> +/*
> + * Local variables:
> + * mode: C
> + * c-basic-offset: 4
> + * indent-tabs-mode: nil
> + * End:
> + */
> diff --git a/tools/libxl/libxl_nonetbuffer.c b/tools/libxl/libxl_nonetbuffer.c
> new file mode 100644
> index 0000000..6aa4bf1
> --- /dev/null
> +++ b/tools/libxl/libxl_nonetbuffer.c
> @@ -0,0 +1,31 @@
> +/*
> + * Copyright (C) 2013

Ditto.
> + * Author Shriram Rajagopalan <rshriram@cs.ubc.ca>
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU Lesser General Public License as published
> + * by the Free Software Foundation; version 2.1 only. with the special
> + * exception on linking described in file LICENSE.
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> + * GNU Lesser General Public License for more details.
> + */
> +
> +#include "libxl_osdeps.h" /* must come before any other headers */
> +
> +#include "libxl_internal.h"
> +
> +int libxl__netbuffer_enabled(libxl__gc *gc)
> +{
> +    return 0;
> +}
> +
> +/*
> + * Local variables:
> + * mode: C
> + * c-basic-offset: 4
> + * indent-tabs-mode: nil
> + * End:
> + */
> diff --git a/tools/remus/README b/tools/remus/README
> index 9e8140b..4736252 100644
> --- a/tools/remus/README
> +++ b/tools/remus/README
> @@ -2,3 +2,9 @@ Remus provides fault tolerance for virtual machines by sending continuous
>  checkpoints to a backup, which will activate if the target VM fails.
>  
>  See the website at http://nss.cs.ubc.ca/remus/ for details.
> +
> +Using Remus with libxl on Xen 4.4 and higher:

Might want to say Xen 4.5 and higher since this is for Xen 4.5
> + To enable network buffering, you need libnl 3.2.8
> + or higher along with the development headers and command line utilities.
> + If your distro does not have the appropriate libnl3 version, you can find
> + the latest source tarball of libnl3 at http://www.carisma.slowglass.com/~tgr/libnl/
> -- 
> 1.9.1
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel

  reply	other threads:[~2014-06-20 14:43 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-20  7:04 [PATCH v12 0/7] Remus/Libxl: Remus network buffering and drbd disk Yang Hongyang
2014-06-20  7:04 ` [PATCH v12 1/7] remus: make postcopy callback asynchronous Yang Hongyang
2014-06-20  7:04 ` [PATCH v12 2/7] remus: add libnl3 dependency for network buffering support Yang Hongyang
2014-06-20 14:43   ` Konrad Rzeszutek Wilk [this message]
2014-06-21  6:17     ` Hongyang Yang
2014-06-20  7:04 ` [PATCH v12 3/7] remus: introduce remus device Yang Hongyang
2014-06-27 17:38   ` Ian Jackson
2014-06-30  5:02     ` Hongyang Yang
2014-07-01  2:04       ` Wen Congyang
2014-07-01  3:48     ` Hongyang Yang
2014-07-01  8:31     ` Hongyang Yang
2014-06-20  7:04 ` [PATCH v12 4/7] remus netbuffer: implement remus network buffering for nic devices Yang Hongyang
2014-06-20  7:04 ` [PATCH v12 5/7] remus drbd: Implement remus drbd replicated disk Yang Hongyang
2014-06-20  7:04 ` [PATCH v12 6/7] libxl: network buffering cmdline switch Yang Hongyang
2014-06-20  7:04 ` [PATCH v12 7/7] libxl: disk " Yang Hongyang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140620144308.GJ11545@laptop.dumpdata.com \
    --to=konrad.wilk@oracle.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=eddie.dong@intel.com \
    --cc=ian.campbell@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=laijs@cn.fujitsu.com \
    --cc=roger.pau@citrix.com \
    --cc=rshriram@cs.ubc.ca \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=wency@cn.fujitsu.com \
    --cc=xen-devel@lists.xen.org \
    --cc=yanghy@cn.fujitsu.com \
    --cc=yunhong.jiang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.