Skip to content
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

register cell size #67

Open
yqcc-p4 opened this issue Dec 7, 2023 · 1 comment
Open

register cell size #67

yqcc-p4 opened this issue Dec 7, 2023 · 1 comment

Comments

@yqcc-p4
Copy link

yqcc-p4 commented Dec 7, 2023

When I used registers to store data, I found that the value read was -1 when the register cell size was defined to be 72 bits, but this did not happen with 64 bits. I found in the p4 learning tutorial that the maximum register cell size is defined as 64 bits. Does this mean trying to define the size of register cells to be 64 bits or less when using registers.

@yqcc-p4
Copy link
Author

yqcc-p4 commented Dec 19, 2023

This problem has been solved.The answer is as follows:While p4c and simple_switch support as wide a bit width W as you wish for array elements for packet processing, the Thrift API (used by , and perhaps some switch controller software) only supports control plane read and write operations for array elements up to 64 bits wide (see the type in file standard.thrift, which is a 64-bit integer as of January 2022). The P4Runtime API does not have this limitation, but there is no P4Runtime implementation of register read and write operations yet for simple_switch.

@yqcc-p4 yqcc-p4 closed this as completed Dec 19, 2023
@yqcc-p4 yqcc-p4 reopened this Dec 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant