jafingerhut / p4-guide

Guide to p4lang repositories and some other public info about P4
534 stars 156 forks source link

Test whether these operations work in P4 DPDK #67

Open jafingerhut opened 9 months ago

jafingerhut commented 9 months ago

And record the result in some table summarizing tested-working features of BMv2 and P4-DPDK. Report the results back to the DASH behavioral model work group. Consider expanding the table to include other open source P4 implementations like P4TC, P4-EBPF, etc., with the help of implementers of those targets.

jafingerhut commented 8 months ago

I have learned that it is definitely supported to send packets from P4 DPDK to control plane code, and in the opposite direction, via a normal TAP interface, as long as the control plane software listens for packets received on that TAP interface, and/or sends packets to it. This is just a plain old normal TAP interface as far as P4 DPDK is concerned. The packets sent from the P4 DPDK software switch on such a normal TAP interface do not become PacketIn messages to the infrap4d P4Runtime API clients, and PacketOut messages from a P4Runtime API client do not become packets sent on such a TAP interface.

There might be a supported way for P4Runtime API clients of infrap4d to use PacketIn and PacketOut messages, but if so, I have not learned how to do so as of 2024-Mar-02.

As of 2024-Mar-02, this file https://github.com/p4lang/p4c/tree/main/backends/dpdk says that P4 DPDK does not support the Digest extern. As far as I know, that is accurate.

If packet mirroring works in P4 DPDK, I do not know how to configure those mirror sessions from a P4Runtime API client yet. P4 programs that use the PNA mirror_packet extern function compile, and become unique kinds of actions in the .spec files output by p4c-dpdk, but I do not know how to make that mirroring actually happen. Perhaps it is possible if you use Python TDI calls from the CLI with the bf_switchd process, but I have not verified that myself.