Permalink
Browse files

Adapting the compilation of drivers that don't support inlined pipeline

* Adding 'make clean-libs'
* Modifying no_pipeline_inline.m4. Reordering m4 inclusion
  • Loading branch information...
msune committed Apr 23, 2015
1 parent 2eec502 commit 61258150b8fd2ee9f750a4a44fe6767163bc8727
View
@@ -17,6 +17,9 @@ install-exec-hook:
uninstall-hook:
@echo "Uninstall"
clean-libs:
cd libs && $(MAKE) clean-libs
maintainer-clean-local:
rm -rf $(top_srcdir)/m4
rm -rf $(top_srcdir)/build-aux
View
@@ -21,7 +21,10 @@ AC_ARG_WITH(hw-support, AS_HELP_STRING([--with-hw-support="driver-name"],[Compil
HW="gnu-linux"
])
#External librs
#General settings
DRIVER_HAS_INLINE_SUPPORT="yes"
#External libs
WITH_DPDK="no"
#Add subpackages conditionally
@@ -59,6 +62,7 @@ if( test "$HW" = "bcm");then
AC_DEFINE(HW_BCM)
PLATFORM=bcm
AC_CONFIG_SUBDIRS([src/xdpd/drivers/bcm])
DRIVER_HAS_INLINE_SUPPORT="no"
fi
if( test "$HW" = "octeon");then
msg="$msg OCTEON"
@@ -71,12 +75,14 @@ if( test "$HW" = "netfpga10g");then
AC_DEFINE(HW_NETFPGA10G)
PLATFORM=netfpga10g
AC_CONFIG_SUBDIRS([src/xdpd/drivers/netfpga10g])
DRIVER_HAS_INLINE_SUPPORT="no"
fi
if( test "$HW" = "example");then
msg="$msg Example platform"
AC_DEFINE(HW_EXAMPLE)
PLATFORM=example
AC_CONFIG_SUBDIRS([src/xdpd/drivers/example])
DRIVER_HAS_INLINE_SUPPORT="no"
fi
#[+]Add your platform here...
@@ -88,6 +94,7 @@ fi
#Print fancy message
AC_MSG_RESULT($msg)
AM_CONDITIONAL([DRIVER_HAS_INLINE_SUPPORT], [test "$DRIVER_HAS_INLINE_SUPPORT" = "yes"])
AM_CONDITIONAL([WITH_DPDK], [test "$WITH_DPDK" = "yes"])
AC_SUBST(PLATFORM)
AC_SUBST(xdpd_HW_LDFLAGS)
@@ -3,8 +3,17 @@ AC_MSG_CHECKING(and enforcing rofl-pipeline is not compiled with packet processi
AC_MSG_RESULT(testing header)
#Check header
AC_CHECK_HEADERS([rofl.h], [], pipeline_inline="yes", [#define ROFL_PIPELINE_ABORT_IF_INLINED 1])
AC_CHECK_HEADER([rofl_datapath.h], pipeline_compiled="yes", pipeline_compiled="no")
if test "$pipeline_inline" = "yes"; then
AC_ERROR([rofl-pipeline is compiled with inlined platform functions, but this module does not support it])
#Remove cache
$as_unset ac_cv_header_rofl_datapath_h
#Check headers
AC_CHECK_HEADERS([rofl_datapath.h], [], pipeline_inline="yes", [#define ROFL_PIPELINE_ABORT_IF_INLINED 1])
if test "$pipeline_compiled" = "yes"; then
if test "$pipeline_inline" = "yes"; then
AC_ERROR([rofl-datapath is compiled with inlined platform functions, but this module does not support it]
[ Force a recompilation of rofl libraries by triggering 'make clean-libs'])
fi
fi
View
@@ -29,9 +29,13 @@ if DEBUG
ROFL_CM_AC_FLAGS+= --enable-debug
ROFL_DP_AC_FLAGS+= --enable-debug
else
if DRIVER_HAS_INLINE_SUPPORT
ROFL_DP_AC_FLAGS+= --with-pipeline-lockless --with-pipeline-platform-funcs-inlined
endif
endif
#All targets
all: rofl_common rofl_datapath
@@ -44,7 +48,12 @@ rofl_datapath:
#Force recompiling
clean-libs:
rm -f $(top_srcdir)/libs/.*-commit
maintainer-clean-local:
@$(SHELL) cd $(top_srcdir)/libs/rofl-common && make maintainer-clean
@$(SHELL) cd $(top_srcdir)/libs/rofl-datapath && make maintainer-clean
rm -f $(top_srcdir)/libs/.*-commit
if WITH_DPDK
@@ -34,12 +34,12 @@ m4_include([../../../../config/debug.m4])
# Check for profiling mode
m4_include([../../../../config/profiling.m4])
# ROFL (Must always be included *before* no_pipeline_inline.m4)
m4_include([../../../../config/rofl.m4])
# Ensure rofl-pipeline platform functions are NOT inlined
m4_include([../../../../config/no_pipeline_inline.m4])
# ROFL
m4_include([../../../../config/rofl.m4])
AC_DEFINE(DRIVER_NAME,"example_platform")
AC_CONFIG_FILES([
@@ -43,12 +43,11 @@ m4_include([../../../../config/profiling.m4])
# pkt classifier
m4_include([config/pktclassifier.m4])
# Ensure rofl-pipeline platform functions are NOT inlined
m4_include([../../../../config/no_pipeline_inline.m4])
# ROFL
# ROFL (Must always be included *before* no_pipeline_inline.m4)
m4_include([../../../../config/rofl.m4])
# Ensure rofl-pipeline platform functions are NOT inlined
m4_include([../../../../config/no_pipeline_inline.m4])
AC_CONFIG_FILES([
Makefile

0 comments on commit 6125815

Please sign in to comment.