Skip to content

Per-entrypoint DevMaps #710

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 48 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
a0d65d6
Offload testing: lie to MAC.
FelixMcFelix Nov 4, 2024
0f0dd86
Correct MSS setting to Not Emit More Packets
FelixMcFelix Nov 6, 2024
e266aa8
bad merge.
FelixMcFelix Nov 12, 2024
0d2c6c0
Test: fill MEOI in dlbk_t
FelixMcFelix Nov 13, 2024
84021b5
More compact MEOI/tuninfo in dblk
FelixMcFelix Nov 14, 2024
7bdef24
Conditionally expose LSO/CSO capabs based on underlay
FelixMcFelix Nov 15, 2024
3042e76
Playing nice, again.
FelixMcFelix Dec 14, 2024
c7516dc
Fmt.
FelixMcFelix Dec 19, 2024
b33c0a2
Merge branch 'master' into ingot-and-offload
FelixMcFelix Dec 23, 2024
9eea967
Bad merge.
FelixMcFelix Dec 23, 2024
60dbd62
Smuggle V2P/V2B use out via ActionMeta.
FelixMcFelix Dec 23, 2024
8d74090
Cleanup, emulate csum on loopback.
FelixMcFelix Dec 31, 2024
5b8dff8
First-class some dedicated ActionMeta.
FelixMcFelix Dec 31, 2024
fab7c2b
Further cleanup.
FelixMcFelix Dec 31, 2024
90fe450
Copy offload flags during prepend.
FelixMcFelix Jan 8, 2025
2b0386f
Make use of illumos 17032 on rx
FelixMcFelix Jan 9, 2025
1e23d63
Quick rework for inflight changes.
FelixMcFelix Jan 15, 2025
09cd206
Merge branch 'master' into ingot-and-offload
FelixMcFelix Jan 20, 2025
e5e5ad4
Respin against newer-er illumos bits.
FelixMcFelix Jan 28, 2025
009d82c
New API post merge-pileup.
FelixMcFelix Feb 10, 2025
9345439
Whelp, these flags moved about.
FelixMcFelix Feb 10, 2025
2a62156
More explicit flagshift, safety around zone-IP.
FelixMcFelix Feb 18, 2025
bc19340
Bump Rust->1.85, Nightly, move to 2024 edition.
FelixMcFelix Feb 21, 2025
e049022
Rerun fmt a few more times.
FelixMcFelix Feb 21, 2025
204d087
New method name, force offloads to lean on hw_emul
FelixMcFelix Feb 27, 2025
1678408
Flag crimes for an all-emulated world.
FelixMcFelix Feb 27, 2025
268139e
Merge branch 'master' into ingot-and-offload
FelixMcFelix Feb 27, 2025
f8271cd
Fmt.
FelixMcFelix Feb 28, 2025
d870573
Rework rust toolchain installation
FelixMcFelix Mar 4, 2025
0430548
Merge branch 'unbreak-ci' into rust-2024
FelixMcFelix Mar 4, 2025
c4ae722
Bump API version (??)
FelixMcFelix Mar 4, 2025
40f63c8
Formalise style change to 2024
FelixMcFelix Mar 4, 2025
d517019
Clippy -- unsafe op in unsafe fn
FelixMcFelix Mar 4, 2025
8a6fc62
Undo/improve some automatic if let 'fixes' from cargo
FelixMcFelix Mar 5, 2025
828768c
Formatting changed in rustup 1.28.1, sigh.
FelixMcFelix Mar 5, 2025
4175bba
Merge branch 'unbreak-ci' into rust-2024
FelixMcFelix Mar 5, 2025
10427c3
Merge branch 'rust-2024' into ingot-and-offload
FelixMcFelix Mar 5, 2025
45c6f13
Rebasing fixed.
FelixMcFelix Mar 5, 2025
139d043
Review feedback.
FelixMcFelix Mar 5, 2025
4852376
Merge branch 'rust-2024' into ingot-and-offload
FelixMcFelix Mar 6, 2025
aad2455
Downgrade OPTE version for sanity-testing omicron
FelixMcFelix Mar 6, 2025
85649ef
Correctly fixup L3 Checksums when L4 has been offloaded.
FelixMcFelix Mar 7, 2025
1da3d33
Cleanup and self review. Codify 'always advertise offloads'.
FelixMcFelix Mar 7, 2025
e6199c9
`kbench` warnings missed on raand upgrade.
FelixMcFelix Mar 7, 2025
c2b5635
Set_pktinfo is now `void`.
FelixMcFelix Mar 10, 2025
836e2ce
Basic (promising) prototype
FelixMcFelix Mar 12, 2025
a3e0957
Iterating
FelixMcFelix Mar 12, 2025
cafcfb5
Don't leak ports / promisc handlers.
FelixMcFelix Mar 12, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .github/buildomat/common.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/bash

# Install both toolchains required for OPTE.
# We pin to both a specific nightly *and* a stable compiler version
# due to XDE's reliance on unstable features.
rustup show active-toolchain || rustup toolchain install

pushd xde
rustup show active-toolchain || rustup toolchain install
export NIGHTLY=`rustup show active-toolchain -v | head -n 1 | cut -d' ' -f1`
popd

function header {
echo "# ==== $* ==== #"
}

function install_pkg {
set +o errexit
pfexec pkg install $1
exit_code=$?
# 4 is the exit code returned from pkg when the package is already installed
if [[ $exit_code -ne 0 ]] && [[ $exit_code -ne 4 ]]; then
echo "package install failed for $1"
exit 1
fi
set -o errexit
}
4 changes: 3 additions & 1 deletion .github/buildomat/jobs/bench.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#: name = "bench"
#: variety = "basic"
#: target = "helios-2.0"
#: rust_toolchain = "stable"
#: rust_toolchain = true
#: output_rules = [
#: "=/work/bench-results.tgz",
#: ]
Expand All @@ -26,6 +26,8 @@

set -o xtrace

source .github/buildomat/common.sh

pfexec pkg install brand/sparse opte iperf demangle flamegraph

if [[ -z $BUILDOMAT_JOB_ID ]]; then
Expand Down
8 changes: 3 additions & 5 deletions .github/buildomat/jobs/opte-api.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,15 @@
#: name = "opte-api"
#: variety = "basic"
#: target = "helios-2.0"
#: rust_toolchain = "nightly-2024-11-18"
#: rust_toolchain = true
#: output_rules = []
#:

set -o errexit
set -o pipefail
set -o xtrace

function header {
echo "# ==== $* ==== #"
}
source .github/buildomat/common.sh

cargo --version
rustc --version
Expand All @@ -24,7 +22,7 @@ header "check API_VERSION"
./check-api-version.sh

header "check style"
ptime -m cargo +nightly-2024-11-18 fmt -- --check
ptime -m cargo +$NIGHTLY fmt -- --check

header "analyze std"
ptime -m cargo clippy --all-targets
Expand Down
8 changes: 3 additions & 5 deletions .github/buildomat/jobs/opte-ioctl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,23 @@
#: name = "opte-ioctl"
#: variety = "basic"
#: target = "helios-2.0"
#: rust_toolchain = "nightly-2024-11-18"
#: rust_toolchain = true
#: output_rules = []
#:

set -o errexit
set -o pipefail
set -o xtrace

function header {
echo "# ==== $* ==== #"
}
source .github/buildomat/common.sh

cargo --version
rustc --version

cd lib/opte-ioctl

header "check style"
ptime -m cargo +nightly-2024-11-18 fmt -- --check
ptime -m cargo +$NIGHTLY fmt -- --check

header "analyze"
ptime -m cargo clippy --all-targets
12 changes: 5 additions & 7 deletions .github/buildomat/jobs/opte.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,23 @@
#: name = "opte"
#: variety = "basic"
#: target = "helios-2.0"
#: rust_toolchain = "nightly-2024-11-18"
#: rust_toolchain = true
#: output_rules = []
#:

set -o errexit
set -o pipefail
set -o xtrace

function header {
echo "# ==== $* ==== #"
}
source .github/buildomat/common.sh

cargo --version
rustc --version

cd lib/opte

header "check style"
ptime -m cargo +nightly-2024-11-18 fmt -- --check
ptime -m cargo +$NIGHTLY fmt -- --check

header "check docs"
#
Expand All @@ -30,13 +28,13 @@ header "check docs"
#
# Use nightly which is needed for the `kernel` feature.
RUSTDOCFLAGS="-D warnings" ptime -m \
cargo +nightly-2024-11-18 doc --no-default-features --features=api,std,engine,kernel
cargo +$NIGHTLY doc --no-default-features --features=api,std,engine,kernel

header "analyze std + api"
ptime -m cargo clippy --all-targets

header "analyze no_std + engine + kernel"
ptime -m cargo +nightly-2024-11-18 clippy --no-default-features --features engine,kernel
ptime -m cargo +$NIGHTLY clippy --no-default-features --features engine,kernel

header "test"
ptime -m cargo test
8 changes: 3 additions & 5 deletions .github/buildomat/jobs/opteadm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#: name = "opteadm"
#: variety = "basic"
#: target = "helios-2.0"
#: rust_toolchain = "nightly-2024-11-18"
#: rust_toolchain = true
#: output_rules = [
#: "=/work/debug/opteadm",
#: "=/work/debug/opteadm.debug.sha256",
Expand All @@ -20,17 +20,15 @@ set -o errexit
set -o pipefail
set -o xtrace

function header {
echo "# ==== $* ==== #"
}
source .github/buildomat/common.sh

cargo --version
rustc --version

pushd bin/opteadm

header "check style"
ptime -m cargo +nightly-2024-11-18 fmt -- --check
ptime -m cargo +$NIGHTLY fmt -- --check

header "analyze"
ptime -m cargo clippy --all-targets
Expand Down
12 changes: 5 additions & 7 deletions .github/buildomat/jobs/oxide-vpc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,23 @@
#: name = "oxide-vpc"
#: variety = "basic"
#: target = "helios-2.0"
#: rust_toolchain = "nightly-2024-11-18"
#: rust_toolchain = true
#: output_rules = []
#:

set -o errexit
set -o pipefail
set -o xtrace

function header {
echo "# ==== $* ==== #"
}
source .github/buildomat/common.sh

cargo --version
rustc --version

cd lib/oxide-vpc

header "check style"
ptime -m cargo +nightly-2024-11-18 fmt -- --check
ptime -m cargo +$NIGHTLY fmt -- --check

header "check docs"
#
Expand All @@ -30,13 +28,13 @@ header "check docs"
#
# Use nightly which is needed for the `kernel` feature.
RUSTDOCFLAGS="-D warnings" ptime -m \
cargo +nightly-2024-11-18 doc --no-default-features --features=api,std,engine,kernel
cargo +$NIGHTLY doc --no-default-features --features=api,std,engine,kernel

header "analyze std + api + usdt"
ptime -m cargo clippy --features usdt --all-targets

header "analyze no_std + engine + kernel"
ptime -m cargo +nightly-2024-11-18 clippy --no-default-features --features engine,kernel
ptime -m cargo +$NIGHTLY clippy --no-default-features --features engine,kernel

header "test"
ptime -m cargo test
8 changes: 3 additions & 5 deletions .github/buildomat/jobs/p5p.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#: name = "opte-p5p"
#: variety = "basic"
#: target = "helios-2.0"
#: rust_toolchain = "nightly-2024-11-18"
#: rust_toolchain = true
#: output_rules = [
#: "=/out/opte.p5p",
#: "=/out/opte.p5p.sha256",
Expand All @@ -24,6 +24,8 @@ set -o errexit
set -o pipefail
set -o xtrace

source .github/buildomat/common.sh

#
# TGT_BASE allows one to run this more easily in their local
# environment:
Expand All @@ -37,10 +39,6 @@ REL_TGT=$TGT_BASE/release

mkdir -p $REL_TGT

function header {
echo "# ==== $* ==== #"
}

cargo --version
rustc --version

Expand Down
1 change: 0 additions & 1 deletion .github/buildomat/jobs/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#: name = "test"
#: variety = "basic"
#: target = "helios-2.0"
#: rust_toolchain = "stable"
#: output_rules = [
#: "/work/*.log",
#: ]
Expand Down
24 changes: 5 additions & 19 deletions .github/buildomat/jobs/xde.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#: name = "opte-xde"
#: variety = "basic"
#: target = "helios-2.0"
#: rust_toolchain = "nightly-2024-11-18"
#: rust_toolchain = true
#: output_rules = [
#: "=/work/debug/xde.dbg",
#: "=/work/debug/xde.dbg.sha256",
Expand Down Expand Up @@ -31,6 +31,8 @@ set -o errexit
set -o pipefail
set -o xtrace

source .github/buildomat/common.sh

#
# TGT_BASE allows one to run this more easily in their local
# environment:
Expand All @@ -49,22 +51,6 @@ REL_TGT=$TGT_BASE/release

mkdir -p $DBG_TGT $REL_TGT

function header {
echo "# ==== $* ==== #"
}

function install_pkg {
set +o errexit
pfexec pkg install $1
exit_code=$?
# 4 is the exit code returned from pkg when the package is already installed
if [[ $exit_code -ne 0 ]] && [[ $exit_code -ne 4 ]]; then
echo "package install failed for $1"
exit 1
fi
set -o errexit
}

cargo --version
rustc --version

Expand All @@ -75,7 +61,7 @@ pushd xde
cp xde.conf /work/xde.conf

header "check style"
ptime -m cargo +nightly-2024-11-18 fmt -p xde -p xde-link -- --check
ptime -m cargo +$NIGHTLY fmt -p xde -p xde-link -- --check

header "analyze"
ptime -m cargo clippy -- \
Expand Down Expand Up @@ -123,7 +109,7 @@ sha256sum $REL_TGT/xde_link.so > $REL_TGT/xde_link.so.sha256

header "build xde integration tests"
pushd xde-tests
cargo +nightly-2024-11-18 fmt -- --check
cargo +$NIGHTLY fmt -- --check
cargo clippy --all-targets
cargo build --test loopback
loopback_test=$(
Expand Down
3 changes: 3 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ default-members = [
resolver = "2"

[workspace.package]
edition = "2021"
edition = "2024"
license = "MPL-2.0"
repository = "https://github.com/oxidecomputer/opte"

Expand Down
6 changes: 3 additions & 3 deletions bench/benches/userland.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@

//! Userland packet parsing and processing microbenchmarks.

use criterion::criterion_group;
use criterion::criterion_main;
use criterion::BenchmarkId;
use criterion::Criterion;
use criterion::criterion_group;
use criterion::criterion_main;
use opte::engine::packet::Packet;
use opte_bench::MeasurementInfo;
use opte_bench::alloc::*;
use opte_bench::packet::BenchPacket;
use opte_bench::packet::BenchPacketInstance;
Expand All @@ -22,7 +23,6 @@ use opte_bench::packet::ParserKind;
use opte_bench::packet::TestCase;
use opte_bench::packet::ULP_FAST_PATH;
use opte_bench::packet::ULP_SLOW_PATH;
use opte_bench::MeasurementInfo;
use opte_test_utils::*;
use std::hint::black_box;

Expand Down
6 changes: 3 additions & 3 deletions bench/benches/xde.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ use std::net::Ipv6Addr;
use std::net::TcpListener;
use std::path::Path;
use std::process::Command;
use std::sync::Arc;
use std::sync::atomic::AtomicBool;
use std::sync::atomic::Ordering;
use std::sync::Arc;
use std::time::Duration;
#[cfg(target_os = "illumos")]
use xde_tests::get_linklocal_addr;
#[cfg(target_os = "illumos")]
use xde_tests::Topology;
#[cfg(target_os = "illumos")]
use xde_tests::get_linklocal_addr;

const DEFAULT_PORT: u16 = 0x1dee;

Expand Down
Loading