The compiler converts a P4 program to a VPP plugin. P4 to DPDK is also supported by running VPP with one packet in vector.
This compiler supports the P4 v1model.p4 because when this compiler development was started in 2020, the P4 psa model was fairly incomplete code. The compiler supports these P4 features.
- Recursive parsing.
- Tuple in parser select with do not care.
P4 Parser Value Set, Header Union, and Meter are not supported.
VPP features in punt, drop, error, counters per table, and node trace are supported. Table entries are aligned on a cache line.
• Generated files are plugin.h, plugin.c, plugin.api plugin_periodic.c, plugin_test.c, cli.c, and CMakeLists.txt.
• Support for ARM.
• compiler includes options to
-get plugin name,
-number of packets used in node_inline/vector,
-what bihash to use, and
-split a P4 program into a VPP node per P4 table, e.g., split IPv4 and IPv6.
• Any generated plugin has table entry add/delete/show (including counters) and plugin enable/disable CLI and API generated.
We also include Python scripts to setup VPP and trex for large-scale subscriber testing.