-
Notifications
You must be signed in to change notification settings - Fork 444
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
p4c-dpdk compiling 2023-Sep-13 version of DASH P4 code produces spec file that fails to load #4156
Comments
Further investigation from some Intel colleagues revealed two causes for failing to load the spec file into the P4-DPDK software switch: (a) attempting to perform arithmetic on 128-bit fields, which is not supported as of 2023-Sep in spec file instructions Fixing (b) could be done either by implementing For a P4 program that wants to do both of the following things: (1) perform then my strong recommendation would be that 128-bit operations are supported by spec file instructions like bit-wise and, or, addition, subtraction, shifting, etc. Yes we might be able to do all of (2) by changing the P4 source code to break all larger-than-64-bit wide fields into multiple at-most-64-bit-wide fields, but then you cannot do (1), because you can have at most one |
In case anyone is curious, a hacked-up version of the 2023-Sep-07 version of the DASH P4 program that eliminates all 128-bit wide fields, replacing them with a pair of 64-bit wide fields, is in this branch of my personal fork of the DASH project. I mention it here only in case it helps someone experiment with any p4c-dpdk changes to get DASH P4 code compiling with it, but also as motivation for why supporting 128-bit operations in spec files would save P4 developers and |
This issue has been fixed as of 2023-Sep-23 by modifying p4c-dpdk to reject P4 programs at compile time that attempt to perform arithmetic on operands larger than 64 bits. That fixes the symptoms reported by this issue. Closing this issue as resolved, but opening #4174 for the longer-term enhancement request of supporting such P4 programs in P4-DPDK. |
Note: This issue was discovered using the latest version of p4c-dpdk as of 2023-Sep-13 (commit SHA mentioned below). It is true that this version of p4c-dpdk DOES FIX these earlier issues:
However, there is a newer version of DASH P4 code since 2023-Apr when those issues were filed, and when testing with the latest version, p4c-dpdk produces a .spec file that fails to load into the P4-DPDK software switch. Hence the creation of this issue to track this.
Version of p4c source used to build p4c-dpdk:
I compiled p4c-dpdk binary from that source code.
Version of DASH P4 source code tested with:
Compile the DASH P4 code, without changes from the version at the commit SHA shown above, for DPDK:
This produced the following output files, included in the attached zip file:
In earlier issues, the root cause was something that P4-DPDK did not expect to find in the .spec file and/or the context.json file. If that is the case here, I do not yet know what portion of those files might be the root cause of the loading failure. Hopefully someone can add a comment to this issue with more details when they find out.
dash-pipeline-output-2023-sep-13.zip
The text was updated successfully, but these errors were encountered: