Skip to content

bpf, tunnel: TUNNEL_PORT and TUNNEL_PROTOCOL to runtime config#43520

Merged
ti-mo merged 2 commits intomainfrom
pr/vk/bpf/tunnel/cfg
Feb 3, 2026
Merged

bpf, tunnel: TUNNEL_PORT and TUNNEL_PROTOCOL to runtime config#43520
ti-mo merged 2 commits intomainfrom
pr/vk/bpf/tunnel/cfg

Conversation

@viktor-kurchenko
Copy link
Copy Markdown
Contributor

@viktor-kurchenko viktor-kurchenko commented Dec 29, 2025

Migrate TUNNEL_PORT and TUNNEL_PROTOCOL to runtime config.

Please see description per-commit.

Related: #38370

@viktor-kurchenko viktor-kurchenko added area/loader Impacts the loading of BPF programs into the kernel. release-note/misc This PR makes changes that have no direct user impact. labels Dec 29, 2025
@viktor-kurchenko
Copy link
Copy Markdown
Contributor Author

/test

@viktor-kurchenko
Copy link
Copy Markdown
Contributor Author

/test

@viktor-kurchenko viktor-kurchenko added the area/datapath Impacts bpf/ or low-level forwarding details, including map management and monitor messages. label Dec 30, 2025
@viktor-kurchenko
Copy link
Copy Markdown
Contributor Author

/test

@viktor-kurchenko viktor-kurchenko marked this pull request as ready for review December 30, 2025 15:10
@viktor-kurchenko viktor-kurchenko requested review from a team as code owners December 30, 2025 15:10
@viktor-kurchenko
Copy link
Copy Markdown
Contributor Author

/test

@viktor-kurchenko viktor-kurchenko changed the title bpf, tunnel: TUNNEL_PORT to runtime config bpf, tunnel: TUNNEL_PORT and TUNNEL_PROTOCOL to runtime config Dec 30, 2025
Copy link
Copy Markdown
Member

@fristonio fristonio left a comment

Choose a reason for hiding this comment

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

❤️

@viktor-kurchenko
Copy link
Copy Markdown
Contributor Author

/test

@viktor-kurchenko
Copy link
Copy Markdown
Contributor Author

/test

@joestringer joestringer added the dont-merge/wait-until-release Freeze window for current release is blocking non-bugfix PRs label Jan 9, 2026
Copy link
Copy Markdown
Contributor

@ti-mo ti-mo left a comment

Choose a reason for hiding this comment

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

Thanks! The naming of the constants and their type doesn't make much sense to me, but looks good overall. Wondering if this can't be made into a non-node-config, but not sure where this value is actually needed around the code base.

@ti-mo ti-mo added this to the clang-free milestone Jan 12, 2026
@aanm aanm removed the dont-merge/wait-until-release Freeze window for current release is blocking non-bugfix PRs label Jan 14, 2026
@maintainer-s-little-helper maintainer-s-little-helper bot added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Jan 14, 2026
@maintainer-s-little-helper maintainer-s-little-helper bot added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Jan 14, 2026
@julianwiedmann julianwiedmann removed the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Jan 14, 2026
Copy link
Copy Markdown
Contributor

@ti-mo ti-mo left a comment

Choose a reason for hiding this comment

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

Looks good, one nit. (avoid overly terse descriptions in general)

@viktor-kurchenko
Copy link
Copy Markdown
Contributor Author

viktor-kurchenko commented Jan 26, 2026

Looks good, one nit. (avoid overly terse descriptions in general)

Roger that! Thanks!

I've also squashed the commits.

@viktor-kurchenko
Copy link
Copy Markdown
Contributor Author

/test

@viktor-kurchenko
Copy link
Copy Markdown
Contributor Author

/test

@viktor-kurchenko
Copy link
Copy Markdown
Contributor Author

Rebased on the latest main branch.

Copy link
Copy Markdown
Contributor

@smagnani96 smagnani96 left a comment

Choose a reason for hiding this comment

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

Left a comment, not sure about declaring those configs in bpf/lib/classifiers.h.
Other than that, PR LGTM, thanks 💯

This commit moves `TUNNEL_PORT` and `TUNNEL_PROTOCOL` from compile-time
macros to runtime config values, wiring them through local node config
and the BPF config structs.

Also it replaces macro-based helpers with inline functions for tunnel
classification and header setup, and updates BPF tests to assign the new
config values explicitly.

Signed-off-by: viktor-kurchenko <viktor.kurchenko@isovalent.com>
This commit drops the unused `TUNNEL_SRC_PORT_LOW` and
`TUNNEL_SRC_PORT_HIGH` defines from the datapath config provider.

This commit also removes the associated datapath provider tests that
validated these defines.

Signed-off-by: viktor-kurchenko <viktor.kurchenko@isovalent.com>
@viktor-kurchenko
Copy link
Copy Markdown
Contributor Author

/test

Copy link
Copy Markdown
Contributor

@smagnani96 smagnani96 left a comment

Choose a reason for hiding this comment

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

LGTM 🟢

@ti-mo ti-mo enabled auto-merge February 2, 2026 23:01
@julianwiedmann julianwiedmann removed their request for review February 3, 2026 09:30
@ti-mo ti-mo added this pull request to the merge queue Feb 3, 2026
Merged via the queue into main with commit 4e2c824 Feb 3, 2026
624 of 634 checks passed
@ti-mo ti-mo deleted the pr/vk/bpf/tunnel/cfg branch February 3, 2026 14:16
@maintainer-s-little-helper maintainer-s-little-helper bot added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Feb 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/datapath Impacts bpf/ or low-level forwarding details, including map management and monitor messages. area/loader Impacts the loading of BPF programs into the kernel. ready-to-merge This PR has passed all tests and received consensus from code owners to merge. release-note/misc This PR makes changes that have no direct user impact.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants