p4lang / p4c

P4_16 reference compiler
https://p4.org/
Apache License 2.0
683 stars 446 forks source link

Port Katran C application to P4. #4863

Open fruffy opened 3 months ago

fruffy commented 3 months ago

A small project idea.

The DPDK or BMv2 back end have complex example programs such as dash or the PINS programs.

Unfortunately, the eBPF/XDP back end has no such program and is limited to simple examples. This makes it harder to develop the back end or benchmark changes to it. There are complex eBPF programs, for example Katran, but they are written in C.

A viable case study is to port this program to P4 and compare it to the original implementation in expressiveness and performance.

Dscano commented 3 months ago

@fruffy I can start to work on it

fruffy commented 3 months ago

Sounds great! Let me know if you have questions or confusion. I think the linked program should be the majority of the kernel code.

Dscano commented 3 months ago

Sounds great! Let me know if you have questions or confusion. I think the linked program should be the majority of the kernel code.

Sure, at the moment, I’m finishing the conversion from Madoko to AsciiDoc for P4Runtime. I’m making good progress, so I'll reach you in a few days.

jrfastab commented 3 months ago

If you need help with BPF side or run into issues there feel free to ping me happy to help where I can this would be amazing to get working.