Skip to content

[GH-41867][Part-2][eBPF] Add BPF tests for skip_tunnel flag and subnet-based routing interaction in hybrid mode#43631

Merged
julianwiedmann merged 3 commits intocilium:mainfrom
anubhabMajumdar:topic/anmajumdar/bpf-tests
Jan 23, 2026
Merged

[GH-41867][Part-2][eBPF] Add BPF tests for skip_tunnel flag and subnet-based routing interaction in hybrid mode#43631
julianwiedmann merged 3 commits intocilium:mainfrom
anubhabMajumdar:topic/anmajumdar/bpf-tests

Conversation

@anubhabMajumdar
Copy link
Copy Markdown
Contributor

@anubhabMajumdar anubhabMajumdar commented Jan 8, 2026

Description

The motivation behind adding a new routing mode is discussed in this CFP .

Part 1 introduces the data path changes - #41868 .

Key Changes

  1. Move hybrid_routing_enabled from node.h to subnet.h
  2. Add load test for the above configuration
  3. Adds comprehensive BPF tests to validate the interaction between the skip_tunnel flag and subnet-based routing in Cilium's egress datapath.

Please ensure your pull request adheres to the following guidelines:

  • For first time contributors, read Submitting a pull request
  • All code is covered by unit and/or runtime tests where feasible.
  • All commits contain a well written commit description including a title,
    description and a Fixes: #XXX line if the commit addresses a particular
    GitHub issue.
  • If your commit description contains a Fixes: <commit-id> tag, then
    please add the commit author[s] as reviewer[s] to this issue.
  • All commits are signed off. See the section Developer’s Certificate of Origin
  • Provide a title or release-note blurb suitable for the release notes.
  • Are you a user of Cilium? Please add yourself to the Users doc
  • Thanks for contributing!

Fixes: #41867

@maintainer-s-little-helper maintainer-s-little-helper bot added the dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. label Jan 8, 2026
@joestringer joestringer added the release-note/ci This PR makes changes to the CI. label Jan 8, 2026
@maintainer-s-little-helper maintainer-s-little-helper bot removed the dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. label Jan 8, 2026
@anubhabMajumdar anubhabMajumdar force-pushed the topic/anmajumdar/bpf-tests branch from 01f797c to 4caa4fd Compare January 9, 2026 00:42
@anubhabMajumdar anubhabMajumdar changed the title Topic/anmajumdar/bpf-tests [GH-41867][Part-2][eBPF] Add BPF tests for skip_tunnel flag and subnet-based routing interaction in hybrid mode Jan 9, 2026
@anubhabMajumdar
Copy link
Copy Markdown
Contributor Author

/test

@anubhabMajumdar
Copy link
Copy Markdown
Contributor Author

github.com/cilium/cilium/pkg/maps/ctmap/gc.TestGCEnableDualStack failed in the last run, but I ran it multiple times locally and it passes. Will retry once more.

@anubhabMajumdar
Copy link
Copy Markdown
Contributor Author

/ci-integration

@anubhabMajumdar
Copy link
Copy Markdown
Contributor Author

cc @julianwiedmann

@anubhabMajumdar
Copy link
Copy Markdown
Contributor Author

Hi @YutaroHayakawa , added BPF tests for this last change - #41868 . Thanks!

@anubhabMajumdar
Copy link
Copy Markdown
Contributor Author

/ci-l7

@anubhabMajumdar
Copy link
Copy Markdown
Contributor Author

/ci-l7

@anubhabMajumdar anubhabMajumdar force-pushed the topic/anmajumdar/bpf-tests branch from 4caa4fd to 1300171 Compare January 21, 2026 21:47
@anubhabMajumdar
Copy link
Copy Markdown
Contributor Author

/test

@anubhabMajumdar
Copy link
Copy Markdown
Contributor Author

  • ci-verifier is passing locally, I think this one failed intermittently
  • ci-l7 is failing on a different test, checking sysdump it seems unrelated to this change

@anubhabMajumdar
Copy link
Copy Markdown
Contributor Author

/ci-verifier

@anubhabMajumdar
Copy link
Copy Markdown
Contributor Author

/ci-ipsec-e2e

@anubhabMajumdar
Copy link
Copy Markdown
Contributor Author

/ci-delegated-ipam

@anubhabMajumdar
Copy link
Copy Markdown
Contributor Author

/ci-l7

@smagnani96
Copy link
Copy Markdown
Contributor

This needs to be rebased to last main for:

@smagnani96 smagnani96 added dont-merge/needs-rebase This PR needs to be rebased because it has merge conflicts. area/CI Continuous Integration testing issue or flake area/datapath Impacts bpf/ or low-level forwarding details, including map management and monitor messages. labels Jan 22, 2026
Relocate hybrid_routing_enabled configuration from the Node
config to subnet.h where it's used. This provides better
scoping and allows per-program control of the feature.

Signed-off-by: Anubhab Majumdar <anmajumdar@microsoft.com>
Extend LXC and host BPF load test permutations to include
HybridRoutingEnabled configuration option.

Signed-off-by: Anubhab Majumdar <anmajumdar@microsoft.com>
Add test cases for skip_tunnel flag interaction with
subnet-based routing.

Signed-off-by: Anubhab Majumdar <anmajumdar@microsoft.com>
@anubhabMajumdar anubhabMajumdar force-pushed the topic/anmajumdar/bpf-tests branch from 1300171 to 2ab793a Compare January 22, 2026 17:35
@anubhabMajumdar
Copy link
Copy Markdown
Contributor Author

/test

@YutaroHayakawa
Copy link
Copy Markdown
Member

@ysksuzuki Could you please take a look at this?

@anubhabMajumdar
Copy link
Copy Markdown
Contributor Author

/ci-clustermesh

Copy link
Copy Markdown
Member

@julianwiedmann julianwiedmann left a comment

Choose a reason for hiding this comment

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

lgtm, thank you!

@julianwiedmann julianwiedmann removed the dont-merge/needs-rebase This PR needs to be rebased because it has merge conflicts. label Jan 23, 2026
@julianwiedmann julianwiedmann added this pull request to the merge queue Jan 23, 2026
Comment on lines +16 to +21
struct subnet_key key = {
.lpm_key.prefixlen = SUBNET_PREFIX_LEN(mask_size),
.family = ENDPOINT_KEY_IPV4,
.ip4 = addr,
};

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please also take a moment to wire up the map structs into bpf/bpf_alignchecker.c, and consider this in the controlplane code. To ensure that both sides operate with the same perspective wrt struct layout.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks, will do!

Merged via the queue into cilium:main with commit 8dfc5e5 Jan 23, 2026
76 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/CI Continuous Integration testing issue or flake area/datapath Impacts bpf/ or low-level forwarding details, including map management and monitor messages. release-note/ci This PR makes changes to the CI.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add hybrid routing to Cilium

6 participants