Skip to content

Commit

Permalink
datapath: Move kernel version check to configure.
Browse files Browse the repository at this point in the history
Rather than having compile time check in datapath.c, its better
to check kernel version at configuration step.

Signed-off-by: Pravin B Shelar <[email protected]>
Acked-by: Jesse Gross <[email protected]>
  • Loading branch information
Pravin B Shelar committed Sep 6, 2013
1 parent 37418c8 commit d76aabe
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
14 changes: 8 additions & 6 deletions acinclude.m4
Original file line number Diff line number Diff line change
Expand Up @@ -134,14 +134,16 @@ AC_DEFUN([OVS_CHECK_LINUX], [
AC_MSG_RESULT([$kversion])
if test "$version" -ge 3; then
: # Linux 3.x
elif test "$version" = 2 && test "$patchlevel" -ge 6; then
: # Linux 2.6.x
if test "$version" = 3 && test "$patchlevel" -le 10; then
: # Linux 3.x
else
AC_ERROR([Linux kernel in $KBUILD is version $kversion, but version newer than 3.10.x is not supported])
fi
else
if test "$KBUILD" = "$KSRC"; then
AC_ERROR([Linux kernel in $KBUILD is version $kversion, but version 2.6 or later is required])
if test "$version" -le 1 || test "$patchlevel" -le 5 || test "$sublevel" -le 31; then
AC_ERROR([Linux kernel in $KBUILD is version $kversion, but version 2.6.32 or later is required])
else
AC_ERROR([Linux kernel in build tree $KBUILD (source tree $KSRC) is version $kversion, but version 2.6 or later is required])
: # Linux 2.6.x
fi
fi
if (test ! -e "$KBUILD"/include/linux/version.h && \
Expand Down
5 changes: 0 additions & 5 deletions datapath/datapath.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,6 @@
#include "vport-internal_dev.h"
#include "vport-netdev.h"

#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,32) || \
LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0)
#error Kernels before 2.6.32 or after 3.10 are not supported by this version of Open vSwitch.
#endif

#define REHASH_FLOW_INTERVAL (10 * 60 * HZ)
static void rehash_flow_table(struct work_struct *work);
static DECLARE_DELAYED_WORK(rehash_flow_wq, rehash_flow_table);
Expand Down

0 comments on commit d76aabe

Please sign in to comment.