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

Does P4Runtime API server within infrap4d plus P4-DPDK support tables with range match_kind for table keys? #424

Open
jafingerhut opened this issue Feb 25, 2024 · 4 comments

Comments

@jafingerhut
Copy link

I ask because when I tried adding an entry to such a table using a P4runtime API client connecting to infrap4d, it got a return error status back. When I tried the same P4 program with the only change being to change the range match_kind to exact, I was able to successfully add table entries.

@jafingerhut
Copy link
Author

Note: I was testing with infrap4d built as part of the IPDK network container, built according to the published instructions. As of 2024-Feb-20, those instructions seem to build the 23.07 version, not the 24.01 version.

@habibur4340
Copy link

Hey @jafingerhut
The P4Runtime API server within Infrap4d and P4-DPDK supports tables with range match_kind for table keys, enabling flexible packet matching based on ranges. This feature is crucial for implementing advanced network functions that require matching on a continuum of values, rather than exact or binary matches. Ensure your Infrap4d and P4-DPDK setups are up to date to leverage this capability effectively. For comprehensive API testing and validation, consider using Apidog, which offers robust tools for API simulation, monitoring, and testing, enhancing your development workflow.

@jafingerhut
Copy link
Author

This test P4 program should be just about the smallest difference between two simple P4 programs that demonstrates that with IPDK networking container v23.07, if you attempt to add an entry to a table with a key having match kind range via the P4Runtime API, the entry fails to add. With the same program except range changed to exact, everything appears to be working correctly: https://github.com/jafingerhut/p4-guide/tree/master/ipdk/testprog3

@jafingerhut
Copy link
Author

I have heard that P4 DPDK should support range match kind, with the restriction that at run time, the only ranges that can be installed are ones that are "power of 2 aligned", i.e. those ranges that can be matched by a single ternary value/mask, with exact match on some number of consecutive most significant bits, and wildcard on all the rest of the bits. I will test that to see if the P4Runtime API server for P4 DPDK supports such ranges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants