-
Notifications
You must be signed in to change notification settings - Fork 441
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 register support saving 128 bits value ? #2055
Comments
however, I don't know if bmv2-ss supports such wide registers. |
register(100) port_ipv6; |
You say "this is what I write": Chris is saying that is incorrect P4_16 for the register you want. You should write something like this instead: If you do not change your P4 program to look like that, you will never achieve your goal. I have tested 128-bit wide registers in p4c and simple_switch using a line like the above, and it seems to be working as desired. |
I do not know what the maximum width of register supported by p4c plus simple_switch is, but I have also tested up to 1024-bit wide register array elements, and it all seems to be working. |
There is no hard limit on bmv2 register values. The code uses arbitrary-precision numbers. The Thrift RPC service for bmv2 however is limited to 64-bit registers: https://github.com/p4lang/behavioral-model/blob/master/thrift_src/standard.thrift#L159. Which means that the runtime_CLI is also limited to 64-bit registers. The P4Runtime API does not have this limitation, but there is no implementation yet for bmv2: p4lang/PI#376 |
* Add runtime_CLI docs on table_add and a few other commands * Additional implementation notes on registers in simple_switch Some of this material comes from this comment by Antonin Bas: p4lang/p4c#2055 (comment) * Add missing backquote markup
typedef bit<128> IPv6Address;
register(100) port_ipv6;
I can not save 128 bits IPv6 address in register?
The text was updated successfully, but these errors were encountered: