Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
ecf189e
fix(stats): Stop reporting a rate that is negative, or not a number
daniel-noland Aug 25, 2026
f7b2fac
test(interface-manager): Say what spec-to-interface equality means
daniel-noland Aug 25, 2026
0d550d0
fix(stats): Read the rate window in the order its samples arrived
daniel-noland Aug 25, 2026
1af9104
test(dataplane): Read the cli while the dataplane forwards and reconf…
daniel-noland Aug 25, 2026
4e64a96
test(stats): Check the published rate against the load that produced it
daniel-noland Aug 25, 2026
806ce58
test(stats): Check the stencil against arithmetic that is obviously r…
daniel-noland Aug 25, 2026
a3aeacf
fix(stats): Open the startup batches as consecutive windows
daniel-noland Aug 25, 2026
88abc0e
test(stats): Fuzz the counter ledger against skewed arrival times
daniel-noland Aug 25, 2026
7441198
test(stats): Draw the smoothing windows the collector actually produces
daniel-noland Aug 25, 2026
5840693
fix(stats): Retire a metric series when its name stops being current
daniel-noland Aug 25, 2026
434126a
perf(stats): Spend the collector's second on the traffic, not on the …
daniel-noland Aug 25, 2026
c74fe94
fix(stats): Hold a batch the collector cannot take yet
daniel-noland Aug 25, 2026
eb68892
fix(dataplane): Give the pipeline a tick when the interface is quiet
daniel-noland Aug 25, 2026
4fe0c20
fix(stats): Reset a VNI's counters when it changes hands
daniel-noland Aug 25, 2026
8ced858
fix(stats): Drop the traffic still in flight when a VNI changes hands
daniel-noland Aug 25, 2026
a75e2a1
perf(stats): Make the collector's work follow the traffic
daniel-noland Aug 25, 2026
c137585
fix(stats): Keep a VPC's own total when its peer is deleted
daniel-noland Aug 25, 2026
22a4c95
fix(stats): Read the store's names and counters as one thing
daniel-noland Aug 25, 2026
27f6333
fix(nat): Wait for a fuzz case's timers to retire, not just to be woken
daniel-noland Aug 25, 2026
dd1f0a3
fix(flow-entry): Build the per-case runtime per case
daniel-noland Aug 26, 2026
d2799ab
fix(flow-entry): Repair the shuttle-gated flow table tests
daniel-noland Aug 26, 2026
9edb4e8
fix(acl-filter): Keep the rte_acl name counter off the facade atomic
daniel-noland Aug 26, 2026
b5950b3
test(dataplane): Draw the model tests' inputs rather than pinning them
daniel-noland Aug 26, 2026
3556655
fix(net): Compare the partner's genid against its own reading
daniel-noland Aug 26, 2026
55e630f
fix(dataplane): Take clippy's answer on three properties it rejects
daniel-noland Aug 28, 2026
35e753e
style(stats,acl-filter): Settle the sync facade, and two markdownlint…
daniel-noland Aug 28, 2026
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
39 changes: 31 additions & 8 deletions acl-filter/src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ use acl::dpdk::lookup::DpdkAclLookup;
use acl::dpdk::rule::{AclFieldChunks, RuleSpec};
#[cfg(test)]
use acl::reference::table::{RefRule, ReferenceTable};
use concurrency::sync::LazyLock;
use concurrency::sync::atomic::{AtomicU64, Ordering};
use config::ConfigError;
use config::external::overlay::ValidatedOverlay;
use config::external::overlay::acl::{AclAction, AclProtoMatch, AclScope, ValidatedAclRule};
Expand Down Expand Up @@ -404,16 +402,41 @@ impl<K: MatchKey, A> fmt::Debug for AnyTable<K, A> {
}
}

// Lazily initialized so this compiles under the loom backend, whose AtomicU64::new is not const
// (each instance registers with the loom executor). The atomic itself is still the backend atomic,
// so fetch_add() stays instrumented; only construction is deferred. On every other backend LazyLock
// is a thin wrapper over an otherwise-const atomic.
static TABLE_SEQ: LazyLock<AtomicU64> = LazyLock::new(|| AtomicU64::new(0));
concurrency::with_std! {
use concurrency::sync::LazyLock;
use concurrency::sync::atomic::{AtomicU64, Ordering};

static TABLE_SEQ: LazyLock<AtomicU64> = LazyLock::new(|| AtomicU64::new(0));

fn next_in_sequence() -> u64 {
TABLE_SEQ.fetch_add(1, Ordering::Relaxed)
}
}

concurrency::with_loom! {
// nosemgrep: rust-no-direct-std-sync-import
static TABLE_SEQ: std::sync::atomic::AtomicU64 = std::sync::atomic::AtomicU64::new(0);

fn next_in_sequence() -> u64 {
// nosemgrep: rust-no-direct-std-sync-import
TABLE_SEQ.fetch_add(1, std::sync::atomic::Ordering::Relaxed)
}
}

concurrency::with_shuttle! {
// nosemgrep: rust-no-direct-std-sync-import
static TABLE_SEQ: std::sync::atomic::AtomicU64 = std::sync::atomic::AtomicU64::new(0);

fn next_in_sequence() -> u64 {
// nosemgrep: rust-no-direct-std-sync-import
TABLE_SEQ.fetch_add(1, std::sync::atomic::Ordering::Relaxed)
}
}

/// A process-unique rte_acl context name. rte_acl rejects duplicate names, and a hot-swap briefly
/// keeps the old and new contexts alive at once, so the name must be unique across the process.
fn table_name(base: &str) -> String {
format!("acl_{base}_{}", TABLE_SEQ.fetch_add(1, Ordering::Relaxed))
format!("acl_{base}_{}", next_in_sequence())
}

/// Build one table for the selected backend from rules in precedence (insertion) order.
Expand Down
7 changes: 1 addition & 6 deletions dataplane/src/drivers/kernel/worker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ impl Worker {
// awaits before reading anything from the socket.
_ = ticker.tick() => {
intf.watchdog.pat();
continue;
Vec::new()
}
};

Expand All @@ -221,11 +221,6 @@ impl Worker {
let mut tx_drops: u64 = 0; // number of packets dropped on tx
let rx_pkts = packets_vec.len() as u64; // number of packets received
counters.rx = rx_pkts;
if rx_pkts == 0 {
// nothing to process, but the read may have hit errors worth reporting
intf.watchdog.record(&counters);
continue;
}

let packets = packets_vec.into_iter();
let out_pkts = pipeline
Expand Down
Loading
Loading