feat: make the frame size configurable with -DVDE_MTU - #77
Merged
Merged
Conversation
vde_switch and vde_vxlan hardcode a 1504-byte data buffer, so frames larger than that (e.g. jumbo pings) are silently dropped. Add a VDE_MTU CMake option (default 1504) and use it for the data buffer in port.h and vxlan.h; the headers fall back to 1504 when built without the definition. Fixes #22.
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The focused changes consistently replace both hard-coded limits while retaining backward-compatible defaults.
Review effort: Balanced
Findings: None
What changed in this PR
Makes packet capacity configurable while preserving the existing 1504-byte default.
Changes:
- Adds the
VDE_MTUCMake cache setting. - Uses
VDE_MTUfor switch and VXLAN packet buffers.
| File | Description |
|---|---|
CMakeLists.txt |
Defines and propagates VDE_MTU. |
src/vde_switch/port.h |
Configures switch packet capacity. |
src/vde_vxlan/vxlan.h |
Configures VXLAN packet capacity. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
Fixes #22
CMake option VDE_MTU (default 1504) in port.h and vxlan.h.
Verified: host build passes.