p4lang / p4runtime

Specification documents for the P4Runtime control-plane API
Apache License 2.0
142 stars 88 forks source link

Semantics of max_group_size > size in Action Selectors. #355

Open jonathan-dilorenzo opened 3 years ago

jonathan-dilorenzo commented 3 years ago

As discussed with @smolkaj, it seems clear from the ActionProfile spec that the max_group_size, which denotes the maximum total weight of members within a single group, should never be greater than the size, which denotes the maximum total weight of members across ALL groups, in an Action Selector.

However, I can't find anything in the spec that explicitly disallows this or tells me what error should be thrown. I think that this fact is probably a bug in the spec?

jonathan-dilorenzo commented 3 years ago

Relatedly, it also does not seem to make sense to have size <= 0, so perhaps that should also be explicitly disallowed. The combination of these two conveniently means that max_group_size >= 0.