Skip to content
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: fix up trace point in to-overlay NAT paths #24886

Merged
merged 1 commit into from Apr 18, 2023

Conversation

julianwiedmann
Copy link
Member

We have a number of cases (EgressGW, DSR-GENEVE) where the to-overlay program is used even when the cluster is in native routing mode.

But the trace points inside handle_nat_fwd() currently only report TRACE_TO_OVERLAY iff called from IS_BPF_OVERLAY and routing-mode=tunnel. Thus when in native routing mode, we get misleading trace notifications from inside to-overlay that report TRACE_TO_NETWORK.

Fix this by only checking for IS_BPF_OVERLAY when selecting the obs_point.

We have a number of cases (EgressGW, DSR-GENEVE) where the to-overlay
program is used even when the cluster is in native routing mode.

But the trace points inside handle_nat_fwd() currently only report
TRACE_TO_OVERLAY iff called from IS_BPF_OVERLAY *and* routing-mode=tunnel.
Thus when in native routing mode, we get misleading trace notifications
from inside to-overlay that report TRACE_TO_NETWORK.

Fix this by only checking for IS_BPF_OVERLAY when selecting the obs_point.

Signed-off-by: Julian Wiedmann <jwi@isovalent.com>
@julianwiedmann julianwiedmann added kind/bug This is a bug in the Cilium logic. sig/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 Apr 14, 2023
@julianwiedmann
Copy link
Member Author

/test

@julianwiedmann julianwiedmann marked this pull request as ready for review April 14, 2023 09:05
@julianwiedmann julianwiedmann requested a review from a team as a code owner April 14, 2023 09:05
@pchaigno pchaigno requested review from YutaroHayakawa and removed request for NikAleksandrov April 18, 2023 10:26
@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 Apr 18, 2023
@julianwiedmann julianwiedmann merged commit 8b6aa6e into cilium:main Apr 18, 2023
58 checks passed
@julianwiedmann julianwiedmann deleted the 1.14-bpf-overlay-trace branch April 18, 2023 18:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug This is a bug in the Cilium logic. 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants