Skip to content
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

Merged
5 commits merged into from
Aug 22, 2018
Merged

Conversation

ghost
Copy link

@ghost ghost commented Aug 17, 2018

No description provided.

@@ -264,6 +265,16 @@ message Action {
repeated Param params = 4;
}

message ActionProfileActions {
repeated ActionProfileAction action_profile_action = 1;
Copy link
Contributor

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.

Copy link
Author

Choose a reason for hiding this comment

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

Done.

`ActionProfileMember` and `ActionProfileGroup` messages. Programming
some entries with one shots, and other entries with
`ActionProfileMember` and `ActionProfileGroup` messages is not
allowed.
Copy link
Contributor

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?

Copy link
Author

Choose a reason for hiding this comment

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

Done.

`ActionProfileMember` and `ActionProfileGroup` messages. Programming
some entries with one shots, and other entries with
`ActionProfileMember` and `ActionProfileGroup` messages is not
allowed.
Copy link
Contributor

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?

Copy link
Member

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.

Copy link
Author

Choose a reason for hiding this comment

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

Done.

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
Copy link
Member

Choose a reason for hiding this comment

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

typo: "can be programmed"

Copy link
Author

Choose a reason for hiding this comment

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

Done.

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
Copy link
Member

Choose a reason for hiding this comment

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

typo: "s/advanatage/advantage"

Copy link
Author

Choose a reason for hiding this comment

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

Done.


* `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.
Copy link
Member

Choose a reason for hiding this comment

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

typo, extra "the"

Copy link
Author

Choose a reason for hiding this comment

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

Done.

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
Copy link
Member

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

Copy link
Author

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.

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
Copy link
Member

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)


For example, consider again the action selector defined in the
beginning of this section. This table could be programmed with the
following oneshot update:
Copy link
Member

Choose a reason for hiding this comment

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

"s/oneshot/one shot"

Copy link
Author

Choose a reason for hiding this comment

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

Done.

`ActionProfileMember` and `ActionProfileGroup` messages. Programming
some entries with one shots, and other entries with
`ActionProfileMember` and `ActionProfileGroup` messages is not
allowed.
Copy link
Member

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.

Copy link
Member

@antoninbas antoninbas left a 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*.
Copy link
Member

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"

@ghost ghost merged commit 1805878 into master Aug 22, 2018
@ghost ghost deleted the oneshot branch August 22, 2018 20:33
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants