What P4 programming is and why it’s such a big deal for Software Defined Networking

Programming language for chips in routers and switches is further disaggregating the networking stack.

p4 P4

The dawn of software defined networking (SDN) ushered in an era of disaggregation of the networking control plane from the data plane; management of the network was no longer bound to the networking hardware it ran on.

This created a market of overlay control-plane software from companies like Nicira, which was sold to VMware and is now NSX; Cisco ACI and others followed suit. But at the data plane – where network packets are actually forwarded - there has been less innovation, says IDC data center network research director Brad Casemore says. Until now.

In recent years a new high level programming language for routers and switches named P4 has been developed by some of the original founders of SDN. “This is really about making the whole stack, all the way down to the silicon, programmable,” Casemore says.

What you need to know about P4

P4 is an open source programming language that lets end users dictate how networking gear operates. It controls silicon processor chips in networking forwarding devices such as switches, routers and network interface cards. Whereas currently network functions are built “bottoms-up” with fixed-function switches having one way of forwarding packets, programmable networks can be controlled “top-down” to install any functionality the user requires. It’s not dissimilar to the OpenFlow open source control plane software, but is instead focused on the data plane layer.

nick mckeown Google

Nick Mckeown

Nick McKeown, a professor at Stanford University who helped develop the original SDN ideas and was a co-founder of Nicira, is considered one of the forefathers of this technology. A group of about 60 companies is now involved in supporting the P4 programming language, led by startup Barefoot Networks, which is chaired by McKeown and has the first commercialized chip that runs P4 named Tofino. Other P4 member companies include Alibaba Group, AT&T, Cisco, Broadcom, Brocade, Dell, Comcast, Fox, Google, Goldman Sachs, HPE, Huawei, Intel, Marvell, Juniper, Mellanox, Microsoft, Plumgrid, VMware and others. Academics from Princeton, Cornell and the University of Virginia are also involved.

Why programming network chips is a big deal

Why would you want to program network chips? Many organizations will not have a need to. Casemore says the trend is being primarily driven by mega-scale cloud providers who want to create the most efficient data center possible by customizing each layer of the infrastructure stack. By having the ability to program the chips that run their networking equipment, they are free to do what they want with their networking gear, instead of being at the whim of vendors who they have to buy equipment from. It’s also potentially more cost effective because it allows users with enough scale to buy component parts directly from original manufactures, without going through a third-party. “Creating abstractions at each layer of the stack gives end users choice,” Casemore says.

Barefoot Networks says a programmable data plane brings with it a handful of advantages:

  • Easily add new features: Network silicon chips can be programmed to support new protocols (BGP, OSPF, Spanning Tree, etc)
  • Remove unused protocols: Just as new network protocols can be installed onto the chip, likewise, unused protocols can be removed, freeing up space for it to focus solely on what the user wants it to do.
  • Greater visibility: P4 allows users to program in rules to forwarding devices. It can, for example, create a tag for each packet as it passes through a router or switch. Doing so lets network engineers get a potentially unprecedented level of visibility into the routing paths of packets to determine network latency.

“For a certain type of customer, those who are highly technical, this is a pretty amazing thing,” says Greg Ferro, host of the Packet Pushers networking podcast. “You now have the ability to turn your switches into anything you want.”

This brings efficiency too: Barefoot says its Tofino chip running P4 is capable of processing 6.5 terabits per second.

Casemore agrees that the mega-cloud vendors – the Amazon, Microsoft, Google, Facebook, etc of the world will be the most enthusiastic about this new functionality. “In the past all of these features and functionality have basically come from the vendor,” he says. “This is the further decoupling of the market. Now you don’t have to wait for your chip vendor or some proprietary ASIC provider to add support for protocols or change forwarding parameters, it can be done through in-house innovation.” Meanwhile, as P4 has emerged Casemore says other networking silicon vendors are attempting to add programmability into their chips.

What it means for enterprises

So what about the average networking customer? Casemore and Ferro agree P4 likely will not have an immediate impact on the majority of enterprise customers. If an organization has the in-house expertise to program networking chips then they can get the benefit of a customized networking stack. Many enterprises don’t have the pain points where they need to program their networking data plane yet though, Casemore notes. Most enterprises are largely getting the features and functionality they need from current data plane protocols, he says; it may not be perfect, but it usually gets the job done.

The reality is that the growth in the networking market is in mega-scale cloud providers, who have different needs than the regular enterprises. To keep up with that demand, new ways of catering to these hyperscale providers are being created, and that includes continued disaggregation of the networking stack. (For further explanation and video demo of P4 click here.)

Join the Computerworld newsletter!

Error: Please check your email address.

More about BroadcomCiscoDellFacebookGoldmanGoogleHuaweiIntelJuniper NetworksMicrosoftNSXStanford University

Show Comments