P4: Open-Source Programming Language for Protocol-Independent Packet Processing
p4.org
p4.org
The eBPF/XDP VM could be one of these P4 targets. You can write a P4 specification that is converted into eBPF byte code which is then loaded and executed. The reference P4 compiler even has a eBPF[1] and an XDP[2] back end. However, those are currently not well maintained. Another problem is that the code generated from P4 is not as efficient as manually crafted eBPF byte code. With a little care this is all easily solvable.
Disclaimer: I work in this space.
[0]: https://opennetworking.org/2021-p4-workshop-content/
2. I'm not sure the horse race mentality helps. p4 generally helps complex fancy hardware get programmed to be extra effective. it's not as generally applicable, it feels like today, as ebpf, even within the packet processing subconcerms of ebpf (which is now really the kernels generic programmabilitu mechanism, not necessarily only for packets). but that doesn't change how vital & critical it is that we have ways to program & use that switch hardware, we need those switches, we need ways to program them. ebpf does not do that job. Linux systems don't have dozens of TBps of throughput, hardware does & it needs programming.
I'd love to see p4 be a more effective competitor to ebpf, to have more presence & visibility & be better understood & more used by more systems researchers. but right now these are not really competitors, p4 is in a totally different realm. and it doesn't have many competitors.
to that end, I'd forgotten about this but the reference p4 compiler has a ebpf backend target, https://github.com/p4lang/p4c/blob/main/backends/ebpf/README...
which makes me feel like it's better control and systems to drive p4, that are easier to adopt, that is core to it getting broader interest, pickup, research interest.
[edit to be more clear: I thought P4 is aimed at a much narrower, higher performance use-case than ebpf].
One nice thing about P4 is that it is a machine-executable (and potentially verifiable) specification for how switching ASICs should work.
[0] https://github.com/p4lang/p4c/blob/main/backends/ebpf/README... [1] https://github.com/vmware/p4c-xdp [2] https://opennetworking.org/news-and-events/blog/p4c-ubpf-a-n...
It's nice that the same P4 program can potentially be compiled for high-speed ASICs, NPUs, Smart NICs and CPUs.
I think P4 could potentially have been developed as a subset of C, and that might have been a good thing? On the other hand, having customized language features for header parsing, state machines, etc. can be convenient for both language users and compiler writers who are targeting switching ASICs. It may also make formal analysis more convenient.
Disclosure: We are using both Intel Tofino 2 and P4 at Oxide and we (obviously?) think it's pretty interesting.
[0] https://www.servethehome.com/intel-tofino2-next-gen-programm...
[1] https://github.com/p4lang/p4-applications/blob/master/docs/I...
[0] https://www.lightreading.com/5g/intels-reorg-puts-nick-mckeo...
> The Silicom FPGA SmartNIC N5010 features an Intel Stratix 10 DX FPGA with integrated high bandwidth memory (HBM) and Intel Ethernet 800 series adapter.
4x100G. Double slot.
There's also a C5000X platform, with I believe only one board out right now, which is again an FPGA based add-on card, 2x25G, and also has an on-card Xeon-D processor.
Just a little reminder here at the end, AMD is still trying to get it's acquisition of the biggest FPGA company on the planet Xilinx to go through. And my general assessment of P4: P4 definitely is a strong contender for a tech which can get these fancy awesome transciever-heavy FPGAs to see more adoption.
[1] https://www.hpcwire.com/off-the-wire/intel-announced-two-new...
Context: I work on a L4 load balancer written in ebpf / XDP. Debugging that is still too hard even thought it's all software and open source.