Programmer’s Guide

Figures

Fig. 2.1 Core Components Architecture

Fig. 3.1 EAL Initialization in a Linux Application Environment

Fig. 3.2 Example of a malloc heap and malloc elements within the malloc library

Fig. 4.2 Ring Structure

Fig. 4.3 Enqueue first step

Fig. 4.4 Enqueue second step

Fig. 4.5 Enqueue last step

Fig. 4.6 Dequeue last step

Fig. 4.7 Dequeue second step

Fig. 4.8 Dequeue last step

Fig. 4.9 Multiple producer enqueue first step

Fig. 4.10 Multiple producer enqueue second step

Fig. 4.11 Multiple producer enqueue third step

Fig. 4.12 Multiple producer enqueue fourth step

Fig. 4.13 Multiple producer enqueue last step

Fig. 4.14 Modulo 32-bit indexes - Example 1

Fig. 4.15 Modulo 32-bit indexes - Example 2

Fig. 5.1 Two Channels and Quad-ranked DIMM Example

Fig. 5.2 Three Channels and Two Dual-ranked DIMM Example

Fig. 5.3 A mempool in Memory with its Associated Ring

Fig. 6.1 An mbuf with One Segment

Fig. 6.2 An mbuf with Three Segments

Fig. 20.1 Memory Sharing in the DPDK Multi-process Sample Application

Fig. 21.1 Components of a DPDK KNI Application

Fig. 21.2 Packet Flow via mbufs in the DPDK KNI

Fig. 23.2 Complex Packet Processing Pipeline with QoS Support

Fig. 23.3 Hierarchical Scheduler Block Internal Diagram

Fig. 23.4 Scheduling Hierarchy per Port

Fig. 23.5 Internal Data Structures per Port

Fig. 23.6 Prefetch Pipeline for the Hierarchical Scheduler Enqueue Operation

Fig. 23.7 Pipe Prefetch State Machine for the Hierarchical Scheduler Dequeue Operation

Fig. 23.8 High-level Block Diagram of the DPDK Dropper

Fig. 23.9 Flow Through the Dropper

Fig. 23.10 Example Data Flow Through Dropper

Fig. 23.11 Packet Drop Probability for a Given RED Configuration

Fig. 23.12 Initial Drop Probability (pb), Actual Drop probability (pa) Computed Using a Factor 1 (Blue Curve) and a Factor 2 (Red Curve)

Fig. 26.2 Example of Packet Processing Pipeline where Input Ports 0 and 1 are Connected with Output Ports 0, 1 and 2 through Tables 0 and 1

Fig. 26.3 Sequence of Steps for Hash Table Operations in a Packet Processing Context

Fig. 26.4 Data Structures for Configurable Key Size Hash Tables

Fig. 26.5 Bucket Search Pipeline for Key Lookup Operation (Configurable Key Size Hash Tables)

Fig. 26.6 Data Structures for 8-byte Key Hash Tables

Fig. 26.7 Data Structures for 16-byte Key Hash Tables

Fig. 26.8 Bucket Search Pipeline for Key Lookup Operation (Single Key Size Hash Tables)

Fig. 13.2 Load Balancing Using Front End Node

Fig. 13.3 Consistent Hashing

Fig. 13.4 Table Based Flow Distribution

Fig. 13.5 Searching for Perfect Hash Function

Fig. 13.6 Divide and Conquer for Millions of Keys

Fig. 13.7 EFD as a Flow-Level Load Balancer

Fig. 13.8 Group Assignment

Fig. 13.9 Perfect Hash Search - Assigned Keys & Target Value

Fig. 13.10 Perfect Hash Search - Satisfy Target Values

Fig. 13.11 Finding Hash Index for Conflict Free lookup_table

Fig. 13.12 EFD Lookup Operation

Tables

Table 23.1 Packet Processing Pipeline Implementing QoS

Table 23.2 Infrastructure Blocks Used by the Packet Processing Pipeline

Table 23.3 Port Scheduling Hierarchy

Table 23.4 Scheduler Internal Data Structures per Port

Table 23.5 Ethernet Frame Overhead Fields

Table 23.6 Token Bucket Generic Operations

Table 23.7 Token Bucket Generic Parameters

Table 23.8 Token Bucket Persistent Data Structure

Table 23.9 Token Bucket Operations

Table 23.10 Subport/Pipe Traffic Class Upper Limit Enforcement Persistent Data Structure

Table 23.11 Subport/Pipe Traffic Class Upper Limit Enforcement Operations

Table 23.12 Weighted Round Robin (WRR)

Table 23.13 Subport Traffic Class Oversubscription

Table 23.14 Watermark Propagation from Subport Level to Member Pipes at the Beginning of Each Traffic Class Upper Limit Enforcement Period

Table 23.15 Watermark Calculation

Table 23.16 RED Configuration Parameters

Table 23.17 Relative Performance of Alternative Approaches

Table 23.18 RED Configuration Corresponding to RED Configuration File

Table 26.2 Port Types

Table 26.3 20 Port Abstract Interface

Table 26.4 Table Types

Table 26.6 Configuration Parameters Common for All Hash Table Types

Table 26.7 Configuration Parameters Specific to Extendable Bucket Hash Table

Table 26.8 Configuration Parameters Specific to Pre-computed Key Signature Hash Table

Table 26.9 Main Large Data Structures (Arrays) used for Configurable Key Size Hash Tables

Table 26.10 Field Description for Bucket Array Entry (Configurable Key Size Hash Tables)

Table 26.11 Description of the Bucket Search Pipeline Stages (Configurable Key Size Hash Tables)

Table 26.12 Lookup Tables for Match, Match_Many and Match_Pos

Table 26.13 Collapsed Lookup Tables for Match, Match_Many and Match_Pos

Table 26.14 Main Large Data Structures (Arrays) used for 8-byte and 16-byte Key Size Hash Tables

Table 26.15 Field Description for Bucket Array Entry (8-byte and 16-byte Key Hash Tables)

Table 26.16 Description of the Bucket Search Pipeline Stages (8-byte and 16-byte Key Hash Tables)

Table 26.17 Next Hop Actions (Reserved)

Table 26.18 User Action Examples

Table 12.1 Entry distribution measured with an example table with 1024 random entries using jhash algorithm

Table 12.2 Entry distribution measured with an example table with 1 million random entries using jhash algorithm