Commit 7b6d2857 authored by NILANJAN DAW's avatar NILANJAN DAW

MTCP codebase added

parent 3a2d9462
####
DPDK
#####
COMPILE
vim dpdk/config/common_linuxapp
#@rinku ADD FOLL
CONFIG_RTE_LIBRTE_MLX5_PMD=y
In case of numa.h not found error
sudo apt-get install libnuma-dev
RUN
ubuntu@linux:~/dpdk-stable-19.11.8/arm64-bluefield-linuxapp-gcc/build/app/test-pmd$
sudo ./testpmd -w 03:00.1 -- -i -a
OR
sudo ./testpmd -- -i -a
sudo ./testpmd -- --nb-cores=2 -i
testpmd> set fwd txonly
testpmd> port start 0
testpmd> port start 1
testpmd> set eth-peer 0 0c:42:a1:df:ac:41
testpmd> set eth-peer 1 0c:42:a1:df:ac:40
testpmd> start
testpmd> show port stats all
################
MTCP
IRON OUT CODE ISSUES
ubuntu@linux:~/dpdk-stable-19.11.8/arm64-bluefield-linuxapp-gcc/build/app/test-pmd$ sudo ./testpmd -w 03:00.1 -- -i -a
ubuntu@linux:~/mtcp-devel$ sudo ./setup_mtcp_dpdk_env.sh /home/ubuntu/dpdk-stable-19.11.8
export RTE_SDK=/home/ubuntu/dpdk-stable-19.11.8
export RTE_TARGET=arm64-bluefield-linuxapp-gcc
wget https://github.com/mtcp-stack/mtcp/archive/refs/heads/devel.zip
core.c: In function ‘mtcp_create_context’:
core.c:1332:4: error: ‘lcore_config’ undeclared (first use in this function)
1332 | lcore_config[master].ret = 0;
ubuntu@linux:~/mtcp-devel$ vim mtcp/src/core.c
if (master == whichCoreID(cpu)) {
//@rinku
//lcore_config[master].ret = 0;
//lcore_config[master].state = FINISHED;
/usr/include/aarch64-linux-gnu/bits/string_fortified.h:106:10: error: ‘__builtin_strncpy’ output may be truncated copying 1023 bytes from a string of length 1023 [-Werror=stringop-truncation]
106 | return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
ubuntu@linux:~/mtcp-devel$ vim mtcp/src/config.c
//@rinku
//strncpy(optstr, line, MAX_OPTLINE_LEN - 1);
memcpy(optstr, line, MAX_OPTLINE_LEN - 1);
ubuntu@linux:~/mtcp-devel$ vim mtcp/src/io_module.c
Comment the funct code for “probe_all_rte_devices” ; add return -1
COMPILE
export RTE_SDK=/home/ubuntu/dpdk-stable-19.11.8
export RTE_TARGET=arm64-bluefield-linuxapp-gcc
ubuntu@linux:~/mtcp-devel$ ./setup_mtcp_dpdk_env.sh [<path to $RTE_SDK>]
export RTE_SDK=/home/ubuntu/dpdk-stable-19.11.8
export RTE_TARGET=arm64-bluefield-linuxapp-gcc
ubuntu@linux:~/mtcp-devel$./configure --with-dpdk-lib=$RTE_SDK/$RTE_TARGET CFLAGS="-DMAX_CPUS=8" //Specify the max cpus which will run MTCP; use --disable-hwcsum when working in virtualized environment
ubuntu@linux:~/mtcp-devel$ make
configure: error: Could not find gmp.h
SOLUTION: sudo apt-get install libgmp-dev
Check the configurations in apps/example
epserver.conf for server-side configuration
epwget.conf for client-side configuration
Configure ~/mtcp-devel/apps/example/config/arp.conf
Configure ~/mtcp-devel/apps/example/config/route.conf
######
RUN THE MTCP APP
export RTE_SDK=/home/ubuntu/dpdk-stable-19.11.8
export RTE_TARGET=arm64-bluefield-linuxapp-gcc
sudo ./epserver -p /home/ubuntu/www -f epserver.conf
sudo ./epwget 192.168.220.35/example.txt 10000000 -N 8 -c 10000 -f epwget.conf
#######
REVERT BACK MTCP NIC CHANGES
./setup_linux_env.sh [<path to $RTE_SDK>]
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment