Skip to content

Conversation

@p-sherratt
Copy link

@p-sherratt p-sherratt commented Nov 20, 2025

fixes #1144

we should always explicitly set this attribute for consistency between kernel versions, since the default udpcsum behaviour changes between versions.

Summary by CodeRabbit

  • Bug Fixes
    • Improved VXLAN network configuration to consistently communicate UDP checksum settings to the system, ensuring more reliable network tunnel behavior in all scenarios.

✏️ Tip: You can customize this high-level summary in your review settings.

fixes vishvananda#1144

we should always explicitly set this attribute for consistency between kernel versions, since the default udpcsum behaviour changes between versions.
@coderabbitai
Copy link

coderabbitai bot commented Nov 20, 2025

Walkthrough

Modified the addVxlanAttrs function in link_linux.go to always emit the IFLA_VXLAN_UDP_CSUM netlink attribute instead of conditionally emitting it only when true, enabling explicit control over UDP checksum setting during vxlan device creation.

Changes

Cohort / File(s) Summary
VXLAN UDP Checksum Attribute Handling
link_linux.go
Changed addVxlanAttrs to unconditionally emit the UDP checksum attribute with explicit 1/0 values instead of conditionally adding it only when true, allowing both enabled and disabled states to be explicitly set during device creation.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

  • Verify the attribute value correctly encodes true/false as 1/0
  • Confirm parsing path already handles both value states (mentioned as already present)
  • Validate the change resolves the linked issue without introducing regressions

Poem

🐰 A checksum that wouldn't say "no,"
Now speaks in zeros and ones—let it flow!
UDP whispers are finally heard,
Both yes and nay, every word.
The vxlan rejoices, at last it can choose! 🎉

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fix: always set vxlan udpcsum attribute' is concise and clearly describes the main change in the PR.
Linked Issues check ✅ Passed The PR correctly addresses the core requirement from #1144 by always emitting the VXLAN UDP checksum attribute, allowing deterministic control of UDPCSum regardless of kernel defaults.
Out of Scope Changes check ✅ Passed All changes are directly scoped to fixing the vxlan UDP checksum attribute handling as described in the linked issue; no extraneous modifications detected.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6e61cd4 and 5752dfc.

📒 Files selected for processing (1)
  • link_linux.go (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
link_linux.go (1)
nl/link_linux.go (1)
  • IFLA_VXLAN_UDP_CSUM (87-87)
🔇 Additional comments (1)
link_linux.go (1)

1322-1322: LGTM! Change correctly addresses kernel default variance.

The change to always emit the IFLA_VXLAN_UDP_CSUM attribute is correct and aligns with how other boolean VXLAN attributes are handled (Learning, Proxy, RSC, L2miss, L3miss, UDP6ZeroCSumTx, UDP6ZeroCSumRx all use the same pattern at lines 1317-1321 and 1323-1324). By explicitly setting the attribute to 0 or 1, this ensures consistent behavior across kernel versions rather than relying on varying kernel defaults.

The parsing path at lines 3078-3079 already correctly handles this attribute, so no additional changes are needed.

Tip

📝 Customizable high-level summaries are now available in beta!

You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.

  • Provide your own instructions using the high_level_summary_instructions setting.
  • Format the summary however you like (bullet lists, tables, multi-section layouts, contributor stats, etc.).
  • Use high_level_summary_in_walkthrough to move the summary from the description to the walkthrough section.

Example instruction:

"Divide the high-level summary into five sections:

  1. 📝 Description — Summarize the main change in 50–60 words, explaining what was done.
  2. 📓 References — List relevant issues, discussions, documentation, or related PRs.
  3. 📦 Dependencies & Requirements — Mention any new/updated dependencies, environment variable changes, or configuration updates.
  4. 📊 Contributor Summary — Include a Markdown table showing contributions:
    | Contributor | Lines Added | Lines Removed | Files Changed |
  5. ✔️ Additional Notes — Add any extra reviewer context.
    Keep each section concise (under 200 words) and use bullet or numbered lists for clarity."

Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

Unable to set noudpcsum on vxlan device

1 participant