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

Support bitwidths larger than 64 bit on the DPDK target and p4c-dpdk-pna compiler. #13

Open
fruffy opened this issue Sep 22, 2024 · 2 comments
Labels
mediumtask A task that appears to require a medium level of work

Comments

@fruffy
Copy link
Collaborator

fruffy commented Sep 22, 2024

p4lang/p4c#4174

@fruffy fruffy added the mediumtask A task that appears to require a medium level of work label Sep 22, 2024
@jafingerhut
Copy link
Collaborator

jafingerhut commented Sep 22, 2024

I will double-check and report back here later, but I believe that perhaps p4c-dpdk can compile the DASH P4 program (with appropriate small changes to use the PNA architecture instead of the v1model architecture, which I believe there are #ifdef's for), and has been able to do so for several months now.

Another potential blocking issue: if you try to use open source IPDK with its P4Runtime API server, it does not correctly implement adding table entries with actions where parameters are 128 bits in size (and perhaps the maximum size supported without errors is 64 bits today). sonic-net/DASH#408 (comment)

An alternative would be to try using a "native" control plane API for the DPDK software switch for installing such table entries. I do not know where to find documentation or examples of such things to try them out. If someone can point to a documentation or example for that, it would be helpful.

@fruffy
Copy link
Collaborator Author

fruffy commented Sep 23, 2024

I will double-check and report back here later, but I believe that perhaps p4c-dpdk can compile the DASH P4 program (with appropriate small changes to use the PNA architecture instead of the v1model architecture, which I believe there are #ifdef's for), and has been able to do so for several months now.

If you try you will see these errors:

dash-pipeline-pna-dpdk.p4(640): [--Werror=target-error] error: Unsupported bitwidth 128 in (bit<128>)hdr.u0_ipv4.dst_addr & ~meta._overlay_data_dip_mask57
...ipv6.dst_addr = (IPv6Address)hdr.u0_ipv4.dst_addr & ~meta.overlay_data.dip_mask | meta.overlay...
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
dash-pipeline-pna-dpdk.p4(640): [--Werror=target-error] error: Unsupported bitwidth 128 in meta._overlay_data_dip55 & meta._overlay_data_dip_mask57
...ipv4.dst_addr & ~meta.overlay_data.dip_mask | meta.overlay_data.dip & meta.overlay_data.dip_mask;
                                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
dash-pipeline-pna-dpdk.p4(1219): [--Werror=target-error] error: Unsupported bitwidth 128 in meta._overlay_data_sip_mask56
        routing_action_apply.apply(hdr, meta);
...

@fruffy fruffy changed the title Make DASH compile for DPDK-PNA Support bitwidths larger than 64 bit on the DPDK target and p4c-dpdk-pna compiler. Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mediumtask A task that appears to require a medium level of work
Projects
None yet
Development

No branches or pull requests

2 participants