From 11d6bc6409d82e49eac3e99ea0fff5894ce0f0bf Mon Sep 17 00:00:00 2001 From: Kyle Simpson Date: Tue, 12 Mar 2024 13:04:19 +0000 Subject: [PATCH] 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). --- xde-tests/src/lib.rs | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/xde-tests/src/lib.rs b/xde-tests/src/lib.rs index 2344decd..9f8fb709 100644 --- a/xde-tests/src/lib.rs +++ b/xde-tests/src/lib.rs @@ -4,6 +4,7 @@ // Copyright 2024 Oxide Computer Company +use anyhow::Context; use anyhow::Result; use opteadm::OpteAdm; use oxide_vpc::api::AddRouterEntryReq; @@ -349,6 +350,27 @@ pub fn two_node_topology() -> Result { println!("setup zone b"); b.setup(&vopte1.name, opte1.ip())?; + // We now need to establish an NDP cache entry both ways, otherwise + // we'll write zero for both MAC addrs and the packet *will* be dropped -- + // we're not in promisc anymore :). One ping from the global zone will suffice. + let ping_res = Command::new("ping") + .args([ + "-A", + "inet6", + "-i", + &sim.end_b, + &format!("{}%{}", ll0.ip, sim.end_a), + ]) + .output() + .with_context(|| "calling 'ping' over simnet")?; + + if !ping_res.status.success() { + anyhow::bail!( + "Failed to ping over simnet links!\nstderr:{:?}", + std::str::from_utf8(&ping_res.stderr) + ); + } + Ok(Topology { xde, lls: vec![ll0, ll1],