Skip to content

Commit 88d6b41

Browse files
[mcast] merge main + handle stage changes associated + cleanup
Multicast pipeline costs one extra ingress stage over base for mcast (19 vs 18), documented in buildomat job. Multicast pipeline costs one extra ingress stage over base for mcast (19 vs 18), while non-mcast is now at 17 (vs 16 before the LPM change on main). Includes: * Merges origin/main, picking up the RFD 619 dpd-api refactor (#259). * v6 unicast TTL=1 handling via per-prefix skip_ttl bit + inline check (saves a stage vs the v4-style compound TTL key). Service-port routes skip the TTL exception so userspace still receives the packet. This helped after the table-sizing changes on main (and making MCAST align). * Lots of misc cleanup
2 parents 808e4dd + 85d6fc9 commit 88d6b41

122 files changed

Lines changed: 4857 additions & 3740 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/buildomat/common.sh‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
#!/bin/bash
22

3-
# The tofino2 has 20 stages. The base sidecar.p4 needs 15 stages, and with
4-
# multicast enabled it needs 18. Specifying the number of stages isn't
3+
# The tofino2 has 20 stages. The base sidecar.p4 needs 16 stages, and with
4+
# multicast enabled it needs 19. Specifying the number of stages isn't
55
# strictly necessary, but it allows us to track when we exceed the current
66
# ceiling. The underlying intention is to grow deliberately and thoughtfully,
77
# given the limited space on the ASIC.
8-
TOFINO_STAGES=15
8+
TOFINO_STAGES=16
99

1010
# These describe which version of the SDE to download and where to find it
1111
SDE_COMMIT=2a6b33211c9675996dcb99fe939045506667ae94

‎.github/buildomat/packet-test-common.sh‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ if [ x$MULTICAST == x ]; then
1919
fi
2020

2121
if [ x$MULTICAST == x ]; then
22-
TOFINO_STAGES=15
22+
TOFINO_STAGES=16
2323
else
24-
TOFINO_STAGES=18
24+
TOFINO_STAGES=19
2525
fi
2626

2727
function cleanup {

‎Cargo.lock‎

Lines changed: 15 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎Cargo.toml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ members = [
99
"dpd-api",
1010
"dpd-client",
1111
"dpd-types",
12+
"dpd-types/versions",
1213
"dropshot-apis",
1314
"packet",
1415
"pcap",
@@ -35,6 +36,7 @@ asic = { path = "asic" }
3536
dpd-api = { path = "dpd-api" }
3637
dpd-client = { path = "dpd-client" }
3738
dpd-types = { path = "dpd-types" }
39+
dpd-types-versions = { path = "dpd-types/versions" }
3840
common = { path = "common" }
3941
packet = { path = "packet" }
4042
pcap = { path = "pcap" }

‎asic/Cargo.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ doctest = false
2323
[dependencies]
2424
aal.workspace = true
2525
common.workspace = true
26-
dpd-api.workspace = true
26+
dpd-types.workspace = true
2727

2828
propolis = { workspace = true, optional = true , features = ["falcon"] }
2929
tofino = { workspace = true, optional = true }

‎asic/src/tofino_asic/serdes.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ use crate::tofino_asic::genpd::*;
1616
use crate::tofino_asic::ports;
1717
use crate::tofino_asic::{CheckError, Handle};
1818
use aal::{AsicError, AsicResult, PortHdl};
19-
use dpd_api::{
19+
use dpd_types::serdes::{
2020
AnLtStatus, AnStatus, DfeAdaptationState, EncSpeed, LaneEncoding, LaneMap,
2121
LaneStatus, LpPages, LtStatus, RxSigInfo, SerdesEye,
2222
};

‎asic/src/tofino_common/mod.rs‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
use std::collections::HashMap;
88
use std::ffi::OsStr;
9+
use std::fs;
910
use std::path::PathBuf;
1011

1112
use serde::Deserialize;
@@ -348,6 +349,10 @@ fn infer_p4_dir() -> AsicResult<String> {
348349
let mut exe_path = std::env::current_exe().map_err(|e| {
349350
AsicError::P4Missing(format!("looking up dpd path: {e:?}"))
350351
})?;
352+
// Canonicalize the path in case we're using a symlinked exe.
353+
exe_path = fs::canonicalize(exe_path).map_err(|e| {
354+
AsicError::P4Missing(format!("canonicalizing dpd path: {e:?}"))
355+
})?;
351356

352357
// Pop off the trailing "dpd":
353358
exe_path = expect_name(exe_path, "dpd")?;

‎dpd-api/Cargo.toml‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,7 @@ edition = "2024"
66
[dependencies]
77
common.workspace = true
88
dpd-types.workspace = true
9+
dpd-types-versions.workspace = true
910
dropshot.workspace = true
1011
dropshot-api-manager-types.workspace = true
11-
oxnet.workspace = true
12-
schemars.workspace = true
13-
serde.workspace = true
1412
transceiver-controller.workspace = true
15-
uuid.workspace = true

0 commit comments

Comments
 (0)