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

p4c-bm2-ss warns both with and without default action on table with action selector #678

Closed
tomrodeheffer opened this issue May 27, 2017 · 2 comments
Labels
duplicate This issue or pull request is a duplicate. fixed This topic is considered to be fixed.

Comments

@tomrodeheffer
Copy link

I wrote the following P4_16 program to check out the json for a table with action selector: asel1.p4.txt
But p4c-bm2-ss complains about the default_action in the table:

p4c-bm2-ss asel1.p4 -o out/asel1.json
asel1.p4(31): warning: Target does not support default_action for tbl (due to action profiles)
    table tbl {
          ^^^

So I took out the default_action on that table, producing the P4_16 program: asel2.p4.txt
But now p4c-bm2-ss complains that the table does not have a default_action:

p4c-bm2-ss asel2.p4 -o out/asel2.json
asel2.p4(31): warning: Table tbl does not have an `default_action' property
    table tbl {
          ^^^

It looks like there is no way to win this argument. Fortunately, these messages are only warnings, and the bmv2 json is produced in either case, being identical except for things like source file and line number. But there ought to be a way to write the P4_16 code so as to not generate any warnings.

@mihaibudiu
Copy link
Contributor

See issue #27: BMv2 does not support setting the default action for tables with action profiles.
I have just merged #653, which will remove the warning about the missing default_action, bringing the compiler in line with the spec. However, the other warning will still be there, because this feature is not really supported. So I will tag this issue as a duplicate of #27.

@mihaibudiu mihaibudiu added the duplicate This issue or pull request is a duplicate. label May 30, 2017
@mihaibudiu
Copy link
Contributor

Can we assume that this issue is fixed and can be closed?

@mihaibudiu mihaibudiu added the fixed This topic is considered to be fixed. label Oct 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request is a duplicate. fixed This topic is considered to be fixed.
Projects
None yet
Development

No branches or pull requests

2 participants