Skip to content

Commit

Permalink
Fix zone-to-zone (XDE test, kbench local) runner
Browse files Browse the repository at this point in the history
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, but we also
need to ensure that all sleds have valid NDP entries for one another at
all times.
  • Loading branch information
FelixMcFelix committed Mar 12, 2024
1 parent 42c1506 commit 7af1fe6
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions xde-tests/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

// Copyright 2024 Oxide Computer Company

use anyhow::Context;
use anyhow::Result;
use opteadm::OpteAdm;
use oxide_vpc::api::AddRouterEntryReq;
Expand Down Expand Up @@ -349,6 +350,27 @@ pub fn two_node_topology() -> Result<Topology> {
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],
Expand Down

0 comments on commit 7af1fe6

Please sign in to comment.