- Revised MAX_CPUs macro setup.
parent
78586573d8
commit
e7a8b2a540
11
README
11
README
|
@ -78,6 +78,11 @@ mTCP can be prepared in two ways.
|
|||
# ./configure --with-psio-lib=<$path_to_ioengine>
|
||||
## e.g. ./configure --with-psio-lib=`echo $PWD`/io_engine
|
||||
# make
|
||||
- By default, mTCP assumes that there are 16 CPUs in your system.
|
||||
You can set the CPU limit, e.g. on a 32-core system, by using the following command:
|
||||
# ./configure --with-psio-lib=`echo $PWD`/io_engine CFLAGS="-DMAX_CPUS=32"
|
||||
Please note that your NIC should support RSS queues equal to the MAX_CPUS value
|
||||
(since mTCP expects a one-to-one RSS queue to CPU binding).
|
||||
- In case `./configure' script prints an error, run the
|
||||
following command; and then re-do step-3 (configure again):
|
||||
# autoreconf -ivf
|
||||
|
@ -137,6 +142,11 @@ mTCP can be prepared in two ways.
|
|||
## And not dpdk-16.11!
|
||||
## e.g. ./configure --with-dpdk-lib=`echo $PWD`/dpdk
|
||||
# make
|
||||
- By default, mTCP assumes that there are 16 CPUs in your system.
|
||||
You can set the CPU limit, e.g. on a 32-core system, by using the following command:
|
||||
# ./configure --with-dpdk-lib=$<path_to_mtcp_release_v3>/dpdk CFLAGS="-DMAX_CPUS=32"
|
||||
Please note that your NIC should support RSS queues equal to the MAX_CPUS value
|
||||
(since mTCP expects a one-to-one RSS queue to CPU binding).
|
||||
- In case `./configure' script prints an error, run the
|
||||
following command; and then re-do step-4 (configure again):
|
||||
# autoreconf -ivf
|
||||
|
@ -203,6 +213,7 @@ We tested the DPDK version (polling driver) with Linux-3.13.0 kernel.
|
|||
1. Intel-82598 ixgbe (Max-queue-limit: 16)
|
||||
2. Intel-82599 ixgbe (Max-queue-limit: 16)
|
||||
3. Intel-I350 igb (Max-queue-limit: 08)
|
||||
4. Intel-X710 i40e (Max-queue-limit: ~)
|
||||
|
||||
========================================================================
|
||||
FREQUENTLY ASKED QUESTIONS
|
||||
|
|
|
@ -59,6 +59,11 @@
|
|||
2. Setup mtcp library:
|
||||
# ./configure --enable-netmap
|
||||
# make
|
||||
- By default, mTCP assumes that there are 16 CPUs in your system.
|
||||
You can set the CPU limit, e.g. on a 32-core system, by using the following command:
|
||||
# ./configure --enable-netmap CFLAGS="-DMAX_CPUS=32"
|
||||
Please note that your NIC should support RSS queues equal to the MAX_CPUS value
|
||||
(since mTCP expects a one-to-one RSS queue to CPU binding).
|
||||
- In case `./configure' script prints an error, run the
|
||||
following command; and then re-do step-2 (configure again):
|
||||
# autoreconf -ivf
|
||||
|
|
|
@ -5,6 +5,7 @@ CC=@CC@ -g -O3 -Wall -Werror -fgnu89-inline
|
|||
DPDK=@DPDK@
|
||||
PS=@PSIO@
|
||||
NETMAP=@NETMAP@
|
||||
CFLAGS=@CFLAGS@
|
||||
|
||||
# DPDK LIBRARY and HEADER
|
||||
DPDK_INC=@DPDKLIBPATH@/include
|
||||
|
@ -34,8 +35,6 @@ ifeq ($(NETMAP),1)
|
|||
LIBS += -lmtcp -lpthread -lnuma -lrt
|
||||
endif
|
||||
|
||||
INC += -DMAX_CPUS=$(shell cat /proc/cpuinfo | grep processor | wc -l)
|
||||
|
||||
# CFLAGS for DPDK-related compilation
|
||||
INC += ${MTCP_INC}
|
||||
ifeq ($(DPDK),1)
|
||||
|
|
|
@ -53,6 +53,9 @@
|
|||
|
||||
#define HT_SUPPORT FALSE
|
||||
|
||||
#ifndef MAX_CPUS
|
||||
#define MAX_CPUS 16
|
||||
#endif
|
||||
/*----------------------------------------------------------------------------*/
|
||||
struct file_cache
|
||||
{
|
||||
|
|
|
@ -52,6 +52,9 @@
|
|||
#define ERROR (-1)
|
||||
#endif
|
||||
|
||||
#ifndef MAX_CPUS
|
||||
#define MAX_CPUS 16
|
||||
#endif
|
||||
/*----------------------------------------------------------------------------*/
|
||||
static pthread_t app_thread[MAX_CPUS];
|
||||
static mctx_t g_mctx[MAX_CPUS];
|
||||
|
|
|
@ -29,10 +29,12 @@ GCC_OPT += -Wall -fPIC -fgnu89-inline -Werror
|
|||
#DBG_OPT += -DPKTDUMP
|
||||
#DBG_OPT += -DDUMP_STREAM
|
||||
#GCC_OPT += -g -DNETSTAT -DINFO -DDBGERR -DDBGCERR
|
||||
GCC_OPT += -DNDEBUG -O3 -DNETSTAT -DINFO -DDBGERR -DDBGCERR
|
||||
GCC_OPT += -DNDEBUG -g -O3 -DNETSTAT -DINFO -DDBGERR -DDBGCERR
|
||||
#GCC_OPT += -DNDEBUG -g -DNETSTAT -DINFO -DDBGERR -DDBGCERR
|
||||
GCC_OPT += $(DBG_OPT)
|
||||
|
||||
CFLAGS=@CFLAGS@
|
||||
|
||||
ifeq ($(LRO),1)
|
||||
GCC_OPT += -DENABLELRO
|
||||
endif
|
||||
|
@ -57,8 +59,6 @@ else
|
|||
INC += -DDISABLE_NETMAP
|
||||
endif
|
||||
|
||||
INC += -DMAX_CPUS=$(shell cat /proc/cpuinfo | grep processor | wc -l)
|
||||
|
||||
# PacketShader LIBRARY and HEADER
|
||||
PS_DIR=../../io_engine
|
||||
INC += -I$(PS_DIR)/include
|
||||
|
@ -106,7 +106,7 @@ default: $(OBJS) $(MTCP_HDR)
|
|||
|
||||
$(OBJS): %.o: %.c Makefile
|
||||
$(MSG) " CC $<"
|
||||
$(HIDE) $(GCC) $(GCC_OPT) $(INC) -c $< -o $@
|
||||
$(HIDE) $(GCC) $(CFLAGS) $(GCC_OPT) $(INC) -c $< -o $@
|
||||
$(DEPS): .%.d: %.c Makefile
|
||||
$(HIDE) $(GCC) $(GCC_OPT) $(INC) -MM $(CFLAGS) $< > $@
|
||||
|
||||
|
|
|
@ -1427,8 +1427,8 @@ mtcp_init(const char *config_file)
|
|||
|
||||
if (num_cpus > MAX_CPUS) {
|
||||
TRACE_ERROR("You cannot run mTCP with more than %d cores due "
|
||||
"to NIC hardware queues restriction. Please disable "
|
||||
"the last %d cores in your system\n",
|
||||
"to your static mTCP configuration. Please disable "
|
||||
"the last %d cores in your system.\n",
|
||||
MAX_CPUS, num_cpus - MAX_CPUS);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
|
|
@ -53,6 +53,9 @@
|
|||
/* blocking api became obsolete */
|
||||
#define BLOCKING_SUPPORT FALSE
|
||||
|
||||
#ifndef MAX_CPUS
|
||||
#define MAX_CPUS 16
|
||||
#endif
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Statistics */
|
||||
#ifdef NETSTAT
|
||||
|
|
Loading…
Reference in New Issue