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

eBPF: don't create 2 BPF maps for each table - don't create separate default action table #4731

Open
Trigary opened this issue Jun 18, 2024 · 0 comments
Labels
ebpf Topics related to the eBPF back end enhancement This topic discusses an improvement to existing compiler code.

Comments

@Trigary
Copy link
Contributor

Trigary commented Jun 18, 2024

Currently, the eBPF compiler creates 2 BPF maps for each P4 table, where the second table is used just for the default action. This is sub-ideal when we consider the MAX_USED_MAPS BPF verifier constant: the current Linux kernel only allows defining at most 64 BPF maps [1] [2].

Creating 2 BPF maps per P4 table halves the maximum count of P4 tables that can be defined. To demonstrate, the limit of 64 BPF maps can be reached by defining e.g. 28 tables and 8 registers in the P4 source code.

@jafingerhut jafingerhut added enhancement This topic discusses an improvement to existing compiler code. ebpf Topics related to the eBPF back end labels Jun 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ebpf Topics related to the eBPF back end enhancement This topic discusses an improvement to existing compiler code.
Projects
None yet
Development

No branches or pull requests

2 participants