-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
bpf: nodeport: handle DSR at from-netdev / to-netdev #22978
Merged
YutaroHayakawa
merged 7 commits into
cilium:master
from
julianwiedmann:nodeport-hostns-dsr
Mar 7, 2023
Merged
bpf: nodeport: handle DSR at from-netdev / to-netdev #22978
YutaroHayakawa
merged 7 commits into
cilium:master
from
julianwiedmann:nodeport-hostns-dsr
Mar 7, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 9, 2023
julianwiedmann
added
the
release-note/bug
This PR fixes an issue in a previous release of Cilium.
label
Jan 9, 2023
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 9, 2023
/test |
julianwiedmann
force-pushed
the
nodeport-hostns-dsr
branch
2 times, most recently
from
January 10, 2023 12:53
b356961
to
c02dfcc
Compare
/test |
julianwiedmann
force-pushed
the
nodeport-hostns-dsr
branch
from
January 10, 2023 16:09
c02dfcc
to
1e451ba
Compare
/test |
julianwiedmann
force-pushed
the
nodeport-hostns-dsr
branch
from
January 11, 2023 09:50
1e451ba
to
2c357c2
Compare
/test |
julianwiedmann
force-pushed
the
nodeport-hostns-dsr
branch
from
January 12, 2023 12:32
2c357c2
to
33e3ee6
Compare
/test |
julianwiedmann
force-pushed
the
nodeport-hostns-dsr
branch
from
January 18, 2023 16:00
33e3ee6
to
fa8b7a3
Compare
/test |
julianwiedmann
force-pushed
the
nodeport-hostns-dsr
branch
from
January 19, 2023 07:36
fa8b7a3
to
c559ff5
Compare
/test |
julianwiedmann
force-pushed
the
nodeport-hostns-dsr
branch
2 times, most recently
from
January 23, 2023 14:50
3a3d73d
to
e77c6f8
Compare
/test |
julianwiedmann
changed the title
WIP DSR reply from hostns
bpf: nodeport: handle revDNAT for DSR backends at to-netdev
Jan 23, 2023
julianwiedmann
force-pushed
the
nodeport-hostns-dsr
branch
from
January 24, 2023 17:29
e77c6f8
to
eb355c3
Compare
/test |
julianwiedmann
force-pushed
the
nodeport-hostns-dsr
branch
from
January 27, 2023 08:47
eb355c3
to
d64bc25
Compare
julianwiedmann
added
the
sig/datapath
Impacts bpf/ or low-level forwarding details, including map management and monitor messages.
label
Jan 27, 2023
/test |
Some ideas for reviewers to double-check:
|
julianwiedmann
added a commit
to julianwiedmann/cilium
that referenced
this pull request
Oct 30, 2023
DSR uses a OUT NAT entry for RevDNAT of backend replies. Prior to the changes in cilium#22978, this NAT entry was protected by the CT_INGRESS entry which bpf_lxc creates for the backend connection. Test that GC of the NAT entry works when the CT entry is removed. Signed-off-by: Julian Wiedmann <jwi@isovalent.com>
julianwiedmann
added a commit
to julianwiedmann/cilium
that referenced
this pull request
Oct 30, 2023
With cilium#22978 we changed how DSR NAT entries are managed. Instead of associating the NAT entry's lifetime with bpf_lxc's CT_INGRESS entry, the nodeport code on the backend now creates its own CT_EGRESS entry. When such a CT_EGRESS entry is GC'ed, we should therefore also purge the related DSR NAT entry. Also add a test for this case. Signed-off-by: Julian Wiedmann <jwi@isovalent.com>
julianwiedmann
added a commit
to julianwiedmann/cilium
that referenced
this pull request
Oct 30, 2023
With cilium#22978 we changed how DSR NAT entries are managed. Instead of associating the NAT entry's lifetime with bpf_lxc's CT_INGRESS entry, the nodeport code on the backend now creates its own CT_EGRESS entry. When such a CT_EGRESS entry is GC'ed, we should therefore also purge the related DSR NAT entry. Also add a test for this case. Signed-off-by: Julian Wiedmann <jwi@isovalent.com>
dylandreimerink
pushed a commit
that referenced
this pull request
Oct 30, 2023
DSR uses a OUT NAT entry for RevDNAT of backend replies. Prior to the changes in #22978, this NAT entry was protected by the CT_INGRESS entry which bpf_lxc creates for the backend connection. Test that GC of the NAT entry works when the CT entry is removed. Signed-off-by: Julian Wiedmann <jwi@isovalent.com>
dylandreimerink
pushed a commit
that referenced
this pull request
Oct 30, 2023
With #22978 we changed how DSR NAT entries are managed. Instead of associating the NAT entry's lifetime with bpf_lxc's CT_INGRESS entry, the nodeport code on the backend now creates its own CT_EGRESS entry. When such a CT_EGRESS entry is GC'ed, we should therefore also purge the related DSR NAT entry. Also add a test for this case. Signed-off-by: Julian Wiedmann <jwi@isovalent.com>
pippolo84
pushed a commit
to pippolo84/cilium
that referenced
this pull request
Oct 30, 2023
[ upstream commit 5b22423 ] DSR uses a OUT NAT entry for RevDNAT of backend replies. Prior to the changes in cilium#22978, this NAT entry was protected by the CT_INGRESS entry which bpf_lxc creates for the backend connection. Test that GC of the NAT entry works when the CT entry is removed. Signed-off-by: Julian Wiedmann <jwi@isovalent.com> Signed-off-by: Fabio Falzoi <fabio.falzoi@isovalent.com>
pippolo84
pushed a commit
to pippolo84/cilium
that referenced
this pull request
Oct 30, 2023
[ upstream commit 21072cd ] With cilium#22978 we changed how DSR NAT entries are managed. Instead of associating the NAT entry's lifetime with bpf_lxc's CT_INGRESS entry, the nodeport code on the backend now creates its own CT_EGRESS entry. When such a CT_EGRESS entry is GC'ed, we should therefore also purge the related DSR NAT entry. Also add a test for this case. Signed-off-by: Julian Wiedmann <jwi@isovalent.com> Signed-off-by: Fabio Falzoi <fabio.falzoi@isovalent.com>
pippolo84
pushed a commit
to pippolo84/cilium
that referenced
this pull request
Oct 30, 2023
[ upstream commit 5b22423 ] DSR uses a OUT NAT entry for RevDNAT of backend replies. Prior to the changes in cilium#22978, this NAT entry was protected by the CT_INGRESS entry which bpf_lxc creates for the backend connection. Test that GC of the NAT entry works when the CT entry is removed. Signed-off-by: Julian Wiedmann <jwi@isovalent.com> Signed-off-by: Fabio Falzoi <fabio.falzoi@isovalent.com>
pippolo84
pushed a commit
to pippolo84/cilium
that referenced
this pull request
Oct 30, 2023
[ upstream commit 21072cd ] With cilium#22978 we changed how DSR NAT entries are managed. Instead of associating the NAT entry's lifetime with bpf_lxc's CT_INGRESS entry, the nodeport code on the backend now creates its own CT_EGRESS entry. When such a CT_EGRESS entry is GC'ed, we should therefore also purge the related DSR NAT entry. Also add a test for this case. Signed-off-by: Julian Wiedmann <jwi@isovalent.com> Signed-off-by: Fabio Falzoi <fabio.falzoi@isovalent.com>
pippolo84
pushed a commit
to pippolo84/cilium
that referenced
this pull request
Oct 30, 2023
[ upstream commit 5b22423 ] DSR uses a OUT NAT entry for RevDNAT of backend replies. Prior to the changes in cilium#22978, this NAT entry was protected by the CT_INGRESS entry which bpf_lxc creates for the backend connection. Test that GC of the NAT entry works when the CT entry is removed. Signed-off-by: Julian Wiedmann <jwi@isovalent.com> Signed-off-by: Fabio Falzoi <fabio.falzoi@isovalent.com>
pippolo84
pushed a commit
to pippolo84/cilium
that referenced
this pull request
Oct 30, 2023
[ upstream commit 21072cd ] With cilium#22978 we changed how DSR NAT entries are managed. Instead of associating the NAT entry's lifetime with bpf_lxc's CT_INGRESS entry, the nodeport code on the backend now creates its own CT_EGRESS entry. When such a CT_EGRESS entry is GC'ed, we should therefore also purge the related DSR NAT entry. Also add a test for this case. Signed-off-by: Julian Wiedmann <jwi@isovalent.com> Signed-off-by: Fabio Falzoi <fabio.falzoi@isovalent.com>
pippolo84
pushed a commit
to pippolo84/cilium
that referenced
this pull request
Oct 30, 2023
[ upstream commit 5b22423 ] DSR uses a OUT NAT entry for RevDNAT of backend replies. Prior to the changes in cilium#22978, this NAT entry was protected by the CT_INGRESS entry which bpf_lxc creates for the backend connection. Test that GC of the NAT entry works when the CT entry is removed. Signed-off-by: Julian Wiedmann <jwi@isovalent.com> Signed-off-by: Fabio Falzoi <fabio.falzoi@isovalent.com>
pippolo84
pushed a commit
to pippolo84/cilium
that referenced
this pull request
Oct 30, 2023
[ upstream commit 21072cd ] With cilium#22978 we changed how DSR NAT entries are managed. Instead of associating the NAT entry's lifetime with bpf_lxc's CT_INGRESS entry, the nodeport code on the backend now creates its own CT_EGRESS entry. When such a CT_EGRESS entry is GC'ed, we should therefore also purge the related DSR NAT entry. Also add a test for this case. Signed-off-by: Julian Wiedmann <jwi@isovalent.com> Signed-off-by: Fabio Falzoi <fabio.falzoi@isovalent.com>
pippolo84
pushed a commit
to pippolo84/cilium
that referenced
this pull request
Oct 31, 2023
[ upstream commit 5b22423 ] DSR uses a OUT NAT entry for RevDNAT of backend replies. Prior to the changes in cilium#22978, this NAT entry was protected by the CT_INGRESS entry which bpf_lxc creates for the backend connection. Test that GC of the NAT entry works when the CT entry is removed. Signed-off-by: Julian Wiedmann <jwi@isovalent.com> Signed-off-by: Fabio Falzoi <fabio.falzoi@isovalent.com>
pippolo84
pushed a commit
to pippolo84/cilium
that referenced
this pull request
Oct 31, 2023
[ upstream commit 21072cd ] With cilium#22978 we changed how DSR NAT entries are managed. Instead of associating the NAT entry's lifetime with bpf_lxc's CT_INGRESS entry, the nodeport code on the backend now creates its own CT_EGRESS entry. When such a CT_EGRESS entry is GC'ed, we should therefore also purge the related DSR NAT entry. Also add a test for this case. Signed-off-by: Julian Wiedmann <jwi@isovalent.com> Signed-off-by: Fabio Falzoi <fabio.falzoi@isovalent.com>
pippolo84
pushed a commit
to pippolo84/cilium
that referenced
this pull request
Oct 31, 2023
[ upstream commit 5b22423 ] DSR uses a OUT NAT entry for RevDNAT of backend replies. Prior to the changes in cilium#22978, this NAT entry was protected by the CT_INGRESS entry which bpf_lxc creates for the backend connection. Test that GC of the NAT entry works when the CT entry is removed. Signed-off-by: Julian Wiedmann <jwi@isovalent.com> Signed-off-by: Fabio Falzoi <fabio.falzoi@isovalent.com>
pippolo84
pushed a commit
to pippolo84/cilium
that referenced
this pull request
Oct 31, 2023
[ upstream commit 21072cd ] With cilium#22978 we changed how DSR NAT entries are managed. Instead of associating the NAT entry's lifetime with bpf_lxc's CT_INGRESS entry, the nodeport code on the backend now creates its own CT_EGRESS entry. When such a CT_EGRESS entry is GC'ed, we should therefore also purge the related DSR NAT entry. Also add a test for this case. Signed-off-by: Julian Wiedmann <jwi@isovalent.com> Signed-off-by: Fabio Falzoi <fabio.falzoi@isovalent.com>
aditighag
pushed a commit
that referenced
this pull request
Nov 2, 2023
[ upstream commit 5b22423 ] DSR uses a OUT NAT entry for RevDNAT of backend replies. Prior to the changes in #22978, this NAT entry was protected by the CT_INGRESS entry which bpf_lxc creates for the backend connection. Test that GC of the NAT entry works when the CT entry is removed. Signed-off-by: Julian Wiedmann <jwi@isovalent.com> Signed-off-by: Fabio Falzoi <fabio.falzoi@isovalent.com>
aditighag
pushed a commit
that referenced
this pull request
Nov 2, 2023
[ upstream commit 21072cd ] With #22978 we changed how DSR NAT entries are managed. Instead of associating the NAT entry's lifetime with bpf_lxc's CT_INGRESS entry, the nodeport code on the backend now creates its own CT_EGRESS entry. When such a CT_EGRESS entry is GC'ed, we should therefore also purge the related DSR NAT entry. Also add a test for this case. Signed-off-by: Julian Wiedmann <jwi@isovalent.com> Signed-off-by: Fabio Falzoi <fabio.falzoi@isovalent.com>
pippolo84
pushed a commit
to pippolo84/cilium
that referenced
this pull request
Nov 3, 2023
[ upstream commit 5b22423 ] DSR uses a OUT NAT entry for RevDNAT of backend replies. Prior to the changes in cilium#22978, this NAT entry was protected by the CT_INGRESS entry which bpf_lxc creates for the backend connection. Test that GC of the NAT entry works when the CT entry is removed. Signed-off-by: Julian Wiedmann <jwi@isovalent.com> Signed-off-by: Fabio Falzoi <fabio.falzoi@isovalent.com>
pippolo84
pushed a commit
to pippolo84/cilium
that referenced
this pull request
Nov 3, 2023
[ upstream commit 21072cd ] With cilium#22978 we changed how DSR NAT entries are managed. Instead of associating the NAT entry's lifetime with bpf_lxc's CT_INGRESS entry, the nodeport code on the backend now creates its own CT_EGRESS entry. When such a CT_EGRESS entry is GC'ed, we should therefore also purge the related DSR NAT entry. Also add a test for this case. Signed-off-by: Julian Wiedmann <jwi@isovalent.com> Signed-off-by: Fabio Falzoi <fabio.falzoi@isovalent.com>
jibi
pushed a commit
that referenced
this pull request
Nov 7, 2023
[ upstream commit 5b22423 ] DSR uses a OUT NAT entry for RevDNAT of backend replies. Prior to the changes in #22978, this NAT entry was protected by the CT_INGRESS entry which bpf_lxc creates for the backend connection. Test that GC of the NAT entry works when the CT entry is removed. Signed-off-by: Julian Wiedmann <jwi@isovalent.com> Signed-off-by: Fabio Falzoi <fabio.falzoi@isovalent.com>
jibi
pushed a commit
that referenced
this pull request
Nov 7, 2023
[ upstream commit 21072cd ] With #22978 we changed how DSR NAT entries are managed. Instead of associating the NAT entry's lifetime with bpf_lxc's CT_INGRESS entry, the nodeport code on the backend now creates its own CT_EGRESS entry. When such a CT_EGRESS entry is GC'ed, we should therefore also purge the related DSR NAT entry. Also add a test for this case. Signed-off-by: Julian Wiedmann <jwi@isovalent.com> Signed-off-by: Fabio Falzoi <fabio.falzoi@isovalent.com>
julianwiedmann
added a commit
to julianwiedmann/cilium
that referenced
this pull request
May 21, 2024
cilium#22978 added support for DSR RevDNAT at the native device-level. This was introduced in v1.14, and backported to v1.13.3. We kept the support in bpf_lxc for old-style DSR around a bit longer, to not break established connections. But with v1.16 it is about time to remove this legacy path. Signed-off-by: Julian Wiedmann <jwi@isovalent.com>
julianwiedmann
added a commit
to julianwiedmann/cilium
that referenced
this pull request
May 21, 2024
cilium#22978 added support for DSR RevDNAT at the native device-level. This was introduced in v1.14, and backported to v1.13.3. We kept the support in bpf_lxc for old-style DSR around a bit longer, to not break established connections. But with v1.16 it is about time to remove this legacy path. Signed-off-by: Julian Wiedmann <jwi@isovalent.com>
github-merge-queue bot
pushed a commit
that referenced
this pull request
May 21, 2024
#22978 added support for DSR RevDNAT at the native device-level. This was introduced in v1.14, and backported to v1.13.3. We kept the support in bpf_lxc for old-style DSR around a bit longer, to not break established connections. But with v1.16 it is about time to remove this legacy path. Signed-off-by: Julian Wiedmann <jwi@isovalent.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
backport-done/1.13
The backport for Cilium 1.13.x for this PR is done.
ready-to-merge
This PR has passed all tests and received consensus from code owners to merge.
release-note/bug
This PR fixes an issue in a previous release of Cilium.
sig/datapath
Impacts bpf/ or low-level forwarding details, including map management and monitor messages.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
(see partner PR #22756)
Replies by DSR service backends currently get their revDNAT processing in
from-container. There's two problems with that:
from-container program (ie. redirect to host proxy), and
This PR tackles the problem as follows:
to-netdev
path.local-backend
case). Use the DSR info to build a SNAT entry for RevDNAT of the backend replies.to-netdev
as well, but let's try that in a follow-on PR.Updated nodeport ingress diagram: