-
Notifications
You must be signed in to change notification settings - Fork 0
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
Does current table_executor
consider default action reachability?
#54
Comments
This is a bug in the dead code eliminator, less so in the analysis. It used to be the case that only NoAction was removed, but we should instead substitute the apply call with the default action instead if a table is removed. |
I see. I found that |
Yes, we basically retrieve the default action from the table. We can check whether the body is empty, too. |
Great. I will submit a pr to fix this. |
The current implementation of table_executor adds reachability for each action here. But the expression
actionHitCondition
is constructed withnew IR::LAnd(hitCondition, actionChoice)
, wherehitCondition
is for key matching andactionChoice
is for action name.But for default actions, shall we add something like "if none of the actions matched, the default action will be reached"?
The reason I am thinking of this is that I noticed the removing for tna_operations.p4 looks incorrect. For example, if a packet misses on table
forward
, it should be dropped by executing default actionmiss
. But sinceforward.apply()
is removed, it won't be dropped.The text was updated successfully, but these errors were encountered: