From: Andrew Cooper <andrew.cooper3@citrix.com>
To: rshriram@cs.ubc.ca
Cc: stefano.stabellini@eu.citrix.com, ian.jackson@eu.citrix.com,
ian.campbell@citrix.com, xen-devel@lists.xen.org
Subject: Re: [PATCH 1 of 5] remus: add libnl3 dependency to autoconf scripts
Date: Mon, 26 Aug 2013 10:06:19 +0100 [thread overview]
Message-ID: <521B1A8B.2060907@citrix.com> (raw)
In-Reply-To: <0ae8b121b67b3cb3a6b0.1377474314@athos.nss.cs.ubc.ca>
On 26/08/2013 00:45, rshriram@cs.ubc.ca wrote:
> # HG changeset patch
> # User Shriram Rajagopalan <rshriram@cs.ubc.ca>
> # Date 1377473602 25200
> # Node ID 0ae8b121b67b3cb3a6b00f2cc97e98fec5758e20
> # Parent 40b079bd57dea24c3b000f233ed123763483a4d5
> 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@cs.ubc.ca>
As identified in the patch 0, libnl3 is not present for CentOS (so by
implication RHEL and derivatives) and various BSDs, so enabling it by
default and erroring out of autoconf if it cant be found is not really
acceptable imo.
It would be better to detect the presence/absence of an appropriate
libnl3, and use that as the default. Then, the logic would be: "By
default build in libnl3 support if it is available, but don't if it is
not. If the user explicitlicy configures --with-remusnetbuf and libnl3
is not present, present an error" which is far more appropriate for an
option which affects a large swathe of distributions.
~Andrew
>
> diff -r 40b079bd57de -r 0ae8b121b67b config/Tools.mk.in
> --- a/config/Tools.mk.in Sun Aug 25 14:39:36 2013 -0700
> +++ b/config/Tools.mk.in Sun Aug 25 16:33:22 2013 -0700
> @@ -35,6 +35,7 @@ PTHREAD_LDFLAGS := @PTHREAD_LDFLAGS@
> PTHREAD_LIBS := @PTHREAD_LIBS@
>
> PTYFUNCS_LIBS := @PTYFUNCS_LIBS@
> +LIBNL3_LIBS := @LIBNL3_LIBS@
>
> # Download GIT repositories via HTTP or GIT's own protocol?
> # GIT's protocol is faster and more robust, when it works at all (firewalls
> @@ -54,6 +55,7 @@ CONFIG_QEMU_TRAD := @qemu_traditional
> CONFIG_QEMU_XEN := @qemu_xen@
> CONFIG_XEND := @xend@
> CONFIG_BLKTAP1 := @blktap1@
> +CONFIG_REMUS_NETBUF := @remusnetbuf@
>
> #System options
> ZLIB := @zlib@
> diff -r 40b079bd57de -r 0ae8b121b67b tools/configure.ac
> --- a/tools/configure.ac Sun Aug 25 14:39:36 2013 -0700
> +++ b/tools/configure.ac Sun Aug 25 16:33:22 2013 -0700
> @@ -56,6 +56,8 @@ AX_ARG_DEFAULT_ENABLE([xsmpolicy], [Disa
> AX_ARG_DEFAULT_DISABLE([ovmf], [Enable OVMF])
> AX_ARG_DEFAULT_ENABLE([rombios], [Disable ROM BIOS])
> AX_ARG_DEFAULT_ENABLE([seabios], [Disable SeaBIOS])
> +AX_ARG_DEFAULT_ENABLE([remusnetbuf], [ Enable/Disable Remus
> + network buffering support (requires libnl3)])
> AX_ARG_DEFAULT_ENABLE([debug], [Disable debug build of tools])
> AX_ARG_DEFAULT_ENABLE([xend], [Disable xend toolstack])
> AX_ARG_DEFAULT_DISABLE([blktap1], [Disable blktap1 tools])
> @@ -208,4 +210,29 @@ AC_SUBST(libiconv)
> # Checks for header files.
> AC_CHECK_HEADERS([yajl/yajl_version.h sys/eventfd.h])
>
> +AS_IF([test "x$remusnetbuf" = "xy"], [
> +
> +dnl Need libnl version 3.2.8 or higher for plug qdisc support
> + AS_IF(
> + [ pkg-config --exists 'libnl-3.0 >= 3.2.8 libnl-route-3.0 >= 3.2.8 libnl-cli-3.0 >= 3.2.8' ],
> + [], [
> + AC_MSG_ERROR([Need libnl3, libnl-route-3 and libnl-cli-3 (>= 3.2.8) for Remus network buffering])
> + ])
> +
> + AC_CHECK_HEADER([netlink/route/qdisc/plug.h], [
> + AC_CHECK_LIB(nl-3, nl_socket_alloc, [
> + AC_CHECK_LIB(nl-route-3, rtnl_qdisc_alloc, [
> + LIBNL3_LIBS="-lnl-3 -lnl-route-3"
> + AC_SUBST(LIBNL3_LIBS)
> + ], [
> + AC_MSG_ERROR([Could not find libnl-route-3])
> + ])
> + ], [
> + AC_MSG_ERROR([Could not find libnl3])
> + ])
> + ], [
> + AC_MSG_ERROR([Could not find libnl3 dev headers (esp. plug.h)])
> + ])
> +], [])
> +
> AC_OUTPUT()
> diff -r 40b079bd57de -r 0ae8b121b67b tools/libxl/Makefile
> --- a/tools/libxl/Makefile Sun Aug 25 14:39:36 2013 -0700
> +++ b/tools/libxl/Makefile Sun Aug 25 16:33:22 2013 -0700
> @@ -20,7 +20,7 @@ LIBUUID_LIBS += -luuid
> endif
>
> LIBXL_LIBS =
> -LIBXL_LIBS = $(LDLIBS_libxenctrl) $(LDLIBS_libxenguest) $(LDLIBS_libxenstore) $(LDLIBS_libblktapctl) $(PTYFUNCS_LIBS) $(LIBUUID_LIBS)
> +LIBXL_LIBS = $(LDLIBS_libxenctrl) $(LDLIBS_libxenguest) $(LDLIBS_libxenstore) $(LDLIBS_libblktapctl) $(PTYFUNCS_LIBS) $(LIBUUID_LIBS) $(LIBNL3_LIBS)
>
> CFLAGS_LIBXL += $(CFLAGS_libxenctrl)
> CFLAGS_LIBXL += $(CFLAGS_libxenguest)
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2013-08-26 9:06 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-25 23:45 [PATCH 0 of 5] Remus/Libxl: Network buffering support rshriram
2013-08-25 23:45 ` [PATCH 1 of 5] remus: add libnl3 dependency to autoconf scripts rshriram
2013-08-26 9:06 ` Andrew Cooper [this message]
2013-08-27 8:44 ` Ian Campbell
2013-08-27 10:56 ` Ian Campbell
2013-08-29 19:13 ` Shriram Rajagopalan
2013-08-25 23:45 ` [PATCH 2 of 5] tools/hotplug: Remus network buffering setup scripts rshriram
2013-08-25 23:45 ` [PATCH 3 of 5] tools/libxl: setup/teardown Remus network buffering rshriram
2013-08-26 22:13 ` Andrew Cooper
2013-08-25 23:45 ` [PATCH 4 of 5] tools/libxl: Control network buffering in remus callbacks rshriram
2013-08-26 22:28 ` Andrew Cooper
2013-08-29 21:49 ` Shriram Rajagopalan
2013-08-30 8:42 ` Andrew Cooper
2013-08-25 23:45 ` [PATCH 5 of 5] tools/xl: Remus - Network buffering cmdline switch rshriram
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=521B1A8B.2060907@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=ian.campbell@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=rshriram@cs.ubc.ca \
--cc=stefano.stabellini@eu.citrix.com \
--cc=xen-devel@lists.xen.org \
/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.