Skip to content

bpf: nodeport: add L2 header before redirecting to overlay interface #35165

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Oct 13, 2024

Conversation

julianwiedmann
Copy link
Member

@julianwiedmann julianwiedmann commented Oct 2, 2024

When redirecting from a L3 device to the overlay interface, we need to manually add a L2 header to the (inner) packet.

#33421 fixed this for the case of Nodeport NAT traffic from the LB node to a backend. Generalize it so that it helps all users of the nodeport_add_tunnel_encap() helper - for example DSR-Geneve or EgressGW reply traffic.

Fix redirect from L3 device to remote endpoint via overlay network.

@julianwiedmann
Copy link
Member Author

/test

jibi and others added 3 commits October 8, 2024 13:08
Signed-off-by: Gilberto Bertin <jibi@cilium.io>
When redirecting from a L3 device to the overlay interface, we need to
manually add a L2 header to the (inner) packet.

cilium#33421 fixed this for the case of
Nodeport NAT traffic from the LB node to a backend. Generalize it so
that it helps all users of the nodeport_add_tunnel_encap() helper - for
example DSR-Geneve or EgressGW reply traffic.

Signed-off-by: Julian Wiedmann <jwi@isovalent.com>
Validate that the from-netdev program adds a L2 header to the packet,
before redirecting it to the overlay interface.

Signed-off-by: Julian Wiedmann <jwi@isovalent.com>
@julianwiedmann julianwiedmann added kind/bug This is a bug in the Cilium logic. area/datapath Impacts bpf/ or low-level forwarding details, including map management and monitor messages. release-note/bug This PR fixes an issue in a previous release of Cilium. labels Oct 8, 2024
@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 Oct 8, 2024
@julianwiedmann julianwiedmann added the needs-backport/1.16 This PR / issue needs backporting to the v1.16 branch label Oct 8, 2024
@julianwiedmann
Copy link
Member Author

/test

@julianwiedmann julianwiedmann requested review from jibi and brb October 8, 2024 12:17
@julianwiedmann julianwiedmann marked this pull request as ready for review October 8, 2024 12:17
@julianwiedmann julianwiedmann requested a review from a team as a code owner October 8, 2024 12:17
@julianwiedmann
Copy link
Member Author

(I've wanted to extend the test to also validate the tunnel_key / tunnel_opt, but hitting a weird issue in the test infra. So let's do this later)

@julianwiedmann julianwiedmann added feature/egress-gateway Impacts the egress IP gateway feature. area/loadbalancing Impacts load-balancing and Kubernetes service implementations labels Oct 8, 2024
Copy link
Member

@brb brb left a comment

Choose a reason for hiding this comment

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

Thanks!

@julianwiedmann julianwiedmann added this pull request to the merge queue Oct 13, 2024
Merged via the queue into cilium:main with commit 677bcc1 Oct 13, 2024
69 checks passed
@julianwiedmann julianwiedmann deleted the 1.17-l3-redirect branch October 13, 2024 14:22
@tklauser tklauser mentioned this pull request Oct 22, 2024
10 tasks
@tklauser tklauser added backport-pending/1.16 The backport for Cilium 1.16.x for this PR is in progress. and removed needs-backport/1.16 This PR / issue needs backporting to the v1.16 branch labels Oct 22, 2024
@github-actions github-actions bot removed the backport-pending/1.16 The backport for Cilium 1.16.x for this PR is in progress. label Oct 22, 2024
@github-actions github-actions bot added the backport-done/1.16 The backport for Cilium 1.16.x for this PR is done. label Oct 22, 2024
@rastislavs rastislavs mentioned this pull request Oct 28, 2024
6 tasks
@rastislavs rastislavs added backport-pending/1.15 The backport for Cilium 1.15.x for this PR is in progress. and removed needs-backport/1.15 labels Oct 28, 2024
@github-actions github-actions bot added backport-done/1.15 The backport for Cilium 1.15.x for this PR is done. and removed backport-pending/1.15 The backport for Cilium 1.15.x for this PR is in progress. labels Oct 29, 2024
@julianwiedmann julianwiedmann added the affects/v1.14 This issue affects v1.14 branch label Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects/v1.14 This issue affects v1.14 branch area/datapath Impacts bpf/ or low-level forwarding details, including map management and monitor messages. area/loadbalancing Impacts load-balancing and Kubernetes service implementations backport-done/1.15 The backport for Cilium 1.15.x for this PR is done. backport-done/1.16 The backport for Cilium 1.16.x for this PR is done. feature/egress-gateway Impacts the egress IP gateway feature. kind/bug This is a bug in the Cilium logic. release-note/bug This PR fixes an issue in a previous release of Cilium.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants