-
Notifications
You must be signed in to change notification settings - Fork 445
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
PHV allocation issue in Tofino compiler #5046
Comments
@ChrisDodd , @grg @hanw Could you help? |
The first thing you need to know is that pretty much any issue involving Tofino P4 compiler must be accompanied by the full source code of the corresponding program. The reason is that everything is so intertwined that even minor changes in the code in one part of the program can drastically affect the compilation of another, seemingly unrelated part. Second, it is also critically important to specify the version of the compiler you are using. |
I would also argue that fitting issues with any specific program should not be filed against the compiler unless the submitter can actually prove that this is a compiler issue, e.g. by providing a manual working allocation that the compiler fails to find. Doing otherwise would not be that different than filing an issue every time GCC (or any other compiler) compiles a function while using more than N instructions or using more than M words on a stack. |
I will attach the program. |
Can you try this compiler option: |
I have a query about how to change the action 'typecast_tunnel_id_vxlan' to make successful PHV allocation in Tofino2?
Here, ig_md.temp_ip_result is allocated in two 16 bit container
ingress::hdr.outer_vxlan.vni[23:16] |[-1r, 6w] |MB6
ingress::hdr.outer_vxlan.vni[15:0] |[-1r, 6w] |MH19
hdr.ipv4.srcAddr is allocated in one container of 32 bits
ingress::hdr.ipv4.srcAddr |[-1r, 6w] |MW1
The allocation of ig_md.temp_ip_result is the question.
Scenario 1 : If I comment subtraction_ipv4 action, ig_md.temp_ip_result is allocated at 4 8 bits container.
Scenario 2 : If I comment typecast_tunnel_id_vxlan action, ig_md.temp_ip_result is allocated as 32 bit container.
Having both actions give PHV allocation not successful error, how can I rewrite the action or add any annotation for compiler to make this work?
The text was updated successfully, but these errors were encountered: