@@ -663,8 +663,8 @@ attributes for these objects are:
663
663
- ` false_next ` : the name of the next control flow to execute if the condition
664
664
evaluates to false, or null if this is the end of the pipeline
665
665
- ` action_calls ` : a JSON array of JSON objects. It is used for direct action
666
- calls from a control flow which are not wrapped into a table. The attributes for
667
- these objects are:
666
+ calls from a control flow which are not wrapped into a table. See Note 1 below.
667
+ The attributes for these objects are:
668
668
- ` name `
669
669
- ` id ` : a unique integer; note that it has to be unique with respect to * all*
670
670
action calls in the JSON file, not just the ones included in this pipeline
@@ -675,6 +675,16 @@ these objects are:
675
675
table, a conditional or another action call like this one), or null if this is
676
676
the last node in the pipeline
677
677
678
+ Note 1: p4c has never created JSON files with ` action_calls ` in them.
679
+ Instead, for any call to action ` a ` within the body of a control, the
680
+ compiler converts that call into applying a "dummy table" that has the
681
+ same effect. A dummy table is one synthesized by the compiler. A
682
+ dummy table is not visible to the control plane, has no key fields,
683
+ and thus can never have table entries added to it, and will always get
684
+ a miss every time it is applied, and execute its default action. A
685
+ dummy table has a const default action that is equal to the action ` a `
686
+ in the original source code that it is replacing.
687
+
678
688
The ` match_type ` for the table needs to follow the following rules:
679
689
- If one match field is ` range ` , the table ` match_type ` has to be ` range `
680
690
- If one match field is ` ternary ` , the table ` match_type ` has to be ` ternary `
0 commit comments