Skip to content

Commit 4e0570f

Browse files
committed
Fix zone-to-zone (XDE test, kbench local) runner
During setup, we are not doing any work to ensure that Helios has a valid NDP cache entry ready to use over the simnet link we install for testing. As a result, XDE selects the right output port, but installs source and destination MAC addrs of zero. This worked before; the devices were in promiscuous mode, so the packets made into `xde_rx`. In other cases, the underlay traffic in e.g. a SoftNPU deployment was priming all the necessary NCEs, so we always knew the target MAC address. Obviously this is an easy fix here, and in practice we'll always have the NCE for the nexthop (i.e., the sidecar).
1 parent 9a6e103 commit 4e0570f

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

xde-tests/src/lib.rs

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
// Copyright 2024 Oxide Computer Company
66

7+
use anyhow::Context;
78
use anyhow::Result;
89
use opteadm::OpteAdm;
910
use oxide_vpc::api::AddRouterEntryReq;
@@ -355,6 +356,27 @@ pub fn two_node_topology() -> Result<Topology> {
355356
println!("setup zone b");
356357
b.setup(&opte1.name, opte1.ip())?;
357358

359+
// We now need to establish an NDP cache entry both ways, otherwise
360+
// we'll write zero for both MAC addrs and the packet *will* be dropped --
361+
// we're not in promisc anymore :). One ping from the global zone will suffice.
362+
let ping_res = Command::new("ping")
363+
.args([
364+
"-A",
365+
"inet6",
366+
"-i",
367+
&sim.end_b,
368+
&format!("{}%{}", ll0.ip, sim.end_a),
369+
])
370+
.output()
371+
.with_context(|| "calling 'ping' over simnet")?;
372+
373+
if !ping_res.status.success() {
374+
anyhow::bail!(
375+
"Failed to ping over simnet links!\nstderr:{:?}",
376+
std::str::from_utf8(&ping_res.stderr)
377+
);
378+
}
379+
358380
Ok(Topology {
359381
xde,
360382
lls: vec![ll0, ll1],

0 commit comments

Comments
 (0)