by Gordon Brebner, Nate Foster, and Changhoon Kim.

Following up on last week’s blog post by the P4.org board announcing the P4 Technical Steering Committee (P4-TSC), we want to briefly reflect on where we are, what we have accomplished, and identify short-term and longer-term roadmaps for the P4 language as it continues to gain adoption and momentum across the industry.

Last year we released P416, an important update to the language that offers a number of features designed to make it easy to develop and deploy programs on a wide variety of target devices. These features include:

Portability

P416 introduces the notion of an “architecture,” which cleanly separates the logical functionality needed to express a given program from the physical components used in the underlying implementation. In addition, a new “extern” mechanism offers a uniform way to incorporate non-standard functionality that may be provided on specific architectures. Many of the stateful constructs that were previously “baked in” to P414 (e.g., counters, meters, registers, checksums, etc.) have been relocated to this “extern” framework, which dramatically simplifies the language and also makes it possible to host programs on different targets that implement a common architecture.

Safety

To improve debuggability during the development process, P416 offers a strong type system—every expression in the language has a type that is checked statically by the compiler. In addition, the compiler has the capability to infer types automatically, which reduces the annotation burden for programmers.

Modularity

To support “programming in the large,” P416 allows core constructs can be parameterized on arguments. For example, the following declaration captures the common logic in several tables that forward packets using IP addresses:

control fwd(in ipv4_h ipv4) {
  table t { 
    key = {
      ipv4.dstAddress : ternary;
      ipv4.version : exact;
    }
    ... 
  }
}

This form of parameterization eliminates the need for global variables and facilitates code reuse, since common idioms can be captured as reusable patterns that are instantiated multiple times.

Our immediate focus over the next few months will be on adding to the open-source implementation of P416, especially the p4c compiler. Looking ahead, we plan to continue evolving the language while ensuring that P416 is a stable target for developers and implementers.

We encourage you, the P4 community, to get involved by helping develop the language and tools, as well as new applications built on top of it. Following are some areas that we believe may be ripe for innovation this year:

Language Evolution

New primitives
As more targets come online, we are seeing cases where it makes sense to add certain kinds of packet-processing functionality—currently realized using the “extern” functions, to be added to the language. We would like to investigate these cases and see if some of this functionality should be incorporated into the language as new primitives.

Modular programming
As programs grow in size and complexity, the need for modular programming constructs also increases. Although P416 already provides a number of constructs designed to facilitate modular programming, we believe that it will also be useful to extend the language with additional features, such as a module system that enables expressing large programs as compositions of smaller components, as well as mechanisms for dealing with idiosyncratic differences between targets.

Architecture and APIs

New architectures
While most current work on P416 has focused on packet-processing pipelines inspired by RMT, the target-architecture separation introduced in P416 makes it possible to use the same language to program many different architectures. The P4 Architecture Working Group is currently developing a set of standard architectures, but we are also excited to see what new architectures the community proposes.

Control plane interactions
We would like to investigate simple and flexible APIs that can be used as the basis for building higher-level abstractions on top of programmable data planes. We are also interested in exploring how information about control plane interactions can be used to optimize data plane programs.

Incremental reprogramming
An important advantage that programmable data planes enjoy over conventional devices is that they can be reconfigured in the field—e.g., deploying a new protocol is as simple as installing a new P416 program on each device. We would like to explore the design of reconfiguration mechanisms that allow new programs to be propagated to devices in a “hitless” manner.

Tools and Implementation

New targets
The P4 community has already developed p4c, a compiler framework that target a diverse collection of targets including software switches and engines, FPGAs, NPUs, and hardware switch ASICs. We look forward to discovering new uses of this framework for deploying P416 programs on additional hardware and software targets.

Automated tools
We would like to develop a suite of automated testing and verification tools, based on a formal semantics for the language, that can be used by P4 programmers to efficiently validate their programs before they are deployed.

Applications

P4 Programs and Examples
We are especially excited to see to P4 used to develop new, innovative data plane applications. These applications will demonstrate the value of data plane programmability and will also be key drivers for future enhancements to the language. We’ve already seen some great contributions in this area and are eager to see the community contribute more P4 applications in the future.

…and this is certainly only a partial list! We are sure that you will have many other good ideas.

Useful Links

Below are some useful links to help you get you started on being part of this revolution that is happening in the networking industry.

If you’d like to download the compiler and write programs go here https://github.com/p4lang/p4c
If you are not already subscribed to the mailing lists, please sign up here to stay informed http://lists.p4.org
If you or your organization would like to join P4.org, please do so here http://p4.org/join-us

We encourage you to get involved by downloading the compiler, writing programs, contributing them to the project, using the behavioral model, and joining the conversation by becoming a member of P4.org and giving back.

Leave a Reply

Your email address will not be published.