Skip to content

Conversation

@jonathan-dilorenzo
Copy link
Contributor

Specifically, clarify that P4Runtime clients are only discouraged from sending ActionProfile members with duplicate actions when using the sum_of_weights group size calculation, since the same may literally not be achievable using the weight field otherwise.

Specifically, clarify that P4Runtime clients are only discouraged from sending ActionProfile members with duplicate actions when using the `sum_of_weights` group size calculation, since the same may literally not be achievable using the `weight` field otherwise.

Signed-off-by: Jonathan DiLorenzo <[email protected]>
@smolkaj
Copy link
Member

smolkaj commented Jul 10, 2025

since the same may literally not be achievable using the weight field otherwise.

Could you provide a concrete example? I may be slow to understand, but I'm not seeing it.

@smolkaj
Copy link
Member

smolkaj commented Jul 11, 2025

Did you by any chance sum_of_members rather than sum_of_weights?

inserted. Therefore, 3 distinct `WriteRequest` batches are required.

It is possible to include several `ActionProfileAction` messages with the same
exact `action` specification in one `ActionProfileActionSet` message. However,
Copy link
Member

@smolkaj smolkaj Aug 8, 2025

Choose a reason for hiding this comment

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

From P4 API WG: Let's discuss the two cases (sum of members and sum of weights separtely) to make this clearer, and ideally include an example for each.

Suggested phrasing:

  • For sum_of_members, this can be useful <reason>
    <example>
  • For sum_of_weights, this is allowed but discouraged, because such ... can always be collapsed into a single message, like so:
    <example>

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