-
Notifications
You must be signed in to change notification settings - Fork 334
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
Is there a simple_switch_grpc switch port for P4Runtime PacketIn/PacketOut ? #831
Comments
Yes, it can be set with
It defaults to 0xffffffff, as per the P4Runtime spec. |
Thanks, Antonin. Good to know. With that default value, I guess the current v1model.p4 included with p4c has an egress_spec value that is only 9 bits wide, and thus cannot use the default cpu port value? No big worries there, since we can explicitly assign it a value when starting simple_switch_grpc. |
This is true, and when you write 0xffffffff to a 9-bit value you get 511, which simple_switch uses as the drop port, so it's a bit confusing. For some resources:
|
Actually I misread the code: https://github.com/p4lang/behavioral-model/blob/master/targets/simple_switch_grpc/main.cpp#L78. If the option is not provided, cpu_port defaults to 0, which is not a valid CPU port number. Basically, if you do not provide the |
Is there some either hard-coded or configurable port number that one can send packets to in a P4 program, e.g. using the P4_16 v1model architecture, such that packets sent to that port become PacketIn messages to a P4Runtime client that is connected to simple_switch_grpc (when it is acting as a P4Runtime server) ?
Similarly for PacketOut messages, which I presume would be the same port number according to the P4 code.
The text was updated successfully, but these errors were encountered: