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] disable conntrack bypass, exclude link-local #9159

Merged
merged 1 commit into from
Oct 18, 2024

Conversation

tomastigera
Copy link
Contributor

@tomastigera tomastigera commented Aug 21, 2024

Given the fact that since kernel 5.9+ when FIB is enabled (always except if ipip is used) we always bypass iptables for forwarded traffic, we no longer have the confusing half-open conntrack entries because the first packet would sometimes go through host net stack and then the rest would bypass it. And since most deployments do not use kernels older than 5.9 it is not a common requirement to bypass conntrack. Therefore the default setting it not to do that. However, it is still possible to turn it on via bpfHostConntrackBypass. Some environments like MKE require this to be turned off to function correctly.

Also link-local addresses destinations should not be excluded.

fixes #9157

Description

Related issues/PRs

Todos

  • Tests
  • Documentation
  • Release note

Release Note

ebpf: disable conntrack bypass by default (not needed for kernels 5.9+), exclude link-local from the bypass

Reminder for the reviewer

Make sure that this PR has the correct labels and milestone set.

Every PR needs one docs-* label.

  • docs-pr-required: This change requires a change to the documentation that has not been completed yet.
  • docs-completed: This change has all necessary documentation completed.
  • docs-not-required: This change has no user-facing impact and requires no docs.

Every PR needs one release-note-* label.

  • release-note-required: This PR has user-facing changes. Most PRs should have this label.
  • release-note-not-required: This PR has no user-facing changes.

Other optional labels:

  • cherry-pick-candidate: This PR should be cherry-picked to an earlier release. For bug fixes only.
  • needs-operator-pr: This PR is related to install and requires a corresponding change to the operator.

@marvin-tigera marvin-tigera added this to the Calico v3.29.0 milestone Aug 21, 2024
@marvin-tigera marvin-tigera added release-note-required Change has user-facing impact (no matter how small) docs-pr-required Change is not yet documented labels Aug 21, 2024
@tomastigera tomastigera force-pushed the tomas-bpf-fix-notrack branch 2 times, most recently from 5f2b9cf to 966dba6 Compare August 28, 2024 04:50
@tomastigera tomastigera marked this pull request as ready for review August 29, 2024 18:58
@tomastigera tomastigera requested a review from a team as a code owner August 29, 2024 18:58
@tomastigera tomastigera added docs-not-required Docs not required for this change and removed docs-pr-required Change is not yet documented labels Aug 29, 2024
@tomastigera tomastigera force-pushed the tomas-bpf-fix-notrack branch from 3176362 to b77e4f3 Compare September 3, 2024 17:29
Given the fact that since kernel 5.9+ when FIB is enabled (always except
if ipip is used) we always bypass iptables for forwarded traffic, we no
longer have the confusing half-open conntrack entries because the first
packet would sometimes go through host net stack and then the rest would
bypass it. And since most deployments do not use kernels older than 5.9
it is not a common requirement to bypass conntrack. Therefore the
default setting it not to do that. However, it is still possible to turn
it on via bpfHostConntrackBypass. Some environments like MKE require
this to be turned off to function correctly.

Also link-local addresses destinations should not be excluded.

fixes projectcalico#9157
@tomastigera tomastigera force-pushed the tomas-bpf-fix-notrack branch from b77e4f3 to 02a1c33 Compare October 16, 2024 20:01
@tomastigera tomastigera merged commit dfc45a0 into projectcalico:master Oct 18, 2024
3 checks passed
@tomastigera tomastigera deleted the tomas-bpf-fix-notrack branch October 18, 2024 22:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs-not-required Docs not required for this change release-note-required Change has user-facing impact (no matter how small)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incompatibility between Istio ambient mode readiness probes and Calico eBPF dataplane
4 participants