There is some trailing whitespace in the patch. Otherwise looks good to me.
Ethan On Wed, Jun 22, 2011 at 10:20, Ben Pfaff <[email protected]> wrote: > OVS used to support Linux 2.4 and Linux 2.6, but now it only supports > Linux 2.6. Linux 3.0 is coming up, and it's just an evolution of 2.6, so > OVS should stop referring to it as "2.6". > > This takes a first step by removing "26" from internal variable names. > There should be no user-visible changes. > --- > acinclude.m4 | 142 +++++++++++++++++----------------- > configure.ac | 2 +- > datapath/Makefile.am | 2 +- > datapath/linux-2.6/Makefile.main.in | 2 +- > 4 files changed, 74 insertions(+), 74 deletions(-) > > diff --git a/acinclude.m4 b/acinclude.m4 > index 3cf4061..2c9b10a 100644 > --- a/acinclude.m4 > +++ b/acinclude.m4 > @@ -25,93 +25,93 @@ AC_DEFUN([OVS_ENABLE_WERROR], > CFLAGS="$CFLAGS -Werror" > fi])]) > > -dnl OVS_CHECK_LINUX26 > +dnl OVS_CHECK_LINUX > dnl > dnl Configure linux kernel source tree > -AC_DEFUN([OVS_CHECK_LINUX26], [ > +AC_DEFUN([OVS_CHECK_LINUX], [ > AC_ARG_WITH([l26], > [AC_HELP_STRING([--with-l26=/path/to/linux-2.6], > [Specify the linux 2.6 kernel build > directory])], > - [KBUILD26="$withval"], [KBUILD26=])dnl > + [KBUILD="$withval"], [KBUILD=])dnl > AC_ARG_WITH([l26-source], > [AC_HELP_STRING([--with-l26-source=/path/to/linux-2.6-source], > [Specify the linux 2.6 kernel source directory > (usually figured out automatically from build > directory)])], > - [KSRC26="$withval"], [KSRC26=])dnl > - if test -n "$KBUILD26"; then > - KBUILD26=`eval echo "$KBUILD26"` > - case $KBUILD26 in > + [KSRC="$withval"], [KSRC=])dnl > + if test -n "$KBUILD"; then > + KBUILD=`eval echo "$KBUILD"` > + case $KBUILD in > /*) ;; > - *) KBUILD26=`pwd`/$KBUILD26 ;; > + *) KBUILD=`pwd`/$KBUILD ;; > esac > > # The build directory is what the user provided. > # Make sure that it exists. > AC_MSG_CHECKING([for Linux 2.6 build directory]) > - if test -d "$KBUILD26"; then > - AC_MSG_RESULT([$KBUILD26]) > - AC_SUBST(KBUILD26) > + if test -d "$KBUILD"; then > + AC_MSG_RESULT([$KBUILD]) > + AC_SUBST(KBUILD) > else > AC_MSG_RESULT([no]) > - AC_ERROR([source dir $KBUILD26 doesn't exist]) > + AC_ERROR([source dir $KBUILD doesn't exist]) > fi > > # Debian breaks kernel headers into "source" header and "build" headers. > - # We want the source headers, but $KBUILD26 gives us the "build" headers. > + # We want the source headers, but $KBUILD gives us the "build" headers. > # Use heuristics to find the source headers. > AC_MSG_CHECKING([for Linux 2.6 source directory]) > - if test -n "$KSRC26"; then > - KSRC26=`eval echo "$KSRC26"` > - case $KSRC26 in > + if test -n "$KSRC"; then > + KSRC=`eval echo "$KSRC"` > + case $KSRC in > /*) ;; > - *) KSRC26=`pwd`/$KSRC26 ;; > + *) KSRC=`pwd`/$KSRC ;; > esac > - if test ! -e $KSRC26/include/linux/kernel.h; then > - AC_MSG_ERROR([$KSRC26 is not a kernel source directory)]) > + if test ! -e $KSRC/include/linux/kernel.h; then > + AC_MSG_ERROR([$KSRC is not a kernel source directory)]) > fi > else > - KSRC26=$KBUILD26 > - if test ! -e $KSRC26/include/linux/kernel.h; then > - case `echo "$KBUILD26" | sed 's,/*$,,'` in # ( > + KSRC=$KBUILD > + if test ! -e $KSRC/include/linux/kernel.h; then > + case `echo "$KBUILD" | sed 's,/*$,,'` in # ( > */build) > - KSRC26=`echo "$KBUILD26" | sed 's,/build/*$,/source,'` > + KSRC=`echo "$KBUILD" | sed 's,/build/*$,/source,'` > ;; # ( > *) > - KSRC26=`(cd $KBUILD26 && pwd -P) | sed 's,-[[^-]]*$,-common,'` > + KSRC=`(cd $KBUILD && pwd -P) | sed 's,-[[^-]]*$,-common,'` > ;; > esac > fi > - if test ! -e $KSRC26/include/linux/kernel.h; then > + if test ! -e $KSRC/include/linux/kernel.h; then > AC_MSG_ERROR([cannot find source directory (please use > --with-l26-source)]) > fi > fi > - AC_MSG_RESULT([$KSRC26]) > + AC_MSG_RESULT([$KSRC]) > > AC_MSG_CHECKING([for kernel version]) > - patchlevel=`sed -n 's/^PATCHLEVEL = //p' "$KSRC26/Makefile"` > - sublevel=`sed -n 's/^SUBLEVEL = //p' "$KSRC26/Makefile"` > + patchlevel=`sed -n 's/^PATCHLEVEL = //p' "$KSRC/Makefile"` > + sublevel=`sed -n 's/^SUBLEVEL = //p' "$KSRC/Makefile"` > if test -z "$patchlevel" || test -z "$sublevel"; then > AC_ERROR([cannot determine kernel version]) > fi > AC_MSG_RESULT([2.$patchlevel.$sublevel]) > if test "2.$patchlevel" != '2.6'; then > - if test "$KBUILD26" = "$KSRC26"; then > - AC_ERROR([Linux kernel in $KBUILD26 is not version 2.6]) > + if test "$KBUILD" = "$KSRC"; then > + AC_ERROR([Linux kernel in $KBUILD is not version 2.6]) > else > - AC_ERROR([Linux kernel in build tree $KBUILD26 (source tree > $KSRC26) is not version 2.6]) > + AC_ERROR([Linux kernel in build tree $KBUILD (source tree $KSRC) is > not version 2.6]) > fi > fi > - if test ! -e "$KBUILD26"/include/linux/version.h || \ > - (test ! -e "$KBUILD26"/include/linux/autoconf.h && \ > - test ! -e "$KBUILD26"/include/generated/autoconf.h); then > - AC_MSG_ERROR([Linux kernel source in $KBUILD26 is not configured]) > + if test ! -e "$KBUILD"/include/linux/version.h || \ > + (test ! -e "$KBUILD"/include/linux/autoconf.h && \ > + test ! -e "$KBUILD"/include/generated/autoconf.h); then > + AC_MSG_ERROR([Linux kernel source in $KBUILD is not configured]) > fi > - OVS_CHECK_LINUX26_COMPAT > - elif test -n "$KSRC26"; then > + OVS_CHECK_LINUX_COMPAT > + elif test -n "$KSRC"; then > AC_MSG_ERROR([--with-l26-source may not be specified without --with-l26]) > fi > - AM_CONDITIONAL(L26_ENABLED, test -n "$KBUILD26") > + AM_CONDITIONAL(LINUX_ENABLED, test -n "$KBUILD") > ]) > > dnl OVS_GREP_IFELSE(FILE, REGEX, [IF-MATCH], [IF-NO-MATCH]) > @@ -151,8 +151,8 @@ AC_DEFUN([OVS_DEFINE], [ > ]) > > AC_DEFUN([OVS_CHECK_LOG2_H], [ > - AC_MSG_CHECKING([for $KSRC26/include/linux/log2.h]) > - if test -e $KSRC26/include/linux/log2.h; then > + AC_MSG_CHECKING([for $KSRC/include/linux/log2.h]) > + if test -e $KSRC/include/linux/log2.h; then > AC_MSG_RESULT([yes]) > OVS_DEFINE([HAVE_LOG2_H]) > else > @@ -160,28 +160,28 @@ AC_DEFUN([OVS_CHECK_LOG2_H], [ > fi > ]) > > -dnl OVS_CHECK_LINUX26_COMPAT > +dnl OVS_CHECK_LINUX_COMPAT > dnl > dnl Runs various Autoconf checks on the Linux 2.6 kernel source in > -dnl the directory in $KBUILD26. > -AC_DEFUN([OVS_CHECK_LINUX26_COMPAT], [ > +dnl the directory in $KBUILD. > +AC_DEFUN([OVS_CHECK_LINUX_COMPAT], [ > rm -f datapath/linux-2.6/kcompat.h.new > mkdir -p datapath/linux-2.6 > : > datapath/linux-2.6/kcompat.h.new > > - OVS_GREP_IFELSE([$KSRC26/arch/x86/include/asm/checksum_32.h], [src_err,], > + OVS_GREP_IFELSE([$KSRC/arch/x86/include/asm/checksum_32.h], [src_err,], > [OVS_DEFINE([HAVE_CSUM_COPY_DBG])]) > > - OVS_GREP_IFELSE([$KSRC26/include/linux/err.h], [ERR_CAST]) > + OVS_GREP_IFELSE([$KSRC/include/linux/err.h], [ERR_CAST]) > > - OVS_GREP_IFELSE([$KSRC26/include/linux/in.h], [ipv4_is_multicast]) > + OVS_GREP_IFELSE([$KSRC/include/linux/in.h], [ipv4_is_multicast]) > > - OVS_GREP_IFELSE([$KSRC26/include/linux/netdevice.h], [dev_disable_lro]) > - OVS_GREP_IFELSE([$KSRC26/include/linux/netdevice.h], [dev_get_stats]) > - OVS_GREP_IFELSE([$KSRC26/include/linux/netdevice.h], > [dev_get_by_index_rcu]) > + OVS_GREP_IFELSE([$KSRC/include/linux/netdevice.h], [dev_disable_lro]) > + OVS_GREP_IFELSE([$KSRC/include/linux/netdevice.h], [dev_get_stats]) > + OVS_GREP_IFELSE([$KSRC/include/linux/netdevice.h], [dev_get_by_index_rcu]) > > - OVS_GREP_IFELSE([$KSRC26/include/linux/rcupdate.h], [rcu_read_lock_held], > [], > - [OVS_GREP_IFELSE([$KSRC26/include/linux/rtnetlink.h], > + OVS_GREP_IFELSE([$KSRC/include/linux/rcupdate.h], [rcu_read_lock_held], [], > + [OVS_GREP_IFELSE([$KSRC/include/linux/rtnetlink.h], > [rcu_read_lock_held])]) > > # Check for the proto_data_valid member in struct sk_buff. The [^@] > @@ -189,41 +189,41 @@ AC_DEFUN([OVS_CHECK_LINUX26_COMPAT], [ > # member but retain the kerneldoc comment that describes it (which > # starts with @). The brackets must be doubled because of m4 > # quoting rules. > - OVS_GREP_IFELSE([$KSRC26/include/linux/skbuff.h], [[[^@]]proto_data_valid], > + OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [[[^@]]proto_data_valid], > [OVS_DEFINE([HAVE_PROTO_DATA_VALID])]) > - OVS_GREP_IFELSE([$KSRC26/include/linux/skbuff.h], [raw], > + OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [raw], > [OVS_DEFINE([HAVE_MAC_RAW])]) > - OVS_GREP_IFELSE([$KSRC26/include/linux/skbuff.h], [skb_dst(], > + OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [skb_dst(], > [OVS_DEFINE([HAVE_SKB_DST_ACCESSOR_FUNCS])]) > - OVS_GREP_IFELSE([$KSRC26/include/linux/skbuff.h], > + OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], > [skb_copy_from_linear_data_offset]) > - OVS_GREP_IFELSE([$KSRC26/include/linux/skbuff.h], [skb_cow_head]) > - OVS_GREP_IFELSE([$KSRC26/include/linux/skbuff.h], [skb_transport_header], > + OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [skb_cow_head]) > + OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [skb_transport_header], > [OVS_DEFINE([HAVE_SKBUFF_HEADER_HELPERS])]) > - OVS_GREP_IFELSE([$KSRC26/include/linux/icmpv6.h], [icmp6_hdr], > + OVS_GREP_IFELSE([$KSRC/include/linux/icmpv6.h], [icmp6_hdr], > [OVS_DEFINE([HAVE_ICMP6_HDR])]) > - OVS_GREP_IFELSE([$KSRC26/include/linux/skbuff.h], [skb_warn_if_lro], > + OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [skb_warn_if_lro], > [OVS_DEFINE([HAVE_SKB_WARN_LRO])]) > - OVS_GREP_IFELSE([$KSRC26/include/linux/skbuff.h], [consume_skb]) > + OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [consume_skb]) > > - OVS_GREP_IFELSE([$KSRC26/include/linux/string.h], [kmemdup], [], > - [OVS_GREP_IFELSE([$KSRC26/include/linux/slab.h], > [kmemdup])]) > + OVS_GREP_IFELSE([$KSRC/include/linux/string.h], [kmemdup], [], > + [OVS_GREP_IFELSE([$KSRC/include/linux/slab.h], [kmemdup])]) > > - OVS_GREP_IFELSE([$KSRC26/include/linux/types.h], [bool], > + OVS_GREP_IFELSE([$KSRC/include/linux/types.h], [bool], > [OVS_DEFINE([HAVE_BOOL_TYPE])]) > - OVS_GREP_IFELSE([$KSRC26/include/linux/types.h], [__wsum], > + OVS_GREP_IFELSE([$KSRC/include/linux/types.h], [__wsum], > [OVS_DEFINE([HAVE_CSUM_TYPES])]) > > - OVS_GREP_IFELSE([$KSRC26/include/net/checksum.h], [csum_replace4]) > - OVS_GREP_IFELSE([$KSRC26/include/net/checksum.h], [csum_unfold]) > + OVS_GREP_IFELSE([$KSRC/include/net/checksum.h], [csum_replace4]) > + OVS_GREP_IFELSE([$KSRC/include/net/checksum.h], [csum_unfold]) > > - OVS_GREP_IFELSE([$KSRC26/include/net/netlink.h], [NLA_NUL_STRING]) > - OVS_GREP_IFELSE([$KSRC26/include/net/netlink.h], [nla_get_be16]) > - OVS_GREP_IFELSE([$KSRC26/include/net/netlink.h], [nla_find_nested]) > + OVS_GREP_IFELSE([$KSRC/include/net/netlink.h], [NLA_NUL_STRING]) > + OVS_GREP_IFELSE([$KSRC/include/net/netlink.h], [nla_get_be16]) > + OVS_GREP_IFELSE([$KSRC/include/net/netlink.h], [nla_find_nested]) > > - OVS_GREP_IFELSE([$KSRC26/include/linux/if_link.h], [rtnl_link_stats64]) > + OVS_GREP_IFELSE([$KSRC/include/linux/if_link.h], [rtnl_link_stats64]) > > - OVS_GREP_IFELSE([$KSRC26/include/linux/if_vlan.h], [ADD_ALL_VLANS_CMD], > + OVS_GREP_IFELSE([$KSRC/include/linux/if_vlan.h], [ADD_ALL_VLANS_CMD], > [OVS_DEFINE([HAVE_VLAN_BUG_WORKAROUND])]) > > OVS_CHECK_LOG2_H > diff --git a/configure.ac b/configure.ac > index dde42e0..0cf6863 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -90,7 +90,7 @@ OVS_ENABLE_SPARSE > > AC_ARG_VAR(KARCH, [Kernel Architecture String]) > AC_SUBST(KARCH) > -OVS_CHECK_LINUX26 > +OVS_CHECK_LINUX > > AC_CONFIG_FILES([Makefile > datapath/Makefile > diff --git a/datapath/Makefile.am b/datapath/Makefile.am > index 1c0af40..5c5bc21 100644 > --- a/datapath/Makefile.am > +++ b/datapath/Makefile.am > @@ -1,5 +1,5 @@ > SUBDIRS = > -if L26_ENABLED > +if LINUX_ENABLED > SUBDIRS += linux-2.6 > endif > > diff --git a/datapath/linux-2.6/Makefile.main.in > b/datapath/linux-2.6/Makefile.main.in > index 74bed78..a868cb6 100644 > --- a/datapath/linux-2.6/Makefile.main.in > +++ b/datapath/linux-2.6/Makefile.main.in > @@ -2,7 +2,7 @@ > export builddir = @abs_builddir@ > export srcdir = @abs_srcdir@ > export top_srcdir = @abs_top_srcdir@ > -export KSRC = @KBUILD26@ > +export KSRC = @KBUILD@ > export VERSION = @VERSION@ > > include $(srcdir)/../Modules.mk > -- > 1.7.4.4 > > _______________________________________________ > dev mailing list > [email protected] > http://openvswitch.org/mailman/listinfo/dev > _______________________________________________ dev mailing list [email protected] http://openvswitch.org/mailman/listinfo/dev
