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
API for KV-tables #2739
base: main
Are you sure you want to change the base?
API for KV-tables #2739
Conversation
@mbudiu-vmw I was reminded of this PR in an Intel-internal discussion, and we may want to use a variant of one of these extern objects you propose, one that does not need the One variant of this could be restricted to only have exact match key fields, but in looking at your proposed extern object definition that takes a list of match_kind values, do you have an example instantiation of such an extern object that would use match_kind values other than |
We should write some tests. Your question is really independent on the patch, it would even apply to cases like:
This should in principle work, but if it doesn't we may need to tweak the grammar. |
The program named v1model_valuelut_matchkinds2.p4 in the attached ZIP file fails to compile with the latest p4test, and contains several commented-out lines that also fail to compile. There might be some variation I have not tried that works, but if so, I am not sure what it would be. The attached code includes a slightly different definition of a ValueExactLookupTable that avoids the issue, but is intended to be restricted to all |
perhaps you should file that as a new issue... It will get lost here. At least if we expect the program to compile. |
Created this issue: #3091 @mbudiu-vmw It would be wonderful if you could take a look at the example program and compile-time error messages attached to that issue, and see whether you think these look like they raise questions for the LDWG, or if they are perhaps easily-enhanced things in the existing compiler implementation. |
Marking as draft PR, since this needs support for unions.
To be accompanied by support in the compiler for some back-ends and test cases.