mtcp/configure.ac

172 lines
5.1 KiB
Plaintext
Raw Permalink Normal View History

# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.69])
AC_INIT([mtcp], [3], [mtcp-user@list.ndsl.kaist.edu])
AC_CONFIG_SRCDIR([mtcp/src/eventpoll.c])
AC_CONFIG_HEADERS([config.h])
# Checks for programs.
AC_PROG_CC
2018-03-20 02:54:09 +03:00
AC_PROG_RANLIB
AC_LANG(C)
AC_DISABLE_OPTION_CHECKING
AC_CHECK_PROG(BC_CHECK,bc,yes)
if test x"$BC_CHECK" != x"yes" ; then
AC_MSG_ERROR([Please install bc before compiling mTCP.])
fi
# Checks for header files.
2018-03-20 02:54:09 +03:00
AC_HEADER_STDC
AC_CHECK_HEADER([linux/sched.h],,AC_MSG_ERROR([Could not find linux/sched.h]))
AC_CHECK_HEADER([pthread.h],,AC_MSG_ERROR([Could not find pthread.h]))
AC_CHECK_HEADER([numa.h],,AC_MSG_ERROR([Could not find numa.h]))
AC_CHECK_HEADER([arpa/inet.h],,AC_MSG_ERROR([Could not find arpa/inet.h]))
AC_CHECK_HEADER([fcntl.h],,AC_MSG_ERROR([Could not find fcntl.h]))
AC_CHECK_HEADER([limits.h],,AC_MSG_ERROR([Could not find limits.h]))
AC_CHECK_HEADER([netdb.h],,AC_MSG_ERROR([netdb.h]))
AC_CHECK_HEADER([netinet/in.h],,AC_MSG_ERROR([Could not find netinet/in.h]))
AC_CHECK_HEADER([stdint.h],,AC_MSG_ERROR([Could not find stdint.h]))
AC_CHECK_HEADER([stdlib.h],,AC_MSG_ERROR([Could not find stdlib.h]))
AC_CHECK_HEADER([string.h],,AC_MSG_ERROR([Could not find string.h]))
AC_CHECK_HEADER([sys/ioctl.h],,AC_MSG_ERROR([Could not find sys/ioctl.h]))
AC_CHECK_HEADER([sys/socket.h],,AC_MSG_ERROR([Could not find sys/socket.h]))
AC_CHECK_HEADER([sys/time.h],,AC_MSG_ERROR([Could not find sys/time.h]))
AC_CHECK_HEADER([unistd.h],,AC_MSG_ERROR([Could not find unistd.h]))
AC_CHECK_HEADER([gmp.h],,AC_MSG_ERROR([Could not find gmp.h]))
# Check for AC_PTHREAD [FC is preventing this to be enabled..]
#AX_PTHREAD( [
# AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.])
# CLIBS="$PTHREAD_LIBS $LIBS"
# CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
# LDFLAGS="$LDFLAGS $PTHREAD_CFLAGS"
# CC="$PTHREAD_CC"],[])
# Checks for typedefs, structures, and compiler characteristics.
AC_C_INLINE
AC_TYPE_INT16_T
AC_TYPE_INT32_T
AC_TYPE_INT64_T
AC_TYPE_INT8_T
AC_TYPE_PID_T
AC_TYPE_SIZE_T
AC_TYPE_SSIZE_T
AC_TYPE_UINT16_T
AC_TYPE_UINT32_T
AC_TYPE_UINT64_T
AC_TYPE_UINT8_T
# Checks for library functions.
AC_FUNC_MALLOC
AC_FUNC_MMAP
AC_CHECK_FUNC([clock_gettime],,AC_MSG_ERROR([librt library is missing]))
AC_CHECK_FUNCS([bzero getpagesize gettimeofday memmove memset munmap select socket strchr strerror strstr strtol],,AC_MSG_ERROR([glibc library is missing]))
# Reset DPDK to 0
AC_SUBST(DPDK, 0)
# Reset enforcement value
AC_SUBST(ENFORCE_RX_IDLE, 0)
AC_SUBST(RX_IDLE_THRESH, 0)
# Reset DPDK's LRO to 0
AC_SUBST(LRO, 0)
# Reset PSIO to 0
AC_SUBST(PSIO, 0)
2018-04-01 17:35:21 +03:00
# Reset ONVM to 0
AC_SUBST(ONVM, 0)
# Reset NETMAP to 0
AC_SUBST(NETMAP, 0)
# Reset HWCSUM to 1
AC_SUBST(HWCSUM, 1)
# Check dpdk-17.08 path (lib & inc)
AC_ARG_WITH(stuff, [ --with-dpdk-lib path to the dpdk-17.08 install root])
if test "$with_dpdk_lib" != ""
then
AC_SUBST(DPDKLIBPATH, $with_dpdk_lib)
AC_SUBST(DPDK, 1)
2018-07-19 18:15:29 +03:00
AC_ARG_WITH(stuff, [ --with-rx-idle[=ARG] how much idle cycles needed before enforcing timeout (dpdk-only)])
if test "$with_rx_idle" != ""
then
AC_SUBST(ENFORCE_RX_IDLE, 1)
AC_SUBST(RX_IDLE_THRESH, $with_rx_idle)
fi
fi
2018-03-20 02:54:09 +03:00
AM_CONDITIONAL([DPDK], [test x$DPDK = x1])
dnl Example of default-disabled feature
AC_ARG_ENABLE([lro],
AS_HELP_STRING([--enable-lro], [Enable dpdk lro (for relevant NICs)]))
if test "$with_dpdk_lib" != ""
then
if test "x$enable_lro" = "xyes"
then
AC_SUBST(LRO, 1)
fi
fi
dnl Example of default-disabled feature
AC_ARG_ENABLE([ccp],
AS_HELP_STRING([--enable-ccp], [Enable Congestion Control Plane (CCP)]))
if test "x$enable_ccp" = "xyes"
then
AC_SUBST(CCP, 1)
fi
dnl Example of default-enabled feature
AC_ARG_ENABLE([hwcsum],
AS_HELP_STRING([--disable-hwcsum], [Disable h/w-based checksum offloading (for relevant NICs)]))
if test "x$enable_hwcsum" = "xno"
then
AC_SUBST(HWCSUM, 0)
fi
# Check psio path (lib & inc)
AC_ARG_WITH(stuff, [ --with-psio-lib path to the ioengine install root])
if test "$with_psio_lib" != ""
then
AC_SUBST(PSLIBPATH, $with_psio_lib)
AC_SUBST(PSIO, 1)
fi
dnl Example of default-disabled feature
AC_ARG_ENABLE([netmap],
AS_HELP_STRING([--enable-netmap], [Enable netmap module]))
AS_IF([test "x$enable_netmap" = "xyes"], [
AC_SUBST(NETMAP, 1)
])
OpenNetVM mTCP Module Code Cleanup (#4) This change updates mTCP from their master branch and cleans up the OpenNetVM module. The ONVM module is reorganized to match the DPDK module. This includes: - Removed the command line arguments for running epserver + This removes the extra arg passing between methods + Moved the ONVM arguments to `epserver.conf` - Added configure options to build mtcp with the ONVM library - Added preprocessor macros to build ONVM specific code on-demand Commit log: * - IP defrag module for dpdk integrated (partly derived from ip_reassembly/ example code). -> Currently disabled... because I need some testing suite that can fragment IP datagrams - Cleaned up the Makefile.in scripts. * - Fixed an ICMP-related bug that was accidentally introduced when hw-chksumming was implemented. - Cleaned up the Makefile.in script - Cleaned up dpdk_module.c file. * - Applied fixes for suspect snippets identified by Coverity. - Added IP_DEFRAG warning. * - More fixes. * Adding coverity badge. - Needs more code fixing :S * - Minor fixes. * - Minor error checks. * - More & more fixes. * - Forgot to check in these files. * - More error checking. * - Added more DPDK-capable Ethernet controllers which makes mOS/mTCP compatible with certain 1/10 Gbps NICs (e.g. X540T1, I211 and many, many others). Ack to Juhyung. - Small coverity related fix. * tcp: handle ack with payload correctly in SYN_RECV state Signed-off-by: Jianbo Liu <jianbo.liu@linaro.org> * uses -m64 for x86_64 only to avoid compile error on other ARCHs Signed-off-by: Jianbo Liu <jianbo.liu@linaro.org> * add a generic ip_fast_csum for non-x86 platform Signed-off-by: Jianbo Liu <jianbo.liu@linaro.org> * - Stats bug that does not appear in kernel version <= 4.1.. but appears in linux-4.4. --> Always, always do copy_from_user() for user-space buffers before accessing them in kernel module. This one was hard to catch! --> Ack to Jaehyong for initially reporting the problem. * - Adding partial support for i40e. --> Still working on mtcp_init_rss() function for i40e. --> Server-side applications should work fine with mTCP. * - Removed redundant printk lines (in igbuio.c). - mtcp_init_rss() for i40e fixed. --> According to xl710 controller data sheet, the secret key should be 52 bytes long --> Intel 10 Gbps nic controllers previously relied on 40 bytes RSK --> See http://www.intel.co.kr/content/dam/www/public/us/en/documents/datasheets/xl710-10-40-controller-datasheet.pdf section 7.1.10.1 for details. - Made the code backward compatible with linux-3.x --> Previous code changes were made in linux-4.4.x - Added logic to unmap the pci address when driver (igb_uio) is deregistered. --> Now igb_uio-registered devices can be re-attached to i40e devices back and forth. * - Resovles issue# 67. * fix the bug in cofiguring mTCP when running ab (issue 124) ref:#124 * reset errno to 0 before calling strtol (resolves issue 128) ref:#128 * - Make sure that even non-TCP packets are uniformly distributed across cores. * Fix unused return value for copy_from_user(). (issue# 132) * add support for configuring discrete ports (resolves issue 125) ref:#125 * make backlog a command option (resolves the issue 136) ref:#136 * - Small update. * - Patch suggested by gchen-viosoft. * - Small patch to make it work for linux-4.2 * - Removed the MAX_CPUS restriction. - Make sure that hyperthreading is disabled before setting up mTCP - igb_uio driver will maintain netdev stats for up to 128 queues. * - Removed a statistics-related bug in epwget.c - Removed a race condition in cleaning up context resources during termination of application. * - Revised MAX_CPUs macro setup. * - Forgot to update README.md file. * - Small optimization related to CPU RSS calculation (rss-side) -> Thanks Ilwoo * - Small fixes (thanks to YoungGyoun Moon) * - Made it compatible with linux kernel versions >= 4.11.0 * - Updating travis configuration file slightly. * - Updating travis configuration file slightly. - Updating Id. * - Small typo in travis file. * - Small update to the tcp sent window logic * - Slight updates to the README/README.md files. * - Resolved issue #51 * Update from eunyoung14/mtcp (#3) * - IP defrag module for dpdk integrated (partly derived from ip_reassembly/ example code). -> Currently disabled... because I need some testing suite that can fragment IP datagrams - Cleaned up the Makefile.in scripts. * - Fixed an ICMP-related bug that was accidentally introduced when hw-chksumming was implemented. - Cleaned up the Makefile.in script - Cleaned up dpdk_module.c file. * - Applied fixes for suspect snippets identified by Coverity. - Added IP_DEFRAG warning. * - More fixes. * Adding coverity badge. - Needs more code fixing :S * - Minor fixes. * - Minor error checks. * - More & more fixes. * - Forgot to check in these files. * - More error checking. * - Added more DPDK-capable Ethernet controllers which makes mOS/mTCP compatible with certain 1/10 Gbps NICs (e.g. X540T1, I211 and many, many others). Ack to Juhyung. - Small coverity related fix. * tcp: handle ack with payload correctly in SYN_RECV state Signed-off-by: Jianbo Liu <jianbo.liu@linaro.org> * uses -m64 for x86_64 only to avoid compile error on other ARCHs Signed-off-by: Jianbo Liu <jianbo.liu@linaro.org> * add a generic ip_fast_csum for non-x86 platform Signed-off-by: Jianbo Liu <jianbo.liu@linaro.org> * - Stats bug that does not appear in kernel version <= 4.1.. but appears in linux-4.4. --> Always, always do copy_from_user() for user-space buffers before accessing them in kernel module. This one was hard to catch! --> Ack to Jaehyong for initially reporting the problem. * - Adding partial support for i40e. --> Still working on mtcp_init_rss() function for i40e. --> Server-side applications should work fine with mTCP. * - Removed redundant printk lines (in igbuio.c). - mtcp_init_rss() for i40e fixed. --> According to xl710 controller data sheet, the secret key should be 52 bytes long --> Intel 10 Gbps nic controllers previously relied on 40 bytes RSK --> See http://www.intel.co.kr/content/dam/www/public/us/en/documents/datasheets/xl710-10-40-controller-datasheet.pdf section 7.1.10.1 for details. - Made the code backward compatible with linux-3.x --> Previous code changes were made in linux-4.4.x - Added logic to unmap the pci address when driver (igb_uio) is deregistered. --> Now igb_uio-registered devices can be re-attached to i40e devices back and forth. * - Resovles issue# 67. * fix the bug in cofiguring mTCP when running ab (issue 124) ref:#124 * reset errno to 0 before calling strtol (resolves issue 128) ref:#128 * - Make sure that even non-TCP packets are uniformly distributed across cores. * Fix unused return value for copy_from_user(). (issue# 132) * add support for configuring discrete ports (resolves issue 125) ref:#125 * make backlog a command option (resolves the issue 136) ref:#136 * - Small update. * - Patch suggested by gchen-viosoft. * - Small patch to make it work for linux-4.2 * - Removed the MAX_CPUS restriction. - Make sure that hyperthreading is disabled before setting up mTCP - igb_uio driver will maintain netdev stats for up to 128 queues. * - Removed a statistics-related bug in epwget.c - Removed a race condition in cleaning up context resources during termination of application. * - Revised MAX_CPUs macro setup. * - Forgot to update README.md file. * - Small optimization related to CPU RSS calculation (rss-side) -> Thanks Ilwoo * - Small fixes (thanks to YoungGyoun Moon) * - Made it compatible with linux kernel versions >= 4.11.0 * - Updating travis configuration file slightly. * - Updating travis configuration file slightly. - Updating Id. * - Small typo in travis file. * - Small update to the tcp sent window logic * - Slight updates to the README/README.md files. * - Resolved issue #51 * onvm-mtcp cleaning * Added a build with onvm config option * Ifdefs for ONVM setup, ENABLE_ONVM flag * Update README.md for ONVM module * Aborting the old changes for a clean merge * README.md updates * README.md updates * Update epserver.conf onvm args explanation * Update epserver.conf * Added routing table rule for onvm-module * Update README * Update README.md
2017-10-24 13:24:55 +03:00
# Check onvm lib path
AC_ARG_WITH(stuff, [ --with-onvm-lib path to the onvm install root])
if test "$with_onvm_lib" != ""
then
2018-03-20 02:54:09 +03:00
AC_SUBST(ONVMLIBPATH, $with_onvm_lib)
OpenNetVM mTCP Module Code Cleanup (#4) This change updates mTCP from their master branch and cleans up the OpenNetVM module. The ONVM module is reorganized to match the DPDK module. This includes: - Removed the command line arguments for running epserver + This removes the extra arg passing between methods + Moved the ONVM arguments to `epserver.conf` - Added configure options to build mtcp with the ONVM library - Added preprocessor macros to build ONVM specific code on-demand Commit log: * - IP defrag module for dpdk integrated (partly derived from ip_reassembly/ example code). -> Currently disabled... because I need some testing suite that can fragment IP datagrams - Cleaned up the Makefile.in scripts. * - Fixed an ICMP-related bug that was accidentally introduced when hw-chksumming was implemented. - Cleaned up the Makefile.in script - Cleaned up dpdk_module.c file. * - Applied fixes for suspect snippets identified by Coverity. - Added IP_DEFRAG warning. * - More fixes. * Adding coverity badge. - Needs more code fixing :S * - Minor fixes. * - Minor error checks. * - More & more fixes. * - Forgot to check in these files. * - More error checking. * - Added more DPDK-capable Ethernet controllers which makes mOS/mTCP compatible with certain 1/10 Gbps NICs (e.g. X540T1, I211 and many, many others). Ack to Juhyung. - Small coverity related fix. * tcp: handle ack with payload correctly in SYN_RECV state Signed-off-by: Jianbo Liu <jianbo.liu@linaro.org> * uses -m64 for x86_64 only to avoid compile error on other ARCHs Signed-off-by: Jianbo Liu <jianbo.liu@linaro.org> * add a generic ip_fast_csum for non-x86 platform Signed-off-by: Jianbo Liu <jianbo.liu@linaro.org> * - Stats bug that does not appear in kernel version <= 4.1.. but appears in linux-4.4. --> Always, always do copy_from_user() for user-space buffers before accessing them in kernel module. This one was hard to catch! --> Ack to Jaehyong for initially reporting the problem. * - Adding partial support for i40e. --> Still working on mtcp_init_rss() function for i40e. --> Server-side applications should work fine with mTCP. * - Removed redundant printk lines (in igbuio.c). - mtcp_init_rss() for i40e fixed. --> According to xl710 controller data sheet, the secret key should be 52 bytes long --> Intel 10 Gbps nic controllers previously relied on 40 bytes RSK --> See http://www.intel.co.kr/content/dam/www/public/us/en/documents/datasheets/xl710-10-40-controller-datasheet.pdf section 7.1.10.1 for details. - Made the code backward compatible with linux-3.x --> Previous code changes were made in linux-4.4.x - Added logic to unmap the pci address when driver (igb_uio) is deregistered. --> Now igb_uio-registered devices can be re-attached to i40e devices back and forth. * - Resovles issue# 67. * fix the bug in cofiguring mTCP when running ab (issue 124) ref:#124 * reset errno to 0 before calling strtol (resolves issue 128) ref:#128 * - Make sure that even non-TCP packets are uniformly distributed across cores. * Fix unused return value for copy_from_user(). (issue# 132) * add support for configuring discrete ports (resolves issue 125) ref:#125 * make backlog a command option (resolves the issue 136) ref:#136 * - Small update. * - Patch suggested by gchen-viosoft. * - Small patch to make it work for linux-4.2 * - Removed the MAX_CPUS restriction. - Make sure that hyperthreading is disabled before setting up mTCP - igb_uio driver will maintain netdev stats for up to 128 queues. * - Removed a statistics-related bug in epwget.c - Removed a race condition in cleaning up context resources during termination of application. * - Revised MAX_CPUs macro setup. * - Forgot to update README.md file. * - Small optimization related to CPU RSS calculation (rss-side) -> Thanks Ilwoo * - Small fixes (thanks to YoungGyoun Moon) * - Made it compatible with linux kernel versions >= 4.11.0 * - Updating travis configuration file slightly. * - Updating travis configuration file slightly. - Updating Id. * - Small typo in travis file. * - Small update to the tcp sent window logic * - Slight updates to the README/README.md files. * - Resolved issue #51 * Update from eunyoung14/mtcp (#3) * - IP defrag module for dpdk integrated (partly derived from ip_reassembly/ example code). -> Currently disabled... because I need some testing suite that can fragment IP datagrams - Cleaned up the Makefile.in scripts. * - Fixed an ICMP-related bug that was accidentally introduced when hw-chksumming was implemented. - Cleaned up the Makefile.in script - Cleaned up dpdk_module.c file. * - Applied fixes for suspect snippets identified by Coverity. - Added IP_DEFRAG warning. * - More fixes. * Adding coverity badge. - Needs more code fixing :S * - Minor fixes. * - Minor error checks. * - More & more fixes. * - Forgot to check in these files. * - More error checking. * - Added more DPDK-capable Ethernet controllers which makes mOS/mTCP compatible with certain 1/10 Gbps NICs (e.g. X540T1, I211 and many, many others). Ack to Juhyung. - Small coverity related fix. * tcp: handle ack with payload correctly in SYN_RECV state Signed-off-by: Jianbo Liu <jianbo.liu@linaro.org> * uses -m64 for x86_64 only to avoid compile error on other ARCHs Signed-off-by: Jianbo Liu <jianbo.liu@linaro.org> * add a generic ip_fast_csum for non-x86 platform Signed-off-by: Jianbo Liu <jianbo.liu@linaro.org> * - Stats bug that does not appear in kernel version <= 4.1.. but appears in linux-4.4. --> Always, always do copy_from_user() for user-space buffers before accessing them in kernel module. This one was hard to catch! --> Ack to Jaehyong for initially reporting the problem. * - Adding partial support for i40e. --> Still working on mtcp_init_rss() function for i40e. --> Server-side applications should work fine with mTCP. * - Removed redundant printk lines (in igbuio.c). - mtcp_init_rss() for i40e fixed. --> According to xl710 controller data sheet, the secret key should be 52 bytes long --> Intel 10 Gbps nic controllers previously relied on 40 bytes RSK --> See http://www.intel.co.kr/content/dam/www/public/us/en/documents/datasheets/xl710-10-40-controller-datasheet.pdf section 7.1.10.1 for details. - Made the code backward compatible with linux-3.x --> Previous code changes were made in linux-4.4.x - Added logic to unmap the pci address when driver (igb_uio) is deregistered. --> Now igb_uio-registered devices can be re-attached to i40e devices back and forth. * - Resovles issue# 67. * fix the bug in cofiguring mTCP when running ab (issue 124) ref:#124 * reset errno to 0 before calling strtol (resolves issue 128) ref:#128 * - Make sure that even non-TCP packets are uniformly distributed across cores. * Fix unused return value for copy_from_user(). (issue# 132) * add support for configuring discrete ports (resolves issue 125) ref:#125 * make backlog a command option (resolves the issue 136) ref:#136 * - Small update. * - Patch suggested by gchen-viosoft. * - Small patch to make it work for linux-4.2 * - Removed the MAX_CPUS restriction. - Make sure that hyperthreading is disabled before setting up mTCP - igb_uio driver will maintain netdev stats for up to 128 queues. * - Removed a statistics-related bug in epwget.c - Removed a race condition in cleaning up context resources during termination of application. * - Revised MAX_CPUs macro setup. * - Forgot to update README.md file. * - Small optimization related to CPU RSS calculation (rss-side) -> Thanks Ilwoo * - Small fixes (thanks to YoungGyoun Moon) * - Made it compatible with linux kernel versions >= 4.11.0 * - Updating travis configuration file slightly. * - Updating travis configuration file slightly. - Updating Id. * - Small typo in travis file. * - Small update to the tcp sent window logic * - Slight updates to the README/README.md files. * - Resolved issue #51 * onvm-mtcp cleaning * Added a build with onvm config option * Ifdefs for ONVM setup, ENABLE_ONVM flag * Update README.md for ONVM module * Aborting the old changes for a clean merge * README.md updates * README.md updates * Update epserver.conf onvm args explanation * Update epserver.conf * Added routing table rule for onvm-module * Update README * Update README.md
2017-10-24 13:24:55 +03:00
AC_SUBST(ONVM, 1)
fi
if test "$with_psio_lib" == "" && test "$with_dpdk_lib" == "" && test "$enable_netmap" = ""
then
AC_MSG_ERROR([Packet I/O library is missing. Please set either dpdk or psio or netmap as your I/O lib.])
fi
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
2019-03-12 23:34:36 +03:00
AM_INIT_AUTOMAKE(mtcp, 3)
AC_CONFIG_FILES([Makefile])
AC_OUTPUT(mtcp/src/Makefile)
AC_OUTPUT(apps/example/Makefile)
AC_OUTPUT(apps/perf/Makefile)
AC_OUTPUT(util/Makefile)
AC_OUTPUT(io_engine/lib/Makefile)
bash ./.check_hyperthreading.sh