Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions p4-16/psa/PSA.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2437,6 +2437,30 @@ to select a member from the group, and the action specification
corresponding to that member is applied. The dynamic selection algorithm is
specified as a parameter when instantiating the action selector.

==== Group Actions

This feature is currently supported only for P4Runtime{P4RuntimeAPI}
one-shot action selector programming.

A group may be configured with a _group action_ that executes logically before

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Is _group action_ a formatting thing?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

According to AsciiDoc documentation, it is used to make the enclosed text italic: https://docs.asciidoctor.org/asciidoc/latest/syntax-quick-reference/

the selected member action. An action used as a group action must be annotated
with `@groupaction`.

As specified in the P4Runtime specification, attempting to use an action
annotated with `@groupaction` as a table entry action or as a table default
action must fail and return an appropriate error status.

An action that is not annotated with `@groupaction` must not be used as a
group action.

The `@groupaction` annotation is not allowed in combination with `@tableonly`
or `@defaultonly`. (For the semantics of `@tableonly` and `@defaultonly`,
see the P4 language specification.)

Because an action cannot be used both as a group action and as a table entry
or default action, a P4 program that requires equivalent behavior in multiple
contexts must define separate actions for each context.

Action selector members may only specify action types defined in the
`actions` attribute of the implemented table.

Expand Down Expand Up @@ -3723,6 +3747,23 @@ statement inside of the action `set_output_port`, but this is not
required by PSA.


[appendix]
[#appendix-psa-reserved-annotations]
== PSA Reserved Annotations

The following table shows PSA-specific reserved annotations. For P4 language
reserved annotations such as `@tableonly` and `@defaultonly`, refer to the
P4 language specification.

[.center,cols="1,3,1",width=100%]
|===
| Annotation | Purpose | See Section

| `@groupaction` | Action can only be used as an ActionSelector group action | <<sec-action-selector>>

|===


[appendix]
[#appendix-revision-history]
== Revision History
Expand Down
Loading