-
Notifications
You must be signed in to change notification settings - Fork 82
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
PSA Add extern to make switch port status readable to P4 programs #709
Comments
To flesh out one possible approach on this issue: You call some new extern function |
What is the advantage of having a dedicated extern, compared to a table with a single entry that returns such a bitmap? Or a table with the egress_port being the key that returns 0 or 1? Please, keep in mind that:
|
|
If a P4 program could read the up/down status of one or all physical ports during packet processing, it could help implement some forms of fast re-route of traffic to go around failed links.
While the ability to read the status of a single port given the port number (as a value of type PortId_t) is potentially useful, I would guess that it is more useful to be able to read a value of type
bit<N>
to get the up/down status of all physical ports in a single operation, since P4 does not really allow loops, but does support operations on wide bit vectors.I am sure that one issue that would arise here is whether such a bit vector would have lots of "useless bits" in it, in case the numeric space of physical port ids is sparse in the range 0 through N-1.
The text was updated successfully, but these errors were encountered: