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

Make sure we have guards on header validity for all tables #102

Closed
ccascone opened this issue Oct 5, 2020 · 1 comment · Fixed by #234
Closed

Make sure we have guards on header validity for all tables #102

ccascone opened this issue Oct 5, 2020 · 1 comment · Fixed by #234
Labels
good first issue Good for newcomers

Comments

@ccascone
Copy link
Member

ccascone commented Oct 5, 2020

Like we did for issue #97 in PR #99, we should verify that we have guards on header validity in all other tables of the pipeline.

I wish the compiler would be capable of emitting warnings for such conditions.

@ccascone ccascone changed the title Make sure we have a check on header validity for all match tables Make sure we have guards on header validity for all tables Oct 5, 2020
@ccascone
Copy link
Member Author

ccascone commented Mar 3, 2021

We added some guards in #194 for the obvious cases.

We should make sure to add some protection for tables using ternary match like the ACL one by either:

  • Adding hdr.isValid() to the match key and making sure the control plane sets that appropriately. E.g, table { key {ipv4.isValid(): ternary; hdr.ipv4.src: ternary; ... } }; or
  • Matching on metadata that is properly initialized before applying the table, instead of matching directly on headers. E.g., in the ACL table use the following to match on the IPV4 source address lkp_ipv4_src = hdr.ipv4.isValid() ? hdr.ipv4.src : 0.

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

Successfully merging a pull request may close this issue.

1 participant