Skip to content

Conversation

julianwiedmann
Copy link
Member

@julianwiedmann julianwiedmann commented May 7, 2025

Add some minimal BPF pieces to exercise the compat logic from #33434. Along with some refactor to contain that compat logic a bit better.

@julianwiedmann julianwiedmann added area/datapath Impacts bpf/ or low-level forwarding details, including map management and monitor messages. release-note/misc This PR makes changes that have no direct user impact. area/loadbalancing Impacts load-balancing and Kubernetes service implementations labels May 7, 2025
@julianwiedmann
Copy link
Member Author

/test

@julianwiedmann julianwiedmann force-pushed the 1.18-bpf-proto-diff branch from bdb00a7 to b7bdd8b Compare May 7, 2025 11:18
@julianwiedmann
Copy link
Member Author

/test

@julianwiedmann julianwiedmann marked this pull request as ready for review May 7, 2025 13:07
@julianwiedmann julianwiedmann requested a review from a team as a code owner May 7, 2025 13:07
@julianwiedmann julianwiedmann requested a review from gentoo-root May 7, 2025 13:07
@julianwiedmann julianwiedmann enabled auto-merge May 7, 2025 13:28
@julianwiedmann
Copy link
Member Author

@gentoo-root 👋 anyway I can help to earn your approval on these changes? :)

@gentoo-root
Copy link
Contributor

So sorry, I must have lost it in my inbox! I'll review it today.

@julianwiedmann julianwiedmann added this pull request to the merge queue May 26, 2025
@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 May 26, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks May 26, 2025
@julianwiedmann julianwiedmann added this pull request to the merge queue May 26, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks May 26, 2025
@julianwiedmann
Copy link
Member Author

/test

@julianwiedmann julianwiedmann enabled auto-merge May 26, 2025 13:05
Extract a helper that hides all the compat logic for service entries
without L4 protocol.

While at it also clean up the hard-coded value for the ANY protocol
type, so that we can be consistent about this magic number across the
datapath code.

Signed-off-by: Julian Wiedmann <jwi@isovalent.com>
Let lb_v4_add_service_with_flags() call __lb_v4_add_service(), so that
we also get the expected RevNAT entry for the service.

Signed-off-by: Julian Wiedmann <jwi@isovalent.com>
A service typically is programmed with just the LB_LOOKUP_SCOPE_EXT entry.
The additional LB_LOOKUP_SCOPE_INT entry is only created for services
that have two scopes. Reflect this behavior in the BPF tests.

Signed-off-by: Julian Wiedmann <jwi@isovalent.com>
Add yet another LB helper that allows to program the LB_LOOKUP_SCOPE_EXT
and LB_LOOKUP_SCOPE_INT service entries with different L4 proto values.

This sounds a bit crazy, but can actually happen when the
LB_LOOKUP_SCOPE_EXT entry was created on v1.16 (without L4 proto
differentation), and the LB_LOOKUP_SCOPE_INT subsequently gets created on
v1.17+ *with* L4 proto differentiation enabled. By flipping the service's
iTP / eTP from 'Cluster' to 'Local'. As described in
cilium#39358.

Signed-off-by: Julian Wiedmann <jwi@isovalent.com>
This adds some coverage for various proto-differentiation scenarios.
In particular the mixed-proto case from
cilium#39358.

Signed-off-by: Julian Wiedmann <jwi@isovalent.com>
@julianwiedmann
Copy link
Member Author

/test

@julianwiedmann julianwiedmann added this pull request to the merge queue May 27, 2025
Merged via the queue into cilium:main with commit 5e155bb May 27, 2025
66 of 67 checks passed
@julianwiedmann julianwiedmann deleted the 1.18-bpf-proto-diff branch May 27, 2025 05:57
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/loadbalancing Impacts load-balancing and Kubernetes service implementations 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.

2 participants