From 0f048374110d75ae61743ae3ec0de96960a2848d Mon Sep 17 00:00:00 2001 From: Ryan Goodfellow Date: Thu, 18 Dec 2025 16:25:13 -0800 Subject: [PATCH 1/2] bump to poptrie with 8-byte aligned keys --- Cargo.lock | 2 +- Cargo.toml | 3 ++- lib/oxide-vpc/src/engine/overlay.rs | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index db25a003..4330b953 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1484,7 +1484,7 @@ dependencies = [ [[package]] name = "poptrie" version = "0.1.0" -source = "git+https://github.com/oxidecomputer/poptrie?branch=multipath#ca52bef3f87ff1a67d81b3c6e601dcb5fdbcc165" +source = "git+https://github.com/oxidecomputer/poptrie?branch=ry%2F8-byte-key-alignment#25748c31568ad85356f5bda6a0a781c92375ae69" [[package]] name = "postcard" diff --git a/Cargo.toml b/Cargo.toml index ab1354fd..72ea6a2a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -80,7 +80,8 @@ version_check = "0.9" zerocopy = { version = "0.8", features = ["derive"] } zone = { git = "https://github.com/oxidecomputer/zone" } ztest = { git = "https://github.com/oxidecomputer/falcon", branch = "main" } -poptrie = { git = "https://github.com/oxidecomputer/poptrie", branch = "multipath" } +poptrie = { git = "https://github.com/oxidecomputer/poptrie", branch = "ry/8-byte-key-alignment" } +#poptrie = { git = "https://github.com/oxidecomputer/poptrie", branch = "main" } [profile.dev] opt-level = 1 diff --git a/lib/oxide-vpc/src/engine/overlay.rs b/lib/oxide-vpc/src/engine/overlay.rs index 6bfc6bd3..e4a356e8 100644 --- a/lib/oxide-vpc/src/engine/overlay.rs +++ b/lib/oxide-vpc/src/engine/overlay.rs @@ -939,7 +939,7 @@ impl Virt2Boundary { ) { let table = poptrie::Ipv4RoutingTable( tree.iter() - .map(|(k, v)| ((u32::from(k.ip()), k.prefix_len()), v.clone())) + .map(|(k, v)| ((k.ip().bytes(), k.prefix_len()), v.clone())) .collect(), ); *self.pt4.write() = poptrie::Poptrie::from(table); @@ -951,7 +951,7 @@ impl Virt2Boundary { ) { let table = poptrie::Ipv6RoutingTable( tree.iter() - .map(|(k, v)| ((u128::from(k.ip()), k.prefix_len()), v.clone())) + .map(|(k, v)| ((k.ip().bytes(), k.prefix_len()), v.clone())) .collect(), ); *self.pt6.write() = poptrie::Poptrie::from(table); From 1ee63d6ea5de3580899171bf590ba1c6013a656d Mon Sep 17 00:00:00 2001 From: Ryan Goodfellow Date: Fri, 26 Dec 2025 12:06:52 -0800 Subject: [PATCH 2/2] bump poptrie to main --- Cargo.lock | 2 +- Cargo.toml | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4330b953..32bef889 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1484,7 +1484,7 @@ dependencies = [ [[package]] name = "poptrie" version = "0.1.0" -source = "git+https://github.com/oxidecomputer/poptrie?branch=ry%2F8-byte-key-alignment#25748c31568ad85356f5bda6a0a781c92375ae69" +source = "git+https://github.com/oxidecomputer/poptrie?branch=main#0fcdc8e9a9491f86b32e743d3f6e049012362b05" [[package]] name = "postcard" diff --git a/Cargo.toml b/Cargo.toml index 72ea6a2a..08fadd90 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -80,8 +80,7 @@ version_check = "0.9" zerocopy = { version = "0.8", features = ["derive"] } zone = { git = "https://github.com/oxidecomputer/zone" } ztest = { git = "https://github.com/oxidecomputer/falcon", branch = "main" } -poptrie = { git = "https://github.com/oxidecomputer/poptrie", branch = "ry/8-byte-key-alignment" } -#poptrie = { git = "https://github.com/oxidecomputer/poptrie", branch = "main" } +poptrie = { git = "https://github.com/oxidecomputer/poptrie", branch = "main" } [profile.dev] opt-level = 1