-
Notifications
You must be signed in to change notification settings - Fork 98
Support weights_determined_by_switch
field in P4Info
#563
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Matthew Lam <[email protected]>
Signed-off-by: Matthew Lam <[email protected]>
Please provide a summary description, thanks. |
weights_determined_by_switch
field in P4Info
Signed-off-by: Matthew Lam <[email protected]>
Other design considerations that we had include:
Other questions
EDIT: changed the link to reference P4C version |
@matthewtlam you shared an internal Google link You could introduce a standard P4Runtime annotation to control whether that boolean should be set in the P4Info (similar to |
Thanks @antoninbas! That would be our suggestion if we want to do this boolean approach. The main question, I think, would be if there is something more expressive we might want to put here instead, though I can't immediately think of other ways in which the hash algorithm might affect what the controller programs... I suppose a 'per-group' hash algorithm (including "You choose weights") would be a way to go (as we sort of discussed on Angela's PR), but I don't actually know of any switch with close to that expressive power ;). |
"switch using its own hash algorithm to determine the weights" |
} | ||
|
||
// dictates whether the controller can specify weights for groups programmed | ||
// in this ActionProfile. If `weights_determined_by_switch`, then all weights |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"If weights_determined_by_switch
, seems like an incomplete phrase."
How about "If weights_determined_by_switch
is true"
The switch has its own hash algorithm that already exists (ex. CRC, Identity, etc.). Traditionally, these are not defined in the P4Info in any way since it doesn’t affect the program.
We wish to introduce this new field ,
weights_determined_by_switch
, to the P4Info to denote to the control plane that programming will have no effects on the weights. We wish to leverage the switch using its own hash algorithm to determine the weights.cc: @jonathan-dilorenzo, @smolkaj for vis