(6) drop unused DPDK driver scaffolding#1562
Open
daniel-noland wants to merge 1 commit into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR removes the unused dataplane DPDK driver scaffolding and, as part of enabling broader “model-checker friendly” builds, standardizes synchronization primitives behind the concurrency facade while improving cross-arch test execution (qemu-user) and test gating via a shared emulated cfg.
Changes:
- Removed the dataplane DPDK driver module/feature/build-script scaffolding (while keeping
dpdkselection routed totodo!()). - Migrated many crates from direct
std::sync::*usage toconcurrency::sync::*, and added enforcement (Clippy + Semgrep) plus improved loom/shuttle test infrastructure. - Added cross-arch test runner plumbing (
scripts/test-runner.sh, cargo runner config,emulatedcfg), plus Nix/CI updates and dependency pin bumps.
Reviewed changes
Copilot reviewed 99 out of 101 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tracectl/src/control.rs | Switches sync imports to concurrency::sync and simplifies locking calls. |
| tracectl/Cargo.toml | Adds concurrency dependency for new sync imports. |
| sysfs/src/lib.rs | Moves LazyLock import to concurrency::sync. |
| sysfs/Cargo.toml | Adds concurrency dependency. |
| scripts/test-runner.sh | Adds a cargo runner wrapper to execute tests via qemu-user when needed. |
| scripts/doc/custom-header.html | Bumps KaTeX CDN URLs to 0.17.0 for rendered docs. |
| routing/src/router/rio.rs | Uses concurrency::sync::Arc and gates UDS tests on emulated. |
| routing/src/router/ctl.rs | Uses concurrency::sync::Arc. |
| routing/src/rib/vrftable.rs | Gates traced_test usage on not(emulated). |
| routing/src/rib/nexthop.rs | Gates traced_test usage on not(emulated). |
| routing/src/frr/test.rs | Gates traced_test and ignores flaky/unsupported emulated socket test. |
| routing/src/fib/test.rs | Moves test threading/atomics to concurrency and adds model-checker-focused tests. |
| routing/src/config/mod.rs | Gates traced_test usage on not(emulated). |
| routing/src/cli/handler.rs | Uses concurrency::sync::Arc. |
| routing/src/atable/resolver.rs | Marks ARP/proc-dependent test ignored under emulated. |
| routing/Cargo.toml | Adds loom/shuttle feature wiring to concurrency features. |
| npins/sources.json | Updates KaTeX, rust-overlay, nixpkgs, and dplane-plugin pins/hashes. |
| nix/profiles.nix | Adds host-arch awareness and emits --cfg=emulated for cross-arch test runs. |
| nix/pkgs/dplane-plugin/default.nix | Drops a now-unneeded musl compatibility postPatch workaround. |
| net/src/packet/hash.rs | Reduces test workload under emulated. |
| nat/src/stateless/test.rs | Gates traced_test usage on not(emulated). |
| nat/src/stateful/test.rs | Gates traced_test usage on not(emulated). |
| nat/src/stateful/apalloc/test_alloc.rs | Refactors shuttle/std tests into #[concurrency::test]-driven modules. |
| nat/src/stateful/apalloc/port_alloc.rs | Uses concurrency::thread::ThreadId and adds loom-deterministic shuffle shim. |
| nat/src/portfw/test.rs | Gates traced_test usage on not(emulated). |
| nat/src/portfw/portfwtable/objects.rs | Gates traced_test usage on not(emulated). |
| nat/src/portfw/portfwtable/access.rs | Gates traced_test usage on not(emulated). |
| nat/src/lib.rs | Enables arbitrary_self_types under loom for self: Arc<Self> with loom Arc shim. |
| nat/Cargo.toml | Adds loom feature and simplifies shuttle feature set. |
| miri.just | Aligns miri runs with --cfg=emulated umbrella. |
| mgmt/tests/reconcile.rs | Uses concurrency::sync::Arc, gates tracing under emulated, and documents intentional std::sync::Mutex use. |
| mgmt/src/vpc_manager/mod.rs | Uses concurrency::sync::Arc. |
| mgmt/src/tests/mgmt.rs | Gates traced_test usage on not(emulated). |
| mgmt/src/processor/mgmt_client.rs | Uses concurrency::sync::Arc. |
| mgmt/src/processor/k8s_less_client.rs | Uses concurrency::sync::Arc. |
| mgmt/src/processor/k8s_client.rs | Uses concurrency::sync::Arc. |
| mgmt/src/processor/gwconfigdb.rs | Uses concurrency::sync::Arc. |
| mgmt/src/processor/confbuild/router.rs | Uses concurrency::sync::Arc. |
| left-right-tlcache/src/lib.rs | Uses concurrency::sync::Mutex in tests and removes unwrap() on locks. |
| left-right-tlcache/Cargo.toml | Adds concurrency dev-dependency for tests. |
| k8s-less/src/local.rs | Gates traced_test usage on not(emulated). |
| k8s-intf/src/client.rs | Uses concurrency::sync::Arc. |
| k8s-intf/src/bolero/support.rs | Reduces iterations under emulated. |
| k8s-intf/Cargo.toml | Adds optional concurrency dep to the client feature set. |
| justfile | Updates nextest filtering logic for loom/shuttle runs. |
| interface-manager/src/lib.rs | Uses concurrency::sync::Arc. |
| interface-manager/Cargo.toml | Adds concurrency dependency. |
| flow-filter/src/tests.rs | Gates traced_test usage on not(emulated). |
| flow-entry/src/flow_table/table.rs | Avoids timers under loom/shuttle and refactors shuttle tests to #[concurrency::test]. |
| flow-entry/src/flow_table/nf_lookup.rs | Reduces packets under emulated. |
| flow-entry/Cargo.toml | Adds loom feature and simplifies shuttle feature set. |
| dpdk/src/acl/mod.rs | Uses concurrency threading primitives in tests. |
| dpdk/src/acl/config.rs | Adds aarch64 ignore for a bindgen constant discrepancy test. |
| default.nix | Threads host-arch into profiles and adds qemu-user to build inputs. |
| dataplane/src/runtime.rs | Extracts dataplane runtime from main.rs and keeps DPDK selection as todo!(). |
| dataplane/src/main.rs | Gates dataplane binary out under loom and delegates to runtime::main(). |
| dataplane/src/drivers/mod.rs | Removes the dpdk driver module export. |
| dataplane/src/drivers/dpdk.rs | Deletes the unused/empty DPDK driver implementation file. |
| dataplane/Cargo.toml | Removes default dpdk feature/build dep; adds loom feature for workspace feature resolution. |
| dataplane/build.rs | Deletes now-empty build script (previously for dpdk sysroot helper). |
| config/src/utils/collapse.rs | Reduces bolero generator size under emulated. |
| config/src/gwconfig.rs | Replaces ArcSwap with concurrency::slot::Slot for backend-portable config metadata storage. |
| config/src/external/overlay/vpcpeering.rs | Uses concurrency::sync::LazyLock for a static empty set. |
| config/Cargo.toml | Adds concurrency dependency. |
| concurrency/tests/thread_scope.rs | Updates shuttle gating and allows disallowed types for test internals. |
| concurrency/tests/stress_dispatch.rs | Adjusts shuttle gating and clarifies dispatch behavior. |
| concurrency/tests/scope_property.rs | Allows disallowed types for test internals. |
| concurrency/tests/quiescent_shuttle.rs | Allows disallowed types for test internals. |
| concurrency/tests/quiescent_protocol.rs | Allows disallowed types for test internals. |
| concurrency/tests/quiescent_properties.rs | Allows disallowed types for test internals. |
| concurrency/tests/quiescent_model.rs | Updates shuttle gating semantics around PCT/portfolio behavior. |
| concurrency/tests/arc_weak.rs | Opts out under shuttle portfolio; allows disallowed types. |
| concurrency/src/thread/mod.rs | Adds loom spawn with larger stack and provides BuilderExt::spawn_scoped adapter. |
| concurrency/src/thread/loom_scope.rs | Uses the loom spawn shim from the facade thread module. |
| concurrency/src/sync/std_backend.rs | Re-exports LazyLock and allows disallowed std sync types inside the facade. |
| concurrency/src/sync/shuttle_backend.rs | Re-exports std LazyLock/OnceLock with lint allow for shuttle backend. |
| concurrency/src/sync/parking_lot_backend.rs | Re-exports LazyLock and allows disallowed types inside the facade. |
| concurrency/src/sync/mod.rs | Updates docs to reflect shuttle portfolio runner behavior. |
| concurrency/src/sync/loom_backend.rs | Re-exports std LazyLock with lint allow under loom backend. |
| concurrency/src/stress.rs | Reworks stress dispatch to use shuttle PortfolioRunner and loom stack-size workaround. |
| concurrency/src/slot.rs | Adds load() convenience methods to match ArcSwap-style APIs across backends. |
| concurrency/src/quiescent.rs | Allows disallowed types for internal implementation needs. |
| concurrency/Cargo.toml | Simplifies shuttle feature set and documents portfolio approach. |
| concurrency-macros/src/lib.rs | Updates #[concurrency::test] expansion for new shuttle backend behavior (single shuttle leaf). |
| common/src/cliprovider.rs | Uses Slot::load() (instead of load_full()) for CLI providers. |
| clippy.toml | Disallows direct std::sync::{Mutex,RwLock,...} types to enforce facade usage. |
| cli/src/cliproto.rs | Ignores UDS test under emulated (miri/qemu-user). |
| cli/Cargo.toml | Adds concurrency dependency. |
| cli/bin/terminal.rs | Uses concurrency::sync::Arc. |
| cli/bin/main.rs | Uses concurrency::sync::Arc. |
| cli/bin/completions.rs | Uses concurrency::sync::Arc. |
| Cargo.toml | Bumps netgauze-* and serde_json workspace dependency versions. |
| Cargo.lock | Updates lockfile for dependency version bumps and graph changes. |
| .semgrep/rules/no-std-sync-direct.yaml | Adds Semgrep enforcement for avoiding direct std::sync usage. |
| .gitignore | Ignores qemu-user core dumps. |
| .github/workflows/lint-opengrep.yml | Configures opengrep to scan with auto + local Semgrep rules. |
| .github/workflows/dev.yml | Adds cross test execution, refactors model-checker jobs, and surfaces cross failures via sticky PR comment. |
| .github/workflows/bump.yml | Ensures bump PRs opt into full cross matrix via label. |
| .github/actions/sticky-pr-comment/action.yml | Adds a composite action for create/update sticky PR comments. |
| .config/nextest.toml | Adds a cross-qemu nextest profile tuned for qemu-user runs. |
| .cargo/config.toml | Registers emulated cfg and wires target runners to scripts/test-runner.sh. |
a0fc5d8 to
b9782bb
Compare
f6f7ab9 to
30e7a6d
Compare
f66a413 to
40a0c4b
Compare
The DPDK driver was stubbed out behind `#![cfg(feature = "dpdk")]` and the dispatch in `runtime.rs` already routes the "dpdk" argument through `todo!()`. Remove the empty `drivers/dpdk` module, the `dpdk` cargo feature, the `dpdk-sysroot-helper` build dependency, and the now-empty `build.rs`. The DPDK driver supervisor will be re-introduced from scratch when the DPDK threading model lands; the present scaffolding is misleading because it implies the driver exists in some form. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Signed-off-by: Daniel Noland <daniel@githedgehog.com>
30e7a6d to
190ea59
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The DPDK driver was stubbed out behind
#![cfg(feature = "dpdk")]and the dispatch inruntime.rsalready routes the"dpdk"argument throughtodo!(). Remove the emptydrivers/dpdkmodule, thedpdkcargo feature, thedpdk-sysroot-helperbuild dependency, and the now-emptybuild.rs.The DPDK driver supervisor will be re-introduced from scratch when the DPDK threading model lands.
Predecessor for #1555 (threading rewrite); merge this first.