-
Notifications
You must be signed in to change notification settings - Fork 1
/
run_manifests.sh
executable file
·47 lines (35 loc) · 1.04 KB
/
run_manifests.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/bin/bash
sudo killall l2fwd
set -m
set -e
get_manifest_file_name(){
base_name=$(basename -- $1)
extension=${base_name##*.}
echo ${base_name%.$extension}
}
manifests_file=$1
num_manifests=$(python get_num_manifests.py $1)
me=54
manifests_file_name="$(get_manifest_file_name $manifests_file)"
sketch_dir=$2
mkdir -p "runs/${manifests_file_name}"
for i in $(seq 1 $num_manifests); do
echo "Implementing manifest number $i"
python implement_manifest.py $1 $i $2
touch $sketch_dir/main.p4
echo "Building manifest number $i"
./build.sh $sketch_dir $me
./load.sh $sketch_dir
sudo /users/anup/Netmon/netronome-agilio/dpdk-receiver/build/app/l2fwd \
-c 0x5555 \
-w 0000:05:08.0 -w 0000:05:08.1 -w 0000:05:08.2 -w 0000:05:08.3 \
--socket-mem "256,256" --log-level=8 -- -p 0xF \
> "runs/${manifests_file_name}/${manifests_file_name}_${i}.log" 2>&1 &
pid=$!
echo "Running dpdk-receiver with pid: $pid"
sleep 40
sudo kill $pid
# sudo killall l2fwd
done
set +m
set +e