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

Fix bmv2 backend crash for unused action selectors #575

Merged
merged 1 commit into from
May 8, 2017

Conversation

antoninbas
Copy link
Member

When an action selector is declared as a control local but never
referenced by a table, the compiler cannot figure out the selector
input, which means the action selector cannot be included in the bmv2
JSON.

@antoninbas antoninbas requested a review from mihaibudiu May 5, 2017 23:31
Copy link
Contributor

@mihaibudiu mihaibudiu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see a test with an unused selector, it would be nice to have one. The -stderr file should contain the appropriate warning.


action drop() { smeta.drop = 1; }

action_selector (HashAlgorithm.identity, 32w1024, 32w10) as;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is the unused selector?

When an action selector is declared as a control local but never
referenced by a table, the compiler cannot figure out the selector
input, which means the action selector cannot be included in the bmv2
JSON.
@antoninbas
Copy link
Member Author

@mbudiu-vmw my bad I pushed the wrong test file. I fixed it.

@antoninbas
Copy link
Member Author

@mbudiu-vmw could you update your review for this?

@antoninbas antoninbas merged commit f1f0bd0 into master May 8, 2017
@antoninbas antoninbas deleted the bmv2-unused-selector-fix branch May 8, 2017 18:08
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

Successfully merging this pull request may close these issues.

2 participants