added ECMP exercise for May 2016 P4 workshop
This commit is contained in:
13
SIGCOMM_2015/.gitignore
vendored
13
SIGCOMM_2015/.gitignore
vendored
@@ -1,13 +0,0 @@
|
||||
# Python byte code
|
||||
*.pyc
|
||||
|
||||
# Emacs
|
||||
*~
|
||||
|
||||
# Compiled JSON
|
||||
*.json
|
||||
|
||||
*.pcap
|
||||
|
||||
# Extracted solutions
|
||||
solution/
|
||||
@@ -80,9 +80,9 @@ like this:
|
||||
|
||||
You need to tell us where you cloned the `bmv2` and `p4c-bm` repositories
|
||||
:). Please update the values of the shell variables `BMV2_PATH` and
|
||||
`P4C_BM_PATH` in the `env.sh` file - located in this directory. Note that if you
|
||||
cloned both repositories in the same directory as this one (`tutorials`), you
|
||||
will not need to change the value of the variables.
|
||||
`P4C_BM_PATH` in the `env.sh` file - located in the root directory of this
|
||||
repository. Note that if you cloned both repositories in the same directory as
|
||||
this one (`tutorials`), you will not need to change the value of the variables.
|
||||
|
||||
That's all :)
|
||||
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
THIS_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
|
||||
|
||||
# ---------------- EDIT THIS ------------------
|
||||
BMV2_PATH=$THIS_DIR/../../bmv2
|
||||
# e.g. BMV2_PATH=$THIS_DIR/../bmv2
|
||||
P4C_BM_PATH=$THIS_DIR/../../p4c-bmv2
|
||||
# e.g P4C_BM_PATH=$THIS_DIR/../p4c-bm
|
||||
# ---------------- END ------------------
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
THIS_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
|
||||
|
||||
source $THIS_DIR/../env.sh
|
||||
source $THIS_DIR/../../env.sh
|
||||
|
||||
P4C_BM_SCRIPT=$P4C_BM_PATH/p4c_bm/__main__.py
|
||||
|
||||
@@ -30,8 +30,9 @@ CLI_PATH=$BMV2_PATH/tools/runtime_CLI.py
|
||||
# process back in the foreground
|
||||
set -m
|
||||
$P4C_BM_SCRIPT p4src/simple_router.p4 --json simple_router.json
|
||||
sudo echo "sudo" > /dev/null
|
||||
sudo $BMV2_PATH/targets/simple_switch/simple_switch simple_router.json \
|
||||
# This gets root permissions, and gives libtool the opportunity to "warm-up"
|
||||
sudo $SWITCH_PATH >/dev/null 2>&1
|
||||
sudo $SWITCH_PATH simple_router.json \
|
||||
-i 0@veth0 -i 1@veth2 -i 2@veth4 -i 3@veth6 -i 4@veth8 \
|
||||
--nanolog ipc:///tmp/bm-0-log.ipc \
|
||||
--pcap &
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
THIS_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
|
||||
|
||||
source $THIS_DIR/../env.sh
|
||||
source $THIS_DIR/../../env.sh
|
||||
|
||||
P4C_BM_SCRIPT=$P4C_BM_PATH/p4c_bm/__main__.py
|
||||
|
||||
@@ -25,7 +25,9 @@ SWITCH_PATH=$BMV2_PATH/targets/simple_switch/simple_switch
|
||||
CLI_PATH=$BMV2_PATH/tools/runtime_CLI.py
|
||||
|
||||
$P4C_BM_SCRIPT p4src/source_routing.p4 --json source_routing.json
|
||||
# This gives libtool the opportunity to "warm-up"
|
||||
sudo $SWITCH_PATH >/dev/null 2>&1
|
||||
sudo PYTHONPATH=$PYTHONPATH:$BMV2_PATH/mininet/ python topo.py \
|
||||
--behavioral-exe $BMV2_PATH/targets/simple_switch/simple_switch \
|
||||
--behavioral-exe $SWITCH_PATH \
|
||||
--json source_routing.json \
|
||||
--cli $CLI_PATH
|
||||
|
||||
Reference in New Issue
Block a user