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

Add a notion of max_member_weight for action profiles that use the SUM_OF_MEMBERS semantics. #396

Closed
jonathan-dilorenzo opened this issue Aug 5, 2022 · 4 comments

Comments

@jonathan-dilorenzo
Copy link
Contributor

With the SUM_OF_MEMBERS semantics, the maximum weight of individual members is no longer implied by the maximum weight of a group. However, probably most switches can't faithfully support arbitrary weights (or even up to the int32 type that we use to represent weights). I propose to change the SelectorSizeSemantics in action profiles to be a oneof where sum_of_members can contain its max_member_weight.

Ideally, sooner rather than later, since we just finished adding these semantics, so hopefully no one is using them yet.

@jonathan-dilorenzo
Copy link
Contributor Author

@antoninbas and @smolkaj, any thoughts on how to include this additional semantics in the annotation? Just @selector_size_semantics(SUM_OF_MEMBERS, )? Then we'd presumably want the same for SUM_OF_WEIGHTS? @selector_size_semantics(SUM_OF_WEIGHTS, <ignore this value?>)

@antoninbas
Copy link
Member

can't it be a different annotation that would be ignored if @selector_size_semantics is no SUM_OF_MEMBERS?

@jonathan-dilorenzo
Copy link
Contributor Author

Yupp, that sounds good too. I guess if no such annotation is provided, the field can be unset, which we would think of as allowing any 32-bit int?

@smolkaj
Copy link
Member

smolkaj commented Aug 5, 2022

Seems reasonable to me

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

3 participants