Update configure scripts for ccp integration
parent
dff2c4636f
commit
835563dbba
|
@ -44,7 +44,7 @@ endif
|
|||
ifeq ($(DPDK),1)
|
||||
DPDK_MACHINE_LINKER_FLAGS=$${RTE_SDK}/$${RTE_TARGET}/lib/ldflags.txt
|
||||
DPDK_MACHINE_LDFLAGS=$(shell cat ${DPDK_MACHINE_LINKER_FLAGS})
|
||||
LIBS += -g -O3 -pthread -lrt -march=native ${MTCP_FLD}/lib/libmtcp.a -lnuma -lmtcp -lpthread -lrt -ldl -lgmp -L${RTE_SDK}/${RTE_TARGET}/lib ${DPDK_MACHINE_LDFLAGS} -lstartccp
|
||||
LIBS += -g -O3 -pthread -lrt -march=native ${MTCP_FLD}/lib/libmtcp.a -lnuma -lmtcp -lpthread -lrt -ldl -lgmp -L${RTE_SDK}/${RTE_TARGET}/lib ${DPDK_MACHINE_LDFLAGS}
|
||||
endif
|
||||
|
||||
# onvm-specific variables
|
||||
|
@ -71,7 +71,7 @@ endif
|
|||
ifeq ($(CCP), 1)
|
||||
# LIBCCP
|
||||
LIBCCP=${MTCP_FLD}/src/libccp
|
||||
LIBS += -L$(LIBCCP) -lccp
|
||||
LIBS += -L$(LIBCCP) -lccp -lstartccp
|
||||
INC += -I$(LIBCCP)
|
||||
endif
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ endif
|
|||
ifeq ($(DPDK),1)
|
||||
DPDK_MACHINE_LINKER_FLAGS=$${RTE_SDK}/$${RTE_TARGET}/lib/ldflags.txt
|
||||
DPDK_MACHINE_LDFLAGS=$(shell cat ${DPDK_MACHINE_LINKER_FLAGS})
|
||||
LIBS += -g -O3 -pthread -lrt -march=native ${MTCP_FLD}/lib/libmtcp.a -lnuma -lmtcp -lpthread -lrt -ldl -lgmp -L${RTE_SDK}/${RTE_TARGET}/lib ${DPDK_MACHINE_LDFLAGS} -lstartccp
|
||||
LIBS += -g -O3 -pthread -lrt -march=native ${MTCP_FLD}/lib/libmtcp.a -lnuma -lmtcp -lpthread -lrt -ldl -lgmp -L${RTE_SDK}/${RTE_TARGET}/lib ${DPDK_MACHINE_LDFLAGS}
|
||||
endif
|
||||
|
||||
# onvm-specific variables
|
||||
|
@ -69,7 +69,7 @@ endif
|
|||
ifeq ($(CCP), 1)
|
||||
# LIBCCP
|
||||
LIBCCP=${MTCP_FLD}/src/libccp
|
||||
LIBS += -L$(LIBCCP) -lccp
|
||||
LIBS += -L$(LIBCCP) -lccp -lstartccp
|
||||
INC += -I$(LIBCCP)
|
||||
endif
|
||||
|
||||
|
|
|
@ -4484,7 +4484,7 @@ if test "${enable_ccp+set}" = set; then :
|
|||
fi
|
||||
|
||||
|
||||
if test "x$enable_lro" = "xyes"
|
||||
if test "x$enable_ccp" = "xyes"
|
||||
then
|
||||
CCP=1
|
||||
|
||||
|
@ -4550,6 +4550,54 @@ then
|
|||
as_fn_error $? "Packet I/O library is missing. Please set either dpdk or psio or netmap as your I/O lib." "$LINENO" 5
|
||||
fi
|
||||
|
||||
if test "x$enable_ccp" = "xyes"
|
||||
then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libstartccp_run_forever in -lstartccp" >&5
|
||||
$as_echo_n "checking for libstartccp_run_forever in -lstartccp... " >&6; }
|
||||
if ${ac_cv_lib_startccp_libstartccp_run_forever+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
ac_check_lib_save_LIBS=$LIBS
|
||||
LIBS="-lstartccp $LIBS"
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
/* Override any GCC internal prototype to avoid an error.
|
||||
Use char because int might match the return type of a GCC
|
||||
builtin and then its argument prototype would still apply. */
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
char libstartccp_run_forever ();
|
||||
int
|
||||
main ()
|
||||
{
|
||||
return libstartccp_run_forever ();
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_link "$LINENO"; then :
|
||||
ac_cv_lib_startccp_libstartccp_run_forever=yes
|
||||
else
|
||||
ac_cv_lib_startccp_libstartccp_run_forever=no
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
LIBS=$ac_check_lib_save_LIBS
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_startccp_libstartccp_run_forever" >&5
|
||||
$as_echo "$ac_cv_lib_startccp_libstartccp_run_forever" >&6; }
|
||||
if test "x$ac_cv_lib_startccp_libstartccp_run_forever" = xyes; then :
|
||||
echo "Found CCP library"
|
||||
else
|
||||
|
||||
as_fn_error $? "CCP library is missing. Please see README.md for instructions." "$LINENO" 5
|
||||
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
am__api_version='1.15'
|
||||
|
||||
# Find a good install program. We prefer a C program (faster),
|
||||
|
|
11
configure.ac
11
configure.ac
|
@ -110,7 +110,7 @@ dnl Example of default-disabled feature
|
|||
AC_ARG_ENABLE([ccp],
|
||||
AS_HELP_STRING([--enable-ccp], [Enable Congestion Control Plane (CCP)]))
|
||||
|
||||
if test "x$enable_lro" = "xyes"
|
||||
if test "x$enable_ccp" = "xyes"
|
||||
then
|
||||
AC_SUBST(CCP, 1)
|
||||
fi
|
||||
|
@ -153,9 +153,12 @@ then
|
|||
AC_MSG_ERROR([Packet I/O library is missing. Please set either dpdk or psio or netmap as your I/O lib.])
|
||||
fi
|
||||
|
||||
AC_CHECK_LIB(startccp, libstartccp_run_forever, [echo "Found CCP library"], [
|
||||
AC_MSG_ERROR(CCP library is missing. Please see X for instructions.)
|
||||
])
|
||||
if test "x$enable_ccp" = "xyes"
|
||||
then
|
||||
AC_CHECK_LIB(startccp, libstartccp_run_forever, [echo "Found CCP library"], [
|
||||
AC_MSG_ERROR(CCP library is missing. Please see README.md for instructions.)
|
||||
])
|
||||
fi
|
||||
|
||||
AM_INIT_AUTOMAKE(mtcp, 3)
|
||||
AC_CONFIG_FILES([Makefile])
|
||||
|
|
23
install-sh
23
install-sh
|
@ -1,7 +1,7 @@
|
|||
#!/bin/sh
|
||||
# install - install a program, script, or datafile
|
||||
|
||||
scriptversion=2013-12-25.23; # UTC
|
||||
scriptversion=2014-09-12.12; # UTC
|
||||
|
||||
# This originates from X11R5 (mit/util/scripts/install.sh), which was
|
||||
# later released in X11R6 (xc/config/util/install.sh) with the
|
||||
|
@ -324,34 +324,41 @@ do
|
|||
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
|
||||
;;
|
||||
*)
|
||||
# $RANDOM is not portable (e.g. dash); use it when possible to
|
||||
# lower collision chance
|
||||
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
|
||||
trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
|
||||
trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0
|
||||
|
||||
# As "mkdir -p" follows symlinks and we work in /tmp possibly; so
|
||||
# create the $tmpdir first (and fail if unsuccessful) to make sure
|
||||
# that nobody tries to guess the $tmpdir name.
|
||||
if (umask $mkdir_umask &&
|
||||
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
|
||||
$mkdirprog $mkdir_mode "$tmpdir" &&
|
||||
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1
|
||||
then
|
||||
if test -z "$dir_arg" || {
|
||||
# Check for POSIX incompatibilities with -m.
|
||||
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
|
||||
# other-writable bit of parent directory when it shouldn't.
|
||||
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
|
||||
ls_ld_tmpdir=`ls -ld "$tmpdir"`
|
||||
test_tmpdir="$tmpdir/a"
|
||||
ls_ld_tmpdir=`ls -ld "$test_tmpdir"`
|
||||
case $ls_ld_tmpdir in
|
||||
d????-?r-*) different_mode=700;;
|
||||
d????-?--*) different_mode=755;;
|
||||
*) false;;
|
||||
esac &&
|
||||
$mkdirprog -m$different_mode -p -- "$tmpdir" && {
|
||||
ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
|
||||
$mkdirprog -m$different_mode -p -- "$test_tmpdir" && {
|
||||
ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"`
|
||||
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
|
||||
}
|
||||
}
|
||||
then posix_mkdir=:
|
||||
fi
|
||||
rmdir "$tmpdir/d" "$tmpdir"
|
||||
rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir"
|
||||
else
|
||||
# Remove any dirs left behind by ancient mkdir implementations.
|
||||
rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
|
||||
rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null
|
||||
fi
|
||||
trap '' 0;;
|
||||
esac;;
|
||||
|
|
|
@ -1568,8 +1568,6 @@ mtcp_init(const char *config_file)
|
|||
int i;
|
||||
int ret;
|
||||
|
||||
fprintf(stderr, "hello from mtcp_init\n");
|
||||
|
||||
/* getting cpu and NIC */
|
||||
/* set to max cpus only if user has not arbitrarily set it to lower # */
|
||||
num_cpus = (CONFIG.num_cores == 0) ? GetNumCPUs() : CONFIG.num_cores;
|
||||
|
|
Loading…
Reference in New Issue