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

[Xen-devel] [PATCH 2 of 7 V4] remus: add libnl3 dependency to autoconf scripts



# HG changeset patch
# User Shriram Rajagopalan <rshriram@xxxxxxxxx>
# Date 1384492673 28800
# Node ID f14fb4982ec89b30c04c6f4684de5056450c27a0
# Parent  3143bed377a08bb9e87c7636e004dc371bb20338
remus: add libnl3 dependency to autoconf scripts

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.

Signed-off-by: Shriram Rajagopalan <rshriram@xxxxxxxxx>

diff -r 3143bed377a0 -r f14fb4982ec8 README
--- a/README    Wed Nov 13 12:35:58 2013 -0800
+++ b/README    Thu Nov 14 21:17:53 2013 -0800
@@ -71,6 +71,10 @@ disabled at compile time:
       includes the alternative ocaml xenstored.
     * cmake (if building vtpm stub domains)
     * markdown
+    * 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 -r 3143bed377a0 -r f14fb4982ec8 config/Tools.mk.in
--- a/config/Tools.mk.in        Wed Nov 13 12:35:58 2013 -0800
+++ b/config/Tools.mk.in        Thu Nov 14 21:17:53 2013 -0800
@@ -38,6 +38,8 @@ 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 +58,7 @@ CONFIG_QEMU_TRAD    := @qemu_traditional
 CONFIG_QEMU_XEN     := @qemu_xen@
 CONFIG_XEND         := @xend@
 CONFIG_BLKTAP1      := @blktap1@
+CONFIG_REMUS_NETBUF := @remus_netbuf@
 
 #System options
 ZLIB                := @zlib@
diff -r 3143bed377a0 -r f14fb4982ec8 tools/configure.ac
--- a/tools/configure.ac        Wed Nov 13 12:35:58 2013 -0800
+++ b/tools/configure.ac        Thu Nov 14 21:17:53 2013 -0800
@@ -230,6 +230,21 @@ AC_SUBST(libiconv)
 # Checks for header files.
 AC_CHECK_HEADERS([yajl/yajl_version.h sys/eventfd.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(LIBNL3_LIBS)
+           AC_SUBST(LIBNL3_CFLAGS)
+           AC_SUBST(remus_netbuf, [y])
+])
+
 AC_OUTPUT()
 
 AS_IF([test "x$xend" = "xy" ], [
diff -r 3143bed377a0 -r f14fb4982ec8 tools/libxl/Makefile
--- a/tools/libxl/Makefile      Wed Nov 13 12:35:58 2013 -0800
+++ b/tools/libxl/Makefile      Thu Nov 14 21:17:53 2013 -0800
@@ -21,11 +21,13 @@ endif
 
 LIBXL_LIBS =
 LIBXL_LIBS = $(LDLIBS_libxenctrl) $(LDLIBS_libxenguest) $(LDLIBS_libxenstore) 
$(LDLIBS_libblktapctl) $(PTYFUNCS_LIBS) $(LIBUUID_LIBS)
+LIBXL_LIBS += $(LIBNL3_LIBS)
 
 CFLAGS_LIBXL += $(CFLAGS_libxenctrl)
 CFLAGS_LIBXL += $(CFLAGS_libxenguest)
 CFLAGS_LIBXL += $(CFLAGS_libxenstore)
 CFLAGS_LIBXL += $(CFLAGS_libblktapctl) 
+CFLAGS_LIBXL += $(LIBNL3_CFLAGS)
 CFLAGS_LIBXL += -Wshadow
 
 CFLAGS += $(PTHREAD_CFLAGS)
diff -r 3143bed377a0 -r f14fb4982ec8 tools/remus/README
--- a/tools/remus/README        Wed Nov 13 12:35:58 2013 -0800
+++ b/tools/remus/README        Thu Nov 14 21:17:53 2013 -0800
@@ -2,3 +2,9 @@ Remus provides fault tolerance for virtu
 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:
+ 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/

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.