Playing with the P4 language

Published 04-02-2020 00:00:00

Introduction

P4 is a domain-specific compiled programming language for network data forwarding. It does not know anything about already existing protocols: it doesn’t know IP, nor TCP.

A P4 program is compiled to something that is understandable by the P4 aware device. Such device can be a really hardware switch, a software switch, a FPGA.

In this article we will try to use a software switch. More precisely, the uBPF backend.

uBPF is a user-land implementation of the eBPF VM.

Installation

Terms

Target: It’s the actual hardware implementation, for example an FPGA. Architecture: It expose P4 programmability of the target, it’s the API used by our P4 program.