Skip to content

bugfix(controller): configure MTU (#3114)#3118

Open
bgm-malbeclabs wants to merge 3 commits intomainfrom
bgm/configure_mtu_size
Open

bugfix(controller): configure MTU (#3114)#3118
bgm-malbeclabs wants to merge 3 commits intomainfrom
bgm/configure_mtu_size

Conversation

@bgm-malbeclabs
Copy link
Contributor

@bgm-malbeclabs bgm-malbeclabs commented Feb 26, 2026

Summary of Changes

MTU 2048 was hardcoded but now for WAN / DZX interfaces it's 2048 and for CYOA/DIA it's set to 1500.

Closes #3114

Testing Verification

  • Tests have been updated with a different MTU

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 makes the controller-rendered interface MTU configurable by sourcing MTU from the interface model rather than hardcoding 2048, and updates related fixtures/tests accordingly.

Changes:

  • Render per-interface MTU in the device config template (instead of hardcoded 2048).
  • Extend the controller Interface model to carry MTU from on-chain/serviceability data (and propagate it to generated parent interfaces).
  • Update unit test inputs and expected fixture outputs to use a non-default MTU (e.g., 9100), plus a changelog entry.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
controlplane/controller/internal/controller/templates/tunnel.tmpl Switches interface MTU rendering from hardcoded value to model-driven MTU.
controlplane/controller/internal/controller/server_test.go Updates test interface objects to include MTU.
controlplane/controller/internal/controller/render_test.go Updates render tests to include MTU on interfaces.
controlplane/controller/internal/controller/models.go Adds Mtu to controller Interface and maps it from serviceability interfaces / into parent derivation.
controlplane/controller/internal/controller/fixtures/interfaces.txt Updates expected rendered interface MTU values.
controlplane/controller/internal/controller/fixtures/e2e.tmpl Updates expected rendered interface MTU values in e2e fixture template.
controlplane/controller/internal/controller/fixtures/base.config.txt Updates expected base config MTU values.
controlplane/controller/internal/controller/fixtures/base.config.drained.txt Updates expected drained base config MTU values.
CHANGELOG.md Notes that MTU is now configurable.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ben-malbeclabs
Copy link
Contributor

@bgm-malbeclabs please ensure that the MTU on CYOA and/or DIA interfaces are defaulting to 1500 bytes unless specified.

@bgm-malbeclabs
Copy link
Contributor Author

@bgm-malbeclabs please ensure that the MTU on CYOA and/or DIA interfaces are defaulting to 1500 bytes unless specified.

It defaults to 1500:

    /// MTU
    #[arg(long, default_value = "1500")]
    pub mtu: u16,

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 33 out of 33 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@bgm-malbeclabs bgm-malbeclabs force-pushed the bgm/configure_mtu_size branch 3 times, most recently from 9d5f43a to f4dc154 Compare March 5, 2026 16:51
@bgm-malbeclabs bgm-malbeclabs requested a review from Copilot March 5, 2026 17:01
@bgm-malbeclabs bgm-malbeclabs force-pushed the bgm/configure_mtu_size branch from f4dc154 to 2be1ebc Compare March 5, 2026 17:16
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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copy link
Contributor

@ben-malbeclabs ben-malbeclabs left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Specifying MTU values result always in 2048 even if set to a different value

3 participants