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

Question: Does P4Runtime modify action on table entries allow modifying some but not all parameters of an action? #376

Open
jafingerhut opened this issue Feb 16, 2022 · 3 comments

Comments

@jafingerhut
Copy link
Contributor

I will answer this question myself soon if someone does not respond within a few days, but wanted to see if someone knew off the top of their head.

Suppose you add an entry to a table with key K, action A1 with 5 parameters, and parameters values (v1, v2, v3, v4, v5).

Does a P4Runtime API modify operation support the ability to modify that entry with key K, with the action remaining A1, and specifying only one of the parameters, e.g. only the 2nd one, overwriting the current value of v2 with v2b, but leaving the other 4 parameter values unchanged?

My guess is that the answer according to the current P4Runtime spec is no, this is not supported. If you want to modify an existing entry, the message must specify new values for all parameters.

@jafingerhut
Copy link
Contributor Author

OK, that was quicker than I expected. I believe the correct answer is "no", based upon this text in Section 9.1.2 "Action Specification":

"The P4Runtime client must provide a valid value for each parameter of the P4 action; we do not support default values for action parameters. The server must return an INVALID_ARGUMENT error code if a parameter id is missing, if an extra parameter — id not found in the P4Info — was provided by the client, if a parameter value is missing, or if the value provided for one of the parameters does not conform to the Bytestrings format."

@jfingerh
Copy link

jfingerh commented Nov 6, 2022

@jameschoi I will ping you on several public p4runtime issues to call your attention to them. For others, sorry for the comment noise.

@jafingerhut
Copy link
Contributor Author

This issue is at least related to #433 but depending upon the precise desires of the other issue, might not be the same issue.

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

No branches or pull requests

2 participants