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

example adding static table entries? #1968

Open
maxholli opened this issue Jun 13, 2019 · 3 comments
Open

example adding static table entries? #1968

maxholli opened this issue Jun 13, 2019 · 3 comments
Labels
ebpf Topics related to the eBPF back end question This is a topic requesting clarification.

Comments

@maxholli
Copy link

Hi, I'm using p4c-ebpf and I'd like to add static table entries. Are there any example .json or .txt files that I can model the formatting off of when using --p4runtime-entries-files. Thanks for the help

@mihaibudiu
Copy link
Contributor

The ebpf code cannot be used with p4runtime.

It should not be difficult to add support for static table entries if it is not there yet.

@mihaibudiu mihaibudiu added the enhancement This topic discusses an improvement to existing compiler code. label Jun 13, 2019
@mihaibudiu
Copy link
Contributor

Let's keep this open, and hopefully I can do the work to support static table entries next week.

@jafingerhut jafingerhut added the ebpf Topics related to the eBPF back end label Jun 20, 2019
@mihaibudiu
Copy link
Contributor

In fact, the ebpf back-end should already emit table intializers.
The ebpf back-end does not use p4runtime; the control-plane is implemented by writing directly to ebpf maps. The back-end generates a header file that contains the initial values of tables; this function is called init_tables(), and it should be called first (ideally before any packets are processed).

@mihaibudiu mihaibudiu added question This is a topic requesting clarification. and removed enhancement This topic discusses an improvement to existing compiler code. labels Jun 20, 2019
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 question This is a topic requesting clarification.
Projects
None yet
Development

No branches or pull requests

3 participants