Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ycai
simbricks
Commits
b084688c
Commit
b084688c
authored
Dec 06, 2020
by
Antoine Kaufmann
Browse files
images: compile lighttpd and ab
parent
14db0d3e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
57 additions
and
11 deletions
+57
-11
images/scripts/install-mtcp.sh
images/scripts/install-mtcp.sh
+57
-11
No files found.
images/scripts/install-mtcp.sh
View file @
b084688c
...
...
@@ -2,7 +2,7 @@
set
-eux
apt-get
-y
install
libnuma-dev libgmp-dev bc python
apt-get
-y
install
libnuma-dev libgmp-dev bc python
libpcre3-dev libpcre++-dev zlib1g-dev
cd
/tmp
wget https://ftp.gnu.org/gnu/automake/automake-1.16.2.tar.gz
...
...
@@ -17,6 +17,7 @@ cd /root/mtcp
git submodule init
git submodule update
export
MTCPDIR
=
$PWD
export
RTE_SDK
=
$PWD
/dpdk
export
RTE_TARGET
=
x86_64-native-linuxapp-gcc
...
...
@@ -26,22 +27,67 @@ sed -i -e 's/-Werror//' dpdk/kernel/linux/kni/Makefile
sed
-i
-e
's/-Werror//'
dpdk/kernel/linux/igb_uio/Makefile
sed
-i
-e
's/-Werror//'
dpdk/mk/toolchain/gcc/rte.vars.mk
rm
-rf
dpdk/.git
sed
-i
\
-e
's/CONFIG_RTE_LIBRTE_I40E_DEBUG_RX=n/CONFIG_RTE_LIBRTE_I40E_DEBUG_RX=y/'
\
-e
's/CONFIG_RTE_LIBRTE_I40E_DEBUG_TX=n/CONFIG_RTE_LIBRTE_I40E_DEBUG_TX=y/'
\
-e
's/CONFIG_RTE_LIBRTE_I40E_DEBUG_TX_FREE=n/CONFIG_RTE_LIBRTE_I40E_DEBUG_TX_FREE=y/'
\
-e
's/CONFIG_RTE_LOG_LEVEL=RTE_LOG_INFO/CONFIG_RTE_LOG_LEVEL=RTE_LOG_DEBUG/'
\
dpdk/config/common_base
#
sed -i \
#
-e 's/CONFIG_RTE_LIBRTE_I40E_DEBUG_RX=n/CONFIG_RTE_LIBRTE_I40E_DEBUG_RX=y/' \
#
-e 's/CONFIG_RTE_LIBRTE_I40E_DEBUG_TX=n/CONFIG_RTE_LIBRTE_I40E_DEBUG_TX=y/' \
#
-e 's/CONFIG_RTE_LIBRTE_I40E_DEBUG_TX_FREE=n/CONFIG_RTE_LIBRTE_I40E_DEBUG_TX_FREE=y/' \
#
-e 's/CONFIG_RTE_LOG_LEVEL=RTE_LOG_INFO/CONFIG_RTE_LOG_LEVEL=RTE_LOG_DEBUG/' \
#
dpdk/config/common_base
make
-j4
-C
dpdk
install
T
=
$RTE_TARGET
./configure
--with-dpdk-lib
=
$RTE_SDK
/
$RTE_TARGET
CFLAGS
=
"-DMAX_CPUS=8"
sed
-i
-e
's://#define DEBUG:#define DEBUG:'
\
-e
's/RTE_LOG_EMERG/RTE_LOG_DEBUG/g'
\
dpdk-iface-kmod/dpdk_iface_main.c
(
cd
dpdk-iface-kmod
&&
make
-j4
)
#
sed -i -e 's://#define DEBUG:#define DEBUG:' \
#
-e 's/RTE_LOG_EMERG/RTE_LOG_DEBUG/g' \
#
dpdk-iface-kmod/dpdk_iface_main.c
#
(cd dpdk-iface-kmod && make -j4)
make
-j4
ls
-l
$MTCPDIR
/apps
ln
-s
$MTCPDIR
/apps/lighttpd-1.4.32 apps/lighttpd-mtcp
cp
-r
apps/lighttpd-1.4.32 apps/lighttpd-mtlinux
cp
-r
apps/lighttpd-1.4.32 apps/lighttpd-mtlinux-rop
ls
-l
$MTCPDIR
/apps
# build mtcp version of lighttpd
cd
$MTCPDIR
/apps/lighttpd-mtcp
touch
aclocal.m4 Makefile.in
./configure
--without-bzip2
CFLAGS
=
"-O3"
\
--with-libmtcp
=
"
$MTCPDIR
/mtcp/"
\
--with-libdpdk
=
"
$RTE_SDK
/
$RTE_TARGET
"
make
-j4
cd
$MTCPDIR
/apps/lighttpd-mtlinux
touch
aclocal.m4 Makefile.in
./configure
--without-bzip2
CFLAGS
=
"-O3"
--enable-multithreading
make
-j4
cd
$MTCPDIR
/apps/lighttpd-mtlinux-rop
touch
aclocal.m4 Makefile.in
./configure
--without-bzip2
CFLAGS
=
"-O3 -DREUSEPORT"
--enable-multithreading
make
-j4
cd
$MTCPDIR
ln
-s
$MTCPDIR
/apps/apache_benchmark apps/ab-mtcp
cp
-r
apps/apache_benchmark apps/ab-linux
# build mtcp version of ab
cd
$MTCPDIR
/apps/ab-mtcp
./configure
--with-libmtcp
=
"
$MTCPDIR
/mtcp/"
\
--with-libdpdk
=
"
$RTE_SDK
/
$RTE_TARGET
"
make
-j4
# build linux version of ab
cd
$MTCPDIR
/apps/ab-linux
./configure
make
-j4
# build tas microbenchmarks
git clone https://github.com/tcp-acceleration-service/tas.git /root/tas
(
cd
/root/tas
&&
make lib/utils/rng.o
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment