Skip to content

Conversation

@daniel-noland
Copy link
Collaborator

@daniel-noland daniel-noland commented Nov 4, 2025

This is broken out from #964 in order to help @Fredi-raspall do any needed rebase work.

Ideally we can keep getting chunks of #964 in as we progress in integration.

Note

I also significantly extended the docs vs what is currently in #964

@daniel-noland daniel-noland force-pushed the pr/daniel-noland/rework-args branch from 96097cd to a39ef0a Compare November 4, 2025 01:29
@daniel-noland daniel-noland self-assigned this Nov 4, 2025
@daniel-noland daniel-noland added the enhancement New feature or request label Nov 4, 2025
@daniel-noland daniel-noland added this to the GW R1 milestone Nov 4, 2025
@daniel-noland daniel-noland marked this pull request as ready for review November 4, 2025 01:30
@daniel-noland daniel-noland requested a review from a team as a code owner November 4, 2025 01:30
@daniel-noland daniel-noland requested review from Copilot and sergeymatov and removed request for a team November 4, 2025 01:30
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors dataplane configuration management by moving common types and constants from their previous locations into the args crate, and introduces a new configuration serialization system using sealed memory files (memfds). The key changes enable the dataplane-init process to pass ephemeral launch-time configuration to child dataplane processes.

  • Moved socket path constants (DEFAULT_DP_UX_PATH, DEFAULT_DP_UX_PATH_CLI, DEFAULT_FRR_AGENT_PATH) from routing::rio to args module
  • Moved GrpcAddress enum from mgmt::processor::launch to args module with enhanced serialization support
  • Added extensive new configuration infrastructure including MemFile, FinalizedMemFile, LaunchConfiguration, and integrity checking using SHA384
  • Removed DPDK-specific command-line arguments and the unused setup_pipeline function from dataplane/src/main.rs

Reviewed Changes

Copilot reviewed 8 out of 9 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
routing/src/router.rs Updated imports to use socket path constants from args instead of crate::rio
routing/src/rio.rs Removed socket path constants (moved to args), updated references to use args:: prefix
routing/Cargo.toml Added dependency on args workspace crate
mgmt/src/processor/launch.rs Removed GrpcAddress enum (moved to args), updated to use args::GrpcAddress, changed to_path_buf() to into(), fully qualified tokio::task::spawn
mgmt/Cargo.toml Added dependency on args workspace crate, reordered dependencies alphabetically
dataplane/src/main.rs Removed unused imports and setup_pipeline function, replaced method calls with new naming (grpc_address(), driver_name()), replaced DPDK driver start with todo!()
args/src/lib.rs Added socket path constants, GrpcAddress enum, extensive memfd infrastructure, LaunchConfiguration types, integrity checking, conversion from CmdArgs to LaunchConfiguration, renamed methods, moved test code
args/Cargo.toml Added many new dependencies (miette, sha2, memmap2, nix, bytecheck, serde, etc.), reordered and reorganized dependencies
Cargo.lock Added new transitive dependencies for the new functionality

Copy link
Contributor

@mvachhar mvachhar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please address the copilot comments and partition lib.rs into a few files as described. Otherwise, this looks good.

@daniel-noland daniel-noland force-pushed the pr/daniel-noland/rework-args branch 2 times, most recently from d583e1b to fed2308 Compare November 4, 2025 02:22
@daniel-noland daniel-noland requested a review from Copilot November 4, 2025 02:23
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 8 out of 9 changed files in this pull request and generated 6 comments.

@daniel-noland daniel-noland force-pushed the pr/daniel-noland/rework-args branch from fed2308 to 84e5508 Compare November 4, 2025 02:34
The args crate is now has a wider scope: it is not just responsible
for parsing and validating arguments, it is (partly) responsible for
handing the dataplane a memfd file with parsed and acted on data.

The idea here is to

1. allow all of the highly sensitive, highely privileged, and one off jobs
   to be done by dataplane-init rather than dataplane
2. so that dataplane can init the DPDK eal as quickly as possible after process
   start.

The memfd strategy (developed in this PR), is a relatively simple way to accomplish
these objectives (although there is a lot of room for improvement here).

Signed-off-by: Daniel Noland <daniel@githedgehog.com>
Signed-off-by: Daniel Noland <daniel@githedgehog.com>
@daniel-noland daniel-noland force-pushed the pr/daniel-noland/rework-args branch from 84e5508 to c0a4cfd Compare November 4, 2025 02:51
Copy link
Contributor

@mvachhar mvachhar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Delaying addressing the scope and file comments to #972 to favor fewer merge conflicts for Fredi.

@daniel-noland daniel-noland added this pull request to the merge queue Nov 4, 2025
Merged via the queue into main with commit 7167fa6 Nov 4, 2025
19 checks passed
@daniel-noland daniel-noland deleted the pr/daniel-noland/rework-args branch November 4, 2025 04:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants