Programmer’s Guide
- 1. Introduction
- 2. Overview
- 3. Environment Abstraction Layer
- 3.1. EAL in a Linux-userland Execution Environment
- 3.1.1. Initialization and Core Launching
- 3.1.2. Multi-process Support
- 3.1.3. Memory Mapping Discovery and Memory Reservation
- 3.1.4. Xen Dom0 support without hugetbls
- 3.1.5. PCI Access
- 3.1.6. Per-lcore and Shared Variables
- 3.1.7. Logs
- 3.1.8. CPU Feature Identification
- 3.1.9. User Space Interrupt Event
- 3.1.10. Blacklisting
- 3.1.11. Misc Functions
- 3.2. Memory Segments and Memory Zones (memzone)
- 3.3. Multiple pthread
- 3.4. Malloc
- 3.1. EAL in a Linux-userland Execution Environment
- 4. Ring Library
- 5. Mempool Library
- 6. Mbuf Library
- 7. Poll Mode Driver
- 8. IVSHMEM Library
- 9. Link Bonding Poll Mode Driver Library
- 10. Timer Library
- 11. Hash Library
- 12. LPM Library
- 13. LPM6 Library
- 14. Packet Distributor Library
- 15. Reorder Library
- 16. IP Fragmentation and Reassembly Library
- 17. Multi-process Support
- 18. Kernel NIC Interface
- 19. Thread Safety of DPDK Functions
- 20. Quality of Service (QoS) Framework
- 21. Power Management
- 22. Packet Classification and Access Control
- 23. Packet Framework
- 24. Vhost Library
- 25. Port Hotplug Framework
- 26. Source Organization
- 27. Development Kit Build System
- 27.1. Building the Development Kit Binary
- 27.2. Building External Applications
- 27.3. Makefile Description
- 27.3.1. General Rules For DPDK Makefiles
- 27.3.2. Makefile Types
- 27.3.3. Useful Variables Provided by the Build System
- 27.3.4. Variables that Can be Set/Overridden in a Makefile Only
- 27.3.5. Variables that can be Set/Overridden by the User on the Command Line Only
- 27.3.6. Variables that Can be Set/Overridden by the User in a Makefile or Command Line
- 28. Development Kit Root Makefile Help
- 29. Extending the DPDK
- 30. Building Your Own Application
- 31. External Application/Library Makefile help
- 32. Performance Optimization Guidelines
- 33. Writing Efficient Code
- 34. Profile Your Application
- 35. Glossary
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.8 Multiple consumer enqueue first step
Fig. 4.9 Multiple consumer enqueue second step
Fig. 4.10 Multiple consumer enqueue third step
Fig. 4.11 Multiple consumer enqueue fourth step
Fig. 4.12 Multiple consumer enqueue last step
Fig. 4.13 Modulo 32-bit indexes - Example 1
Fig. 4.14 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. 17.1 Memory Sharing in the DPDK Multi-process Sample Application
Fig. 18.1 Components of a DPDK KNI Application
Fig. 18.2 Packet Flow via mbufs in the DPDK KNI
Fig. 18.3 vHost-net Architecture Overview
Fig. 20.1 Complex Packet Processing Pipeline with QoS Support
Fig. 20.2 Hierarchical Scheduler Block Internal Diagram
Fig. 20.3 Scheduling Hierarchy per Port
Fig. 20.4 Internal Data Structures per Port
Fig. 20.5 Prefetch Pipeline for the Hierarchical Scheduler Enqueue Operation
Fig. 20.6 Pipe Prefetch State Machine for the Hierarchical Scheduler Dequeue Operation
Fig. 20.7 High-level Block Diagram of the DPDK Dropper
Fig. 20.8 Flow Through the Dropper
Fig. 20.9 Example Data Flow Through Dropper
Fig. 20.10 Packet Drop Probability for a Given RED Configuration
Fig. 20.11 Initial Drop Probability (pb), Actual Drop probability (pa) Computed Using a Factor 1 (Blue Curve) and a Factor 2 (Red Curve)
Fig. 23.1 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. 23.2 Sequence of Steps for Hash Table Operations in a Packet Processing Context
Fig. 23.3 Data Structures for Configurable Key Size Hash Tables
Fig. 23.4 Bucket Search Pipeline for Key Lookup Operation (Configurable Key Size Hash Tables)
Fig. 23.5 Data Structures for 8-byte Key Hash Tables
Fig. 23.6 Data Structures for 16-byte Key Hash Tables
Fig. 23.7 Bucket Search Pipeline for Key Lookup Operation (Single Key Size Hash Tables)
Tables
Table 20.1 Packet Processing Pipeline Implementing QoS
Table 20.2 Infrastructure Blocks Used by the Packet Processing Pipeline
Table 20.3 Port Scheduling Hierarchy
Table 20.4 Scheduler Internal Data Structures per Port
Table 20.5 Ethernet Frame Overhead Fields
Table 20.6 Token Bucket Generic Operations
Table 20.7 Token Bucket Generic Parameters
Table 20.8 Token Bucket Persistent Data Structure
Table 20.9 Token Bucket Operations
Table 20.10 Subport/Pipe Traffic Class Upper Limit Enforcement Persistent Data Structure
Table 20.11 Subport/Pipe Traffic Class Upper Limit Enforcement Operations
Table 20.12 Weighted Round Robin (WRR)
Table 20.13 Subport Traffic Class Oversubscription
Table 20.14 Watermark Propagation from Subport Level to Member Pipes at the Beginning of Each Traffic Class Upper Limit Enforcement Period
Table 20.15 Watermark Calculation
Table 20.16 RED Configuration Parameters
Table 20.17 Relative Performance of Alternative Approaches
Table 20.18 RED Configuration Corresponding to RED Configuration File
Table 23.2 20 Port Abstract Interface
Table 23.5 Configuration Parameters Common for All Hash Table Types
Table 23.6 Configuration Parameters Specific to Extendable Bucket Hash Table
Table 23.7 Configuration Parameters Specific to Pre-computed Key Signature Hash Table
Table 23.8 Main Large Data Structures (Arrays) used for Configurable Key Size Hash Tables
Table 23.9 Field Description for Bucket Array Entry (Configurable Key Size Hash Tables)
Table 23.10 Description of the Bucket Search Pipeline Stages (Configurable Key Size Hash Tables)
Table 23.11 Lookup Tables for Match, Match_Many and Match_Pos
Table 23.12 Collapsed Lookup Tables for Match, Match_Many and Match_Pos
Table 23.13 Main Large Data Structures (Arrays) used for 8-byte and 16-byte Key Size Hash Tables
Table 23.14 Field Description for Bucket Array Entry (8-byte and 16-byte Key Hash Tables)
Table 23.15 Description of the Bucket Search Pipeline Stages (8-byte and 16-byte Key Hash Tables)
Table 23.16 Next Hop Actions (Reserved)
Table 23.17 User Action Examples
Table 11.1 Entry distribution measured with an example table with 1024 random entries using jhash algorithm
Table 11.2 Entry distribution measured with an example table with 1 million random entries using jhash algorithm