File tree Expand file tree Collapse file tree 15 files changed +17
-32
lines changed
Expand file tree Collapse file tree 15 files changed +17
-32
lines changed Original file line number Diff line number Diff line change 11#! /bin/bash
22
3- # The tofino2 has 20 stages. Base sidecar.p4 needs 15 stages, and with
4- # multicast support it needs 18. Specifying the number of stages isn't strictly
5- # necessary, but it allows us to track when we exceed the current ceiling.
6- # The underlying intention is to grow deliberately and thoughtfully, given the
7- # limited space on the ASIC.
8- if [[ " ${BUILD_FEATURES:- } " == * " multicast" * ]]; then
9- TOFINO_STAGES=18
10- else
11- TOFINO_STAGES=15
12- fi
3+ # The tofino2 has 20 stages. With multicast as a default feature, sidecar.p4
4+ # needs 18 stages. Specifying the number of stages isn't strictly necessary,
5+ # but it allows us to track when we exceed the current ceiling. The underlying
6+ # intention is to grow deliberately and thoughtfully, given the limited space
7+ # on the ASIC.
8+ TOFINO_STAGES=18
139
1410# These describe which version of the SDE to download and where to find it
1511SDE_COMMIT=e61fe02c3c1c384b2e212c90177fcea76a31fd4e
Original file line number Diff line number Diff line change 22banner " sde setup"
33
44export PKG=tofino_sde.p5p
5- curl -OL $SDE_DIR /$PKG
6- SDE_CALC=` digest -a sha256 $PKG `
7- if [ $SDE_CALC != $SDE_PKG_SHA256 ]; then
8- echo " downloaded tofino_sde has a bad checksum"
9- exit 1
10- fi
11- pfexec pkg install -g $PKG tofino_sde
125
136export SDE=/opt/oxide/tofino_sde
147export LD_LIBRARY_PATH=" $SDE /lib:$LD_LIBRARY_PATH "
158
169# Install a couple of non-standard packages needed to build dendrite
1710banner " packages"
18- pfexec pkg install clang-15 pcap
19- pfexec pkg set-mediator -V 15 clang llvm
2011
2112cargo --version
2213rustc --version
Original file line number Diff line number Diff line change @@ -101,7 +101,7 @@ pfexec chown "$UID" /out
101101
102102banner " P4 Codegen"
103103# Add gcc-12 so the p4 compiler can find cpp
104- PATH=/opt/gcc-12/bin:$PATH cargo xtask codegen --stages $TOFINO_STAGES
104+ PATH=/opt/gcc-12/bin:$PATH cargo xtask codegen --stages $TOFINO_STAGES --multicast
105105
106106# Preserve all the diagnostics spit out by the compiler
107107mkdir -p /out/p4c-diags
Original file line number Diff line number Diff line change @@ -30,5 +30,4 @@ set -o errexit
3030set -o pipefail
3131set -o xtrace
3232
33- export MULTICAST=1
3433source .github/buildomat/packet-test-common.sh
Original file line number Diff line number Diff line change @@ -8,17 +8,11 @@ export WS=$wd
88MODEL_STARTUP_TIMEOUT=${MODEL_STARTUP_TIMEOUT:= 5}
99STARTUP_TIMEOUT=${STARTUP_TIMEOUT:= 120}
1010
11- if [[ -z " $MULTICAST " ]]; then
12- BUILD_FEATURES=tofino_asic
13- CODEGEN_FEATURES=
14- SWADM_FEATURES=
15- TOFINO_STAGES=15
16- else
17- BUILD_FEATURES=tofino_asic,multicast
18- CODEGEN_FEATURES=--multicast
19- SWADM_FEATURES=--features=multicast
20- TOFINO_STAGES=18
21- fi
11+ BUILD_FEATURES=tofino_asic
12+ TOFINO_STAGES=18
13+
14+ CODEGEN_FEATURES=--multicast
15+ SWADM_FEATURES=" --features=multicast"
2216
2317function cleanup {
2418 set +o errexit
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ version = "0.1.0"
44edition = " 2024"
55
66[features ]
7+ default = [" multicast" ]
78multicast = []
89
910[dependencies ]
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ version = "0.1.0"
44edition = " 2024"
55
66[features ]
7+ default = [" multicast" ]
78tofino_asic = [
89 " dep:lazy_static" ,
910 " dep:transceiver-controller" ,
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ edition = "2024"
55description = " Client library for the Dendrite data plane daemon"
66
77[features ]
8+ default = [" multicast" ]
89multicast = [" asic/multicast" ]
910chaos = [" asic/chaos" ]
1011tofino_asic = [" asic/tofino_asic" ]
You can’t perform that action at this time.
0 commit comments