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

hostfw: scalability issue due to BPF connection tracking for overlay traffic #32335

Open
julianwiedmann opened this issue May 3, 2024 · 0 comments
Labels
area/host-firewall Impacts the host firewall or the host endpoint. feature/conntrack kind/performance There is a performance impact of this. pinned These issues are not marked stale by our issue bot. sig/datapath Impacts bpf/ or low-level forwarding details, including map management and monitor messages.

Comments

@julianwiedmann
Copy link
Member

julianwiedmann commented May 3, 2024

In the context of #31082, @qmonnet spotted that the Host Firewall code in to-netdev currently treats all overlay traffic as "host-originating", and thus creates CT entries for every VXLAN / GENEVE connection.

These CT entries are meant to enable policy-bypass for reply traffic - but due to how VXLAN / GENEVE work, this doesn't make sense (replies are addressed to the TUNNEL_PORT, not to the initial source port). Instead, the inbound path in from-netdev just creates another pair of CT entries.

All these additional CT entries can result in scalability concerns for the BPF conntrack map - potential LRU evictions, additional overhead when running GC on the map etc.

Proposal
For the outbound path, we could

  1. transport a different identity, and completely bypass the HostFW path.
  2. or use ctx_is_overlay() to apply policy, but then skip the CT entry creating.
@julianwiedmann julianwiedmann added sig/datapath Impacts bpf/ or low-level forwarding details, including map management and monitor messages. kind/performance There is a performance impact of this. pinned These issues are not marked stale by our issue bot. area/host-firewall Impacts the host firewall or the host endpoint. feature/conntrack labels May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/host-firewall Impacts the host firewall or the host endpoint. feature/conntrack kind/performance There is a performance impact of this. pinned These issues are not marked stale by our issue bot. sig/datapath Impacts bpf/ or low-level forwarding details, including map management and monitor messages.
Projects
None yet
Development

No branches or pull requests

1 participant