Datapath Programming Tools

Developers can create custom packet processing products with tools from Netronome. Netronome offers complete production datapath offload for several compute-intensive networking workloads including Open vSwitch, vRouter and Firewalls.

Developers can create custom datapaths by directly programming the networking datapath with the Agilio® P4C Software Development Kit (SDK) 6.x. The tools ensure rapid product development cycles.

  • The datapath can be programmed in the high-level datapath programming language P4. Programs written in P4 are portable and can be executed on hardware platforms from other vendors. Developers can also augment P4 programs with custom code written in C, or implement the entire datapath in C.
  • The SDK includes a Programmer Studio IDE which gives developers tools including a graphical IDE, a debugger and a simulator. These tools help reduce the number of lines of code required to implement typical SDN functions by up to 10X, improving developer productivity.

To learn more about our open source efforts, programming and the SDK, please visit www.Open-NFP.org.

sw p4c sdk

Netronome Agilio SmartNICs are based on Netronome’s purpose-built network flow processors. Based on a RISC architecture, these devices are completely programmable and can be customized for server-based networking applications such as network virtualization, security, load balancing, quality of service and telemetry.

Features

Netronome offers a wide range of SmartNIC programming models to enable developers to cost-effectively and efficiently customize a datapath to their requirements.

Agilio Software-Based CLI/Host API Model
With this approach, the developer starts with a production, high-performance Agilio software datapath developed by Netronome. The user can customize the datapath using open source drivers. The features supported include PCIe and network I/O configuration, and standard datapath features (via Open vSwitch offload, tunneling, match-action, etc.) usable via supported API calls.

The P4 Programming Model
P4 is a relatively new high-level architecture-portable language to program the datapath in networking devices. While P4 compilers have to be architecture-aware, P4 programs do not. P4 programs developed on Netronome can be ported to any device that supports the P4 standard. The P4 Programming Model is ideal for users who want to program the Agilio SmartNIC hardware without customizing their code to the architecture of the NFP. A P4-derived custom data plane, including packet match-action manipulation and custom packet headers and tunnel types, can be implemented using Netronome’s SDK. Netronome’s compiler maps the P4 program on to the flow processor. An Apache Thrift interface allows match-action rules in a P4 program to be updated with JSON-based files without requiring that a program be recompiled. Netronome’s SDK was the first to offer developers the ability to implement P4 programs on production networking hardware.

C-Externs
P4 is not a Turing-complete language and recognizes that developers may need to implement custom functions to meet their datapath requirements. Netronome’s SDK enables developers to implement custom C-functions, referred to as externs in the P4 language. Developers have used C-externs to implement features not supported in the core language, such as stateful flow support, timestamp support and packet generation.

C-Based Programming Model
To fully exploit the functionality and performance features in the NFP architecture, developers can implement a fully-custom datapath in C. With this approach, the developer controls every aspect of packet processing and physical resource management. An example is the development of a complete packet classification and processing pipeline for server-based networking.

Agilio Software with Sandbox
This model provides a performance-oriented solution for the NFP datapath where an Agilio SmartNIC software binary meets most of the user requirements while the remainder of the customization is provided by custom P4 and or C code in the “sandbox,” which is a set of processing resources on the SmartNIC that are dedicated to custom development.

Product

The Agilio P4C SDK 6.x has several components:

A Full-Featured IDE
The IDE includes a GUI and several tools including a cycle accurate simulator and a profile for rapid debug and prototyping. The Programmers Studio IDE runs on the Microsoft Windows platform. The SDK also includes command line tools for the C compiler, assembler and simulator that run on Linux.

A Back-End Toolchain
The toolchain maps programs written in P4 and/or P4 with C actions to the microengines and other resources on the NFP. The toolchain includes a C compiler, an assembler, a linker and a loader.
Host Software
This has two components: a Real-Time Environment (RTE) and SmartNIC management software. The RTE allows the SDK (PS or command line) to download user-developed binaries to the Agilio SmartNICs. The RTE also allows developers and operators to load match-action flow rule updates. The board management software consists of a driver and board support package for SmartNICs

Applications

Netronome Production Datapath
Agilio CX hardware comes with several available Agilio software packages, which have numerous built-in features that do not require additional programming, including:
  • OVS offload
  • vRouter offload
  • Acceleration via Exact Match Flow Cache
  • Transparent offload via OVS fallback and datapath hooks
  • OVSDB (configuration)
  • OpenFlow protocol (datapath)
  • OVS CLI
  • Optional local flow API
  • Stand-alone or controller modes
  • OVS statistics
  • Match-action offload
  • NVGRE tunnel encap/decap
  • VXLAN tunnel encap/decap
  • MPLS tunnel encap/decap
Agilio software comes with host-accessible APIs for all the features above.

Using APIs, host programmers can develop applications including:
  • DPDK-based VNFs (NFV-based applications)
  • Load balancing of network traffic to the VMs
  • Load balancing of the network traffic to the physical ports
  • Encapsulation and de-capsulation of the traffic from physical and virtual ports
  • Stateful filtering (firewall) applications
Custom Datapath
Using the SDK for FPC programming, users can also develop custom features on the Agilio CX in P4 and C programming languages. Netronome provides sample applications and libraries for this application development.

Examples include:
  • Custom tunnel development using P4
  • IP forwarding with stateful flow statistics
  • Custom header encap and decap with C sandbox
  • Software-based QoS (traffic manager) with a configurable number of queues and memories.
  • Custom load balancing code based on proprietary packet header fields
  • Stateful firewall applications.
  • Complete datapath functionality using C

Additional Resources

Training and Education
Netronome offers server-based networking datapath development training using its development tools. Such training is conducted on request, or through scheduled workshops and webinars. To request training and view upcoming workshops/webinars click here.

How to Download
The Agilio P4C SDK 6.x can be downloaded from Netronome Support by sending a request to help@netronome.com.