Skip to content

Commit a4e42f9

Browse files
authored
plumbing for techport router advertisements via tfportd (#3372)
1 parent 803b9a4 commit a4e42f9

File tree

4 files changed

+38
-10
lines changed

4 files changed

+38
-10
lines changed

package-manifest.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -300,8 +300,8 @@ only_for_targets.image = "standard"
300300
# 2. Copy dendrite.tar.gz from dendrite/out to omicron/out
301301
source.type = "prebuilt"
302302
source.repo = "dendrite"
303-
source.commit = "b9444d0c96ba5cb7108a6167a603dd75709441fb"
304-
source.sha256 = "a45a86d33e0a9da9954c5df7e3d0c335c0f2d48c4747b1c163a08b7c675650d9"
303+
source.commit = "b419dfb6dbcabbf9d20b4d001de59eaaed42d2e5"
304+
source.sha256 = "50c27f558b9820b1bf77b892c01df99924a89f6fd2114b1f01a16d5334abce3d"
305305
output.type = "zone"
306306
output.intermediate_only = true
307307

@@ -325,8 +325,8 @@ only_for_targets.image = "standard"
325325
# 2. Copy the output zone image from dendrite/out to omicron/out
326326
source.type = "prebuilt"
327327
source.repo = "dendrite"
328-
source.commit = "b9444d0c96ba5cb7108a6167a603dd75709441fb"
329-
source.sha256 = "e19a2acc8d6f84be5dc2a1c5e327b05c4b5551aaf803d400ea26ada9ccd68ab6"
328+
source.commit = "b419dfb6dbcabbf9d20b4d001de59eaaed42d2e5"
329+
source.sha256 = "91c0559ea00f1df38faced0b68f9231795682de55be2d91cb4b90a72e2f8093c"
330330
output.type = "zone"
331331
output.intermediate_only = true
332332

@@ -343,8 +343,8 @@ only_for_targets.image = "standard"
343343
# 2. Copy dendrite.tar.gz from dendrite/out to omicron/out/dendrite-softnpu.tar.gz
344344
source.type = "prebuilt"
345345
source.repo = "dendrite"
346-
source.commit = "b9444d0c96ba5cb7108a6167a603dd75709441fb"
347-
source.sha256 = "e54f0dc9a85b6a02985dab8d84743f8ac7576303ef8e492733c21b85afb56ad4"
346+
source.commit = "b419dfb6dbcabbf9d20b4d001de59eaaed42d2e5"
347+
source.sha256 = "1a7004ec3c4419fec5d58b0909e1cdd197a64396f1775e8b4a114682c74e5fea"
348348
output.type = "zone"
349349
output.intermediate_only = true
350350

sled-agent/src/services.rs

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -715,6 +715,17 @@ impl ServiceManager {
715715
}
716716
}
717717

718+
fn bootstrap_to_techport(addr: Ipv6Addr) -> Ipv6Addr {
719+
// flip the last bit of the first octet
720+
// fdb0:<id>::suffix -> fdb1:<id>::<suffix>
721+
Ipv6Addr::from(u128::from(addr) | (1 << 112))
722+
}
723+
724+
fn bootstrap_addr_to_prefix(addr: Ipv6Addr) -> Ipv6Addr {
725+
// mask out lower 64 bits to form /64 prefix
726+
Ipv6Addr::from(u128::from(addr) & ((u64::MAX as u128) << 64))
727+
}
728+
718729
// Check the services intended to run in the zone to determine whether any
719730
// physical links or vnics need to be mapped into the zone when it is
720731
// created. Returns a list of links, plus whether or not they need link
@@ -1714,6 +1725,23 @@ impl ServiceManager {
17141725
ServiceType::Tfport { pkt_source } => {
17151726
info!(self.inner.log, "Setting up tfport service");
17161727

1728+
let techport_prefix =
1729+
match bootstrap_name_and_address.as_ref() {
1730+
Some((_, addr)) => Self::bootstrap_addr_to_prefix(
1731+
Self::bootstrap_to_techport(*addr),
1732+
),
1733+
None => {
1734+
return Err(Error::BadServiceRequest {
1735+
service: "tfport".into(),
1736+
message: "bootstrap addr missing".into(),
1737+
});
1738+
}
1739+
};
1740+
1741+
smfh.setprop(
1742+
"config/techport_prefix",
1743+
techport_prefix.to_string(),
1744+
)?;
17171745
smfh.setprop("config/pkt_source", pkt_source)?;
17181746
smfh.setprop(
17191747
"config/host",

tools/dendrite_openapi_version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
COMMIT="b9444d0c96ba5cb7108a6167a603dd75709441fb"
1+
COMMIT="b419dfb6dbcabbf9d20b4d001de59eaaed42d2e5"
22
SHA2="ce1c8129d0cff9dce4a52d70d23ca5d46ed604e71523fccc6ca1925e74ff5ead"

tools/dendrite_stub_checksums

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
CIDL_SHA256_ILLUMOS="a45a86d33e0a9da9954c5df7e3d0c335c0f2d48c4747b1c163a08b7c675650d9"
2-
CIDL_SHA256_LINUX_DPD="377f5e0e0791fa839b2287c08e98ec95feaa6d6ba001b8a6ce0525e6b3da0604"
3-
CIDL_SHA256_LINUX_SWADM="3dd18e31a55dccfeae27bed144d61bcb1929b160dfac20f3d66ae4b2170a5f9f"
1+
CIDL_SHA256_ILLUMOS="50c27f558b9820b1bf77b892c01df99924a89f6fd2114b1f01a16d5334abce3d"
2+
CIDL_SHA256_LINUX_DPD="1192c534241e59fd9c490cdb16866136af05af900006b4c6d919615b71742e4b"
3+
CIDL_SHA256_LINUX_SWADM="31707218a123663890b8c7df77722a99d8153c0fd8a02dee0b45f15be4e33a3a"

0 commit comments

Comments
 (0)