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

Enable bpf-masquerading on direct routing #349

Open
hown3d opened this issue Jun 20, 2024 · 0 comments · May be fixed by #350
Open

Enable bpf-masquerading on direct routing #349

hown3d opened this issue Jun 20, 2024 · 0 comments · May be fixed by #350
Labels
area/networking Networking related area/performance Performance (across all domains, such as control plane, networking, storage, etc.) related kind/enhancement Enhancement, improvement, extension

Comments

@hown3d
Copy link

hown3d commented Jun 20, 2024

How to categorize this issue?

/area networking
/area performance
/kind enhancement

What would you like to be added:
I would like to enable BPF masquerading for scenarios where direct routing (tunnel: disabled) is used.

Currently, BPF masquerading is disabled by default in this configuration, which forces the use of IPTables for masquerading and disables BPF host routing.

The request is to modify the configuration so that BPF masquerading can be used by default, unless SNAT masquerading (snatToUpstreamDNS & snatToUpstreamDNS) is enabled which creates IPTables rules in cilium init containers.

Why is this needed:
Enabling BPF masquerading allows the use of BPF host routing, which offers performance benefits and better leverages the advanced networking capabilities of BPF. The current behavior of disabling BPF masquerading requires using the legacy IPTables host routing mode.

Logs from cilium when enable-bpf-masquerade is missing in cilium-config

time="2024-06-20T08:35:33Z" level=info msg="Direct routing device detected" direct-routing-device=eth0 subsys=linux-datapath
time="2024-06-20T08:35:33Z" level=info msg="BPF host routing requires enable-bpf-masquerade. Falling back to legacy host routing (enable-host-legacy-routing=true)." subsys=daemon
@gardener-robot gardener-robot added area/networking Networking related area/performance Performance (across all domains, such as control plane, networking, storage, etc.) related kind/enhancement Enhancement, improvement, extension labels Jun 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/networking Networking related area/performance Performance (across all domains, such as control plane, networking, storage, etc.) related kind/enhancement Enhancement, improvement, extension
Projects
None yet
2 participants