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
8b1c4976
Commit
8b1c4976
authored
Dec 06, 2020
by
Hejing Li
Browse files
Merge branch 'master' of
https://github.com/FreakyPenguin/endhostsim-code
into experiments
parents
a7c99861
b084688c
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
60 additions
and
12 deletions
+60
-12
experiments/modes/experiments.py
experiments/modes/experiments.py
+2
-0
images/packer-wrap.sh
images/packer-wrap.sh
+1
-1
images/scripts/install-mtcp.sh
images/scripts/install-mtcp.sh
+57
-11
No files found.
experiments/modes/experiments.py
View file @
8b1c4976
...
...
@@ -16,6 +16,7 @@ class Experiment(object):
self
.
hosts
=
[]
self
.
nics
=
[]
self
.
networks
=
[]
self
.
metadata
=
{}
def
add_host
(
self
,
sim
):
for
h
in
self
.
hosts
:
...
...
@@ -201,6 +202,7 @@ class ExpEnv(object):
class
ExpOutput
(
object
):
def
__init__
(
self
,
exp
):
self
.
exp_name
=
exp
.
name
self
.
metadata
=
exp
.
metadata
self
.
start_time
=
None
self
.
end_time
=
None
self
.
sims
=
{}
...
...
images/packer-wrap.sh
View file @
8b1c4976
...
...
@@ -3,5 +3,5 @@
qemupath
=
`
pwd
`
/../qemu/
# add our qemu to $PATH
export
PATH
=
"
$qemupath
:
$qemupath
/
x86_64-softmmu
/:
$PATH
"
export
PATH
=
"
$qemupath
:
$qemupath
/
build
/:
$PATH
"
exec
./packer
"
$@
"
images/scripts/install-mtcp.sh
View file @
8b1c4976
...
...
@@ -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