P4 on the Edge, with John Fastabend from Intel - a podcast by Ben Pfaff

from 2016-08-09T01:40:05

:: ::

Interview with John Fastabend, an engineer at Intel whose work in the
Linux kernel has focused on the scheduling core of the networking stackand Intel NIC drivers. John has also been involved in IEEE
standardization of 802.1Q and Data Center Bridging (DCB).

The interview focuses on John's recent work on P4 for edge devices, which
he presented at theP4
Workshop
held at Stanford in May. Theslidesfor his talk are available.

John's work originated in the use of P4 as a language for describing the
capabilities of Intel NICs, as an alternative to thousand-page manualswritten in English. He moved on to explore ways that software can be
offloaded into hardware, to improve performance and of course to makeIntel's hardware more valuable. That led to the use of P4 to describe
software as well, and eventually to the question that kicked off histalk, “Is P4 a useful abstraction for an edge node?” where an edge node
in this case refers to a server running VMs or containers.

The work presented at the P4 conference includes a P4 compiler that
generates IR code (that is, portable bytecode) for LLVM, a portablecompiler that can generate code for many architectures and that is
designed to be easily amenable to extensions. John then used an existingbackend to LLVM to generateeBPFcode that runs inside
the Linux kernel on any architecture through an in-kerneljust-in-time
(JIT) compiler
.

John used this infrastructure to answer a few different questions. Is P4
expressive enough to build a virtual switch? Does eBPF have enoughinfrastructure to implement a virtual switch? The answer in each case
appears to be “yes.”

The runtime interface to the eBPF P4 programs works througheBPF
maps
. John's work include tools for populating maps, including
command-line andNETCONFinterfaces.

John is exploring the idea of usingIntel
AVX
instructions to accelerate packet processing. He also points out
that the JIT can actually be an asset for performance, rather than aliability, if it can specialize the code to better run on particular
hardware. The well-established JITs for Java and Lua might point in theright direction.

John describes the performance advantages ofXDP(Express Data Path) for
processing packets that do not need to go to the operating system withoutconstructing a full Linuxsk_buffdata structure.

The main application of this work, so far, has been to experiment with
software implementations of hardware. John is also experimenting with aload balancer and a connection tracker.

John's work is all in the context of the Linux kernel. He speculates on
how it could be applied to a switch running on DPDK in userspace. Insuch an environment, it might make sense to have LLVM compile directly to
native code instead of via eBPF.

John talks about P4-specific optimizations to improve P4 programs that
are written in a way that is difficult to implement efficiently in eBPF.

John and Ben discuss some of the differences between software and
hardware implementations of P4.

John describes two models for network processing in software. In the
“run-to-completion” model, a packet is processed from ingress to egresson a single core. In the “pipeline” model, the packet passes from one
core to another at multiple stages in its processing. DPDK supports bothmodels. John and Ben both have the intuition that the run-to-completion
model is likely to be faster because it avoids the overhead of passingpackets between cores, and they discuss why there might be exceptions.

The next step is performance testing and optimization, gathering users,
and moving to P4 2016.

John and Ben discuss related work in P4 and eBPF. Thomas Graf's
eBPF-based work on Cilium, discussed inEpisode 4,
leans more toward orchestration and scale over a large system than as ageneral-purpose switch. Ethan Jackson's work on SoftFlow, discussed inEpisode 10, is more about how to integrate state with
Open vSwitch. Muhammad Shahbaz's work on integrating P4 into OpenvSwitch, discussed inEpisode 9, can benefit from
John's experience using LLVM.

If you're interested in experimenting with the prototype that John has
developed, or if you have other questions for him, the best way tocontact him is via email.

OVS Orbit is produced byBen Pfaff. The
intro music in this episode isDrive,
featuring cdk and DarrylJ, copyright 2013, 2016 by Alex. The bumper music isYeah Antfeaturing Wired Ant and Javolenus, copyright 2013 by Speck. The outro
music isSpace
Bazooka
featuring Doxen Zsigmond, copyright 2013 by Kirkoid. All content is licensed under a Creative CommonsAttribution 3.0
Unported (CC BY 3.0)
license.

Further episodes of OVS Orbit

Further podcasts by Ben Pfaff

Website of Ben Pfaff