-
Notifications
You must be signed in to change notification settings - Fork 90
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
Extending the spec with one shot action selector programming #42
Conversation
proto/p4/v1/p4runtime.proto
Outdated
@@ -264,6 +265,16 @@ message Action { | |||
repeated Param params = 4; | |||
} | |||
|
|||
message ActionProfileActions { | |||
repeated ActionProfileAction action_profile_action = 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Per protobuf style guide, repeated field names should be plural.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
docs/v1/P4Runtime-Spec.mdk
Outdated
`ActionProfileMember` and `ActionProfileGroup` messages. Programming | ||
some entries with one shots, and other entries with | ||
`ActionProfileMember` and `ActionProfileGroup` messages is not | ||
allowed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What error message does server produce in this case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
docs/v1/P4Runtime-Spec.mdk
Outdated
`ActionProfileMember` and `ActionProfileGroup` messages. Programming | ||
some entries with one shots, and other entries with | ||
`ActionProfileMember` and `ActionProfileGroup` messages is not | ||
allowed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is a server free to support only the one-shot method?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would say yes, the spec should say that
- a server MUST support the one shot method
- it is recommended for a server to support both methods
I think the "MUST" for the first bullet point is justified by the fact that if you support the id-based method there is no reason not to be able to support the one shot method.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
docs/v1/P4Runtime-Spec.mdk
Outdated
P4Runtime supports syntactic sugar to program a table, which is | ||
implemented with an action selector, in one shot. This means that a | ||
table entry, an action profile group, and a set of action profile | ||
members can programmed with a single update message. Using one shots |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo: "can be programmed"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
docs/v1/P4Runtime-Spec.mdk
Outdated
implemented with an action selector, in one shot. This means that a | ||
table entry, an action profile group, and a set of action profile | ||
members can programmed with a single update message. Using one shots | ||
has the advanatage that the controller does not need to keep track of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo: "s/advanatage/advantage"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
docs/v1/P4Runtime-Spec.mdk
Outdated
|
||
* `watch` is the controller defined 32-bit port number that the | ||
action's liveness depends on. At runtime, the action must be | ||
excluded from selection if the this watch port is down. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo, extra "the"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
docs/v1/P4Runtime-Spec.mdk
Outdated
excluded from selection if the this watch port is down. | ||
|
||
Semantically, one shots are equivalent to programming the table entry, | ||
group, and members individually. The necessary group id and member ids |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wouldn't say necessary, it's just one possible / likely way of implementing it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I meant for the "The necessary ids ..." to be part of the semantics. I've changed the text to clarify this.
docs/v1/P4Runtime-Spec.mdk
Outdated
are bound to unused ids. | ||
|
||
For example, consider again the action selector defined in the | ||
beginning of this section. This table could be programmed with the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add a reference to the code block instead to be clearer (see http://madoko.org/reference.html#sec-ids-labels)
docs/v1/P4Runtime-Spec.mdk
Outdated
|
||
For example, consider again the action selector defined in the | ||
beginning of this section. This table could be programmed with the | ||
following oneshot update: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"s/oneshot/one shot"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
docs/v1/P4Runtime-Spec.mdk
Outdated
`ActionProfileMember` and `ActionProfileGroup` messages. Programming | ||
some entries with one shots, and other entries with | ||
`ActionProfileMember` and `ActionProfileGroup` messages is not | ||
allowed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would say yes, the spec should say that
- a server MUST support the one shot method
- it is recommended for a server to support both methods
I think the "MUST" for the first bullet point is justified by the fact that if you support the id-based method there is no reason not to be able to support the one shot method.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, @wmohsin do you want to take a look?
|
||
A P4Runtime server *must* support the one shot style of programming | ||
tables with an action selector implementation. Support for the | ||
`ActionProfileMember` and `ActionProfileGroup` style is *optional*. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think "optional" is too weak, I would prefer "recommended"
No description provided.