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

Clarify if ReadResponse can/should contain duplicates or not #479

Closed
smolkaj opened this issue May 10, 2024 · 2 comments
Closed

Clarify if ReadResponse can/should contain duplicates or not #479

smolkaj opened this issue May 10, 2024 · 2 comments

Comments

@smolkaj
Copy link
Member

smolkaj commented May 10, 2024

Forking off from #476.

The following is a valid read request:

device_id: <ID>
entities {
  table_entry { }  # read all table entries for all tables
}
entities {
  table_entry { }  # read all table entries for all tables
}

Should this read all table entries twice or just a single time? The spec doesn't seem to specify which one we want at the moment.

@jonathan-dilorenzo
Copy link
Contributor

It seems to be allowed, but not required to contain duplicates if there are overlapping requests. This is the relevant paragraph from section 13.3.1:

The P4Runtime server is not required to perform any optimization (e.g. merge two requests in the batch if one is a subset of other). As a result of this, it is possible for the ReadResponse to contain the same entity more than once. If performance is a concern, the P4Runtime client should handle this merging.

@smolkaj
Copy link
Member Author

smolkaj commented May 10, 2024

Thanks for the clarification, closing the issue.

@smolkaj smolkaj closed this as completed May 10, 2024
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