diff --git a/.github/buildomat/jobs/image.sh b/.github/buildomat/jobs/image.sh index 02d128c..2245d58 100755 --- a/.github/buildomat/jobs/image.sh +++ b/.github/buildomat/jobs/image.sh @@ -101,7 +101,7 @@ pfexec chown "$UID" /out banner "P4 Codegen" # Add gcc-12 so the p4 compiler can find cpp -PATH=/opt/gcc-12/bin:$PATH cargo xtask codegen --stages $TOFINO_STAGES +PATH=/opt/gcc-12/bin:$PATH cargo xtask codegen --stages $TOFINO_STAGES --multicast # Preserve all the diagnostics spit out by the compiler mkdir -p /out/p4c-diags diff --git a/.github/buildomat/jobs/multicast-test.sh b/.github/buildomat/jobs/multicast-test.sh deleted file mode 100755 index a6e1669..0000000 --- a/.github/buildomat/jobs/multicast-test.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/bash -#: -#: name = "multicast-test" -#: variety = "basic" -#: target = "ubuntu-22.04" -#: rust_toolchain = true -#: -#: output_rules = [ -#: "/work/simulator.log", -#: "/work/dpd.log", -#: ] -#: - -#### >>>>>>>>>>>>>>>>>>>>>>>>>>>> Local Usage >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> -#### -#### The following environment variables are useful. -#### -#### - JUST_TEST=1 Just runs the tests, skipping system prep. -#### - TESTNAME='$name' Will just run the specified test. -#### - STARTUP_TIMEOUT=n Seconds to wait for tofino-model/dpd to start. -#### Defaults to 15. -#### - NOBUILD=1 Don't build sidecar.p4 (in case you've already -#### built it) -#### -#### <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< - -export RUST_BACKTRACE=1 - -set -o errexit -set -o pipefail -set -o xtrace - -export MULTICAST=1 -source .github/buildomat/packet-test-common.sh diff --git a/.github/buildomat/packet-test-common.sh b/.github/buildomat/packet-test-common.sh index e8d81cd..06bd5ee 100755 --- a/.github/buildomat/packet-test-common.sh +++ b/.github/buildomat/packet-test-common.sh @@ -8,16 +8,11 @@ export WS=$wd MODEL_STARTUP_TIMEOUT=${MODEL_STARTUP_TIMEOUT:=5} STARTUP_TIMEOUT=${STARTUP_TIMEOUT:=120} -if [ x$MULTICAST == x ]; then - BUILD_FEATURES=tofino_asic - CODEGEN_FEATURES= - SWADM_FEATURES= - else - BUILD_FEATURES=tofino_asic,multicast - CODEGEN_FEATURES=--multicast - SWADM_FEATURES=--features=multicast -fi - +BUILD_FEATURES=tofino_asic + +CODEGEN_FEATURES=--multicast +SWADM_FEATURES="--features=multicast" + function cleanup { set +o errexit set +o pipefail diff --git a/aal/Cargo.toml b/aal/Cargo.toml index c2efa3d..f5c6f62 100644 --- a/aal/Cargo.toml +++ b/aal/Cargo.toml @@ -4,6 +4,7 @@ version = "0.1.0" edition = "2024" [features] +default = ["multicast"] multicast = [] [dependencies] diff --git a/asic/Cargo.toml b/asic/Cargo.toml index 39dc3cb..a77f935 100644 --- a/asic/Cargo.toml +++ b/asic/Cargo.toml @@ -4,6 +4,7 @@ version = "0.1.0" edition = "2024" [features] +default = ["multicast"] tofino_asic = [ "dep:lazy_static", "dep:transceiver-controller", diff --git a/dpd-client/Cargo.toml b/dpd-client/Cargo.toml index 7998da4..e2b2666 100644 --- a/dpd-client/Cargo.toml +++ b/dpd-client/Cargo.toml @@ -5,6 +5,7 @@ edition = "2024" description = "Client library for the Dendrite data plane daemon" [features] +default = ["multicast"] multicast = ["asic/multicast"] chaos = ["asic/chaos"] tofino_asic = ["asic/tofino_asic"] diff --git a/dpd/Cargo.toml b/dpd/Cargo.toml index 59d6586..7bd1775 100644 --- a/dpd/Cargo.toml +++ b/dpd/Cargo.toml @@ -5,6 +5,7 @@ authors = ["nils "] edition = "2024" [features] +default = ["multicast"] multicast = ["aal/multicast", "asic/multicast"] tofino_asic = ["asic/tofino_asic"] tofino_stub = ["asic/tofino_stub"] diff --git a/dpd/src/mcast/mod.rs b/dpd/src/mcast/mod.rs index 5a68541..3ac3233 100644 --- a/dpd/src/mcast/mod.rs +++ b/dpd/src/mcast/mod.rs @@ -2393,15 +2393,16 @@ mod tests { None ); - // Vec with only Exact sources stays as-is + // Vec with only Exact sources is deduplicated and sorted let exact_sources = vec![ IpSrc::Exact(IpAddr::V4(Ipv4Addr::new(192, 168, 1, 1))), IpSrc::Exact(IpAddr::V4(Ipv4Addr::new(10, 0, 0, 1))), ]; - assert_eq!( - canonicalize_sources(Some(exact_sources.clone())), - Some(exact_sources) - ); + let expected = vec![ + IpSrc::Exact(IpAddr::V4(Ipv4Addr::new(10, 0, 0, 1))), + IpSrc::Exact(IpAddr::V4(Ipv4Addr::new(192, 168, 1, 1))), + ]; + assert_eq!(canonicalize_sources(Some(exact_sources)), Some(expected)); // Single Exact source stays as-is let single_exact = vec![IpSrc::Exact(IpAddr::V6(Ipv6Addr::new( diff --git a/swadm/Cargo.toml b/swadm/Cargo.toml index 9c88e02..e2a6956 100644 --- a/swadm/Cargo.toml +++ b/swadm/Cargo.toml @@ -6,6 +6,7 @@ authors = ["nils "] edition = "2024" [features] +default = ["multicast"] multicast = [] [dependencies]