Need for a P4toVPP Compiler

Need for a P4toVPP Compiler

VPP has stellar data plane code open-sourced by Cisco as a Linux project.  Now VPP runs crypto on latest Intel server hardware at 1 Tbps.  Most VPP new features are implemented as a plugin.  VPP provides a script using Emacs Lisp to generate a plugin’s stub code.  The generated code includes API and CLI to enable-disable plugin.  MNK Labs & Consulting saw a need to generate a complete VPP plugin – this would cause less bugs with new plugin and also accelerate VPP plugin development. Emacs Lisp is not the right tool to generate a full VPP plugin including data plane code.  MNK saw P4 as a good fit to describe any data plane and used P4 to generate a VPP plugin. 

The generation is enabled by a novel P4toVPP compiler developed by us.   To test as much P4 and VPP functionality as possible, we used a 5G UPF P4 code to generate a UPF VPP plugin for IPv6 and IPv4.  In prior work, MNK developed P4 programs for Barefoot/Intel Tofino asic.  We used essentially the same P4 program to develop a server product using VPP.  This way both Tofino and server products are bug-for-bug compatible.   Which operator will not like getting a hardware and software product at the same time?

Our compiler supports both Intel x86 and ARM for VPP plugin.  We used other P4 programs to prove the compiler works with any P4 programs for the P4 features our compiler supports.  Since a 5G UPF uses GTPU options, one needs support for recursive parsing in the P4 parser.  Our p4c vpp backend supports recursive parsing which is also used to parse multiple MPLS headers.

A demo of our compiler is available at the link below.

Leave a Reply

Close Menu