psa: document @groupaction annotation for ActionSelector groups - #1417
Conversation
Signed-off-by: Sanketjadhav31 <sj546400@gmail.com>
matthewtlam
left a comment
There was a problem hiding this comment.
Thanks for a nice first attempt @Sanketjadhav31. The language and semantics of this is a bit tricky
| 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 |
There was a problem hiding this comment.
Is _group action_ a formatting thing?
There was a problem hiding this comment.
According to AsciiDoc documentation, it is used to make the enclosed text italic: https://docs.asciidoctor.org/asciidoc/latest/syntax-quick-reference/
| with `@groupaction`. | ||
|
|
||
| An action annotated with `@groupaction` may only be used as a group action. It | ||
| must not be used as a table entry action or as a table default action. |
There was a problem hiding this comment.
Maybe we should make it explicit since english is not an obvious language. But we would say it cannot be used as a table entry and cannot be used a a table default action. The other way could be misinterpreted depending on the brackets or how the user reads it
There was a problem hiding this comment.
Perhaps the following might be more explicit, as a suggested replacement for the last sentence in the paragraph above?
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.
There was a problem hiding this comment.
+1 to what the suggestion replacement
| or `@defaultonly`. (For the semantics of `@tableonly` and `@defaultonly`, | ||
| see the P4 language specification.) | ||
|
|
||
| Because a single named action cannot be used both as a group action and as |
There was a problem hiding this comment.
It also seems clear to simply say "Because an action ..." with no adjectives before "action"
|
@jfingerh PTAL to see if we have the same understanding |
Signed-off-by: Sanketjadhav31 <sj546400@gmail.com>
|
@matthewtlam Please take a look at the most recent version to see if you approve. |
Summary
Documents the
@groupactionannotation in the PSA specification for use with ActionSelector group actions in P4Runtime one-shot action selector programming.The feature was added to P4Runtime, and the follow-up discussion concluded that this annotation is architecture-specific and should be documented in the PSA specification rather than the base P4 language specification.
Changes
Group Actionssubsection to PSA Section 8.12,Action Selector.@groupactionas required for group actions and restricts it to group-action use only.@groupactioncannot be combined with@tableonlyor@defaultonly.PSA Reserved Annotationsappendix entry for@groupaction.Validation
git diff --checkmake -C p4-16/psaThe build completed successfully. The environment emitted optional dependency warnings for
rougeandprawn-gmagick; these do not affect this documentation change.Related
group_actionfield in ActionProfileActionSet p4runtime#594