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

Enable support for table property default_action for all v1model table types #5104

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

jafingerhut
Copy link
Contributor

including those with property implementation equal to action_profile or action_selector.

Historical note: p4c disabled support for default_action on these kinds of tables in 2016, with a comment that behavioral-model did not support it at that time. Support was added to behavioral-model in 2018, but it appears no one has tried to enable it in the p4c bmv2 backend before now.

…e types

including those with property implementation equal to action_profile or
action_selector.

Historical note: p4c disabled support for default_action on these
kinds of tables in 2016, with a comment that behavioral-model did not
support it at that time.  Support was added to behavioral-model in
2018, but it appears no one has tried to enable it in the p4c bmv2
backend before now.

Signed-off-by: Andy Fingerhut <[email protected]>
Signed-off-by: Andy Fingerhut <[email protected]>
Signed-off-by: Andy Fingerhut <[email protected]>
@jafingerhut
Copy link
Contributor Author

jafingerhut commented Jan 19, 2025

Some tests are failing, because tables in v1model with const default_action that are indirect, i.e. have implementation equal to action_profile or action_selector, give error with current version of BMv2 that it does not support const on default_action for such tables. I don't think this should be limited in this way, and have created a behavioral-model PR that allows this, here: p4lang/behavioral-model#1290

On further testing and code examination, it appears to be significantly more work to enhance p4c, behavioral-model, and the P4Runtime API to achieve what I initially thought was tiny. See some details here: p4lang/behavioral-model#1290 (comment)

I am putting this PR in Draft mode for now, and may consider simply closing it rather than attempting to finish such an enhancement. Someone else should feel free to take on the enhancement if they are interested.

@jafingerhut jafingerhut marked this pull request as draft January 19, 2025 19:00
@fruffy fruffy added the bmv2 Topics related to BMv2 or v1model label Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bmv2 Topics related to BMv2 or v1model
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants