
Programming Protocol-independent Packet Processors (P4) is a dynamically developing language aimed at programming network data planes. It has significantly contributed to the research of modern networking by promoting more versatile and adaptable network control. Unlike conventional systems where vendors of devices determine function, P4 enables programmers to describe what happens to packets. P4 also offers benefits such as protocol independence, target flexibility, and field reconfigurability. Using P4 IP within the iW-Fibre SmartNICs framework enables the development of high-performance and configurable pipelines, supporting diverse network functions at line rates.
Key advantages of using P4 in SmartNICs
- Fine-grained control: P4 provides granular control over how packets are parsed, processed, and forwarded
- Dynamic adaptability: Networks programmed with P4 can be dynamically reconfigured in real-time in response to changing network conditions or workloads. This flexibility is critical for software-defined environments and multi-tenant cloud infrastructure.
- Faster development: Compared to traditional hardware development using Hardware Description Languages (HDLs), P4 allows for much faster implementation of new data plane functionality. The P4 compiler automatically handles many of the low-level complexities.
- Field upgradability: P4-based SmartNICs can be upgraded in the field through software updates, enabling operators to deploy new protocols or features without hardware replacements, significantly reducing operational costs.
Integration of P4 on iW-Fibre SmartNICs
In iW-Fibre SmartNICs P4 integration transforms programmable packet logic into hardware-accelerated functions. The compiled P4 IP is integrated into the FPGA shell, enabling customizable pipelines and efficient hardware offloading. The following steps outline the build process
- Generating P4 data plane IP for the P4 code.
- Integrate the generated IP on the FPGA Desing Shell
- Compile the Control plane Software for the generated P4 IP.
P4 Architecture
The P4 Architecture can be divided into three modules:

- Parser: This module extracts Packet headers from the incoming packets based on the predefined header structure. The parsed headers are then sent to the Match-Action engine, while the packet payloads are forwarded to the Deparser through the Payload Buffer/FIFO.
- Match Action engine: The Match Action engine is the core of the P4. It receives the Packet headers from the parser and processes it based on the Look Up Table (LUT) entries. Once the packet processing is done, it will be sent to the Deparser.
- Deparser : This module combines the Processed Packet headers from the Match Action engine, and the payload form the FIFO / Payload Buffer into a complete Packets
P4 Build Flow
Building P4 IP on the iW-Fibre SmartNIC involves P4 compilation, hardware integration, and software setup, resulting in a fully functional, protocol-independent pipeline capable of line-rate packet processing.

- P4 Compilation
The P4 compiler is used to generate the P4 IP for the iW-Fibre card, translating high-level P4 programs into RTL, and control files for hardware–software integration. The required inputs include the P4 programming code, which defines packet processing and offload logic, and the Architecture P4 code, which specifies the pipeline structure. The compiler outputs System Verilog (.sv) RTL files and control files that describe LUT names, configurations, and pipeline details. These control files are also used in user space to manage LUT entries, such as adding, deleting, or modifying them as needed.
- Integration of P4 Data Plane IP in FPGA shell
In the hardware integration phase, the P4 IP is integrated into the FPGA design shell using IDE Vivado (Xilinx) or Quartus (Altera). The key inputs include P4 RTL files from the compiler and the FPGA shell RTL files (e.g., OpenNIC or ASAF). These are combined to generate the FPGA shell binary, which is then loaded onto the iW-Fibre card for deployment.
- Software Configuration
The Software Configuration, performed on the host system, allows users to manage P4 LUTs such as adding, deleting, or modifying entries in the P4 IP by compiling the Control plane Software application with the Control files generated from the P4 compiler.
Understanding the Data Plane and Control Plane in P4

- Data Plane:
The Data Plane manages packet transfer between interfaces. In P4, packets from the network or host are distributed across multiple FPGA pipelines with the help of multiplexer, where each pipeline processes them using LUT entries and P4 externs. After processing, a demultiplexer combines the results and forwards the packets to their destination.
- Key components:
- Management IP – It is responsible for managing interactions between the P4 pipelines, LUT, and P4 externs.
- P4 pipeline: It contains the P4 parser, Match action and deparser which performs the P4 offloads.
- P4 externs – In P4, an extern is a target-specific module that extends the language with hardware or software functions like checksums, counters, or hashing. It exposes an interface to the P4 program, while the actual logic runs outside the P4.
- Lookup Table (LUT) – The Lookup table contains descriptions of how the current packets should be processed based on the entries updated by the user. The LUT entries contains
- Keys: Match keys containing the Header values.
- Action: The action to be performed when the Keys values are present in the current packet.
3. Control plane:
The Control Plane defines how packets should be processed and forwarded in the network. With P4, much of this processing is now offloaded to the Data Plane, allowing the Control Plane to focus primarily on updating the Lookup Table (LUT) entries and some P4 externs.
Key components:
- Control plane software: It is responsible for the handling of user interaction for updating the P4 lookup tables and certain P4 externs.
- P4 API: It is a set of APIs that enable configuration and management of P4 programmable and non-P4 programmable components of a backend device in a uniform way.
- Low level driver: A control software stack layer responsible for accepting (read/write) messages from the P4 API and sending them to the FPGA. It also conveys the read data response to the P4 API.
In conclusion, iWave SmartNICs provide a robust and seamless platform for P4 development, uniting the flexibility of software programmability with the speed of hardware acceleration. This integration empowers developers to build customized, high-performance, and scalable packet processing solutions. With their protocol-independent architecture, iWave SmartNICs enable rapid deployment of new features and protocols without the need for hardware to redesign.
For more information, visit iwave-global.com.















