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. Service Cores
- 5. Ring Library
- 6. Mempool Library
- 7. Mbuf Library
- 8. Poll Mode Driver
- 9. Generic flow API (rte_flow)
- 9.1. Overview
- 9.2. Flow rule
- 9.3. Rules management
- 9.4. Isolated mode
- 9.5. Verbose error reporting
- 9.6. Caveats
- 9.7. PMD interface
- 9.8. Device compatibility
- 9.9. Future evolutions
- 9.10. API migration
- 9.10.1.
MACVLAN
toETH
→VF
,PF
- 9.10.2.
ETHERTYPE
toETH
→QUEUE
,DROP
- 9.10.3.
FLEXIBLE
toRAW
→QUEUE
- 9.10.4.
SYN
toTCP
→QUEUE
- 9.10.5.
NTUPLE
toIPV4
,TCP
,UDP
→QUEUE
- 9.10.6.
TUNNEL
toETH
,IPV4
,IPV6
,VXLAN
(or other) →QUEUE
- 9.10.7.
FDIR
to most item types →QUEUE
,DROP
,PASSTHRU
- 9.10.8.
HASH
- 9.10.9.
L2_TUNNEL
toVOID
→VXLAN
(or others)
- 9.10.1.
- 10. Traffic Management API
- 11. Cryptography Device Library
- 12. Link Bonding Poll Mode Driver Library
- 13. Timer Library
- 14. Hash Library
- 15. Elastic Flow Distributor Library
- 16. LPM Library
- 17. LPM6 Library
- 18. Packet Distributor Library
- 19. Reorder Library
- 20. IP Fragmentation and Reassembly Library
- 21. Generic Receive Offload Library
- 22. The librte_pdump Library
- 23. Multi-process Support
- 24. Kernel NIC Interface
- 25. Thread Safety of DPDK Functions
- 26. Event Device Library
- 27. Quality of Service (QoS) Framework
- 28. Power Management
- 29. Packet Classification and Access Control
- 30. Packet Framework
- 31. Vhost Library
- 32. Metrics Library
- 33. Port Hotplug Framework
- 34. Source Organization
- 35. Development Kit Build System
- 35.1. Building the Development Kit Binary
- 35.2. Building External Applications
- 35.3. Makefile Description
- 35.3.1. General Rules For DPDK Makefiles
- 35.3.2. Makefile Types
- 35.3.3. Internally Generated Build Tools
- 35.3.4. Useful Variables Provided by the Build System
- 35.3.5. Variables that Can be Set/Overridden in a Makefile Only
- 35.3.6. Variables that can be Set/Overridden by the User on the Command Line Only
- 35.3.7. Variables that Can be Set/Overridden by the User in a Makefile or Command Line
- 36. Development Kit Root Makefile Help
- 37. Extending the DPDK
- 38. Building Your Own Application
- 39. External Application/Library Makefile help
- 40. Performance Optimization Guidelines
- 41. Writing Efficient Code
- 42. Profile Your Application
- 43. 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. 5.8 Multiple producer enqueue first step
Fig. 5.9 Multiple producer enqueue second step
Fig. 5.10 Multiple producer enqueue third step
Fig. 5.11 Multiple producer enqueue fourth step
Fig. 5.12 Multiple producer enqueue last step
Fig. 5.13 Modulo 32-bit indexes - Example 1
Fig. 5.14 Modulo 32-bit indexes - Example 2
Fig. 6.1 Two Channels and Quad-ranked DIMM Example
Fig. 6.2 Three Channels and Two Dual-ranked DIMM Example
Fig. 6.3 A mempool in Memory with its Associated Ring
Fig. 7.1 An mbuf with One Segment
Fig. 7.2 An mbuf with Three Segments
Fig. 23.2 Memory Sharing in the DPDK Multi-process Sample Application
Fig. 24.5 Components of a DPDK KNI Application
Fig. 24.6 Packet Flow via mbufs in the DPDK KNI
Fig. 27.4 Complex Packet Processing Pipeline with QoS Support
Fig. 27.5 Hierarchical Scheduler Block Internal Diagram
Fig. 27.6 Scheduling Hierarchy per Port
Fig. 27.7 Internal Data Structures per Port
Fig. 27.8 Prefetch Pipeline for the Hierarchical Scheduler Enqueue Operation
Fig. 27.9 Pipe Prefetch State Machine for the Hierarchical Scheduler Dequeue Operation
Fig. 27.10 High-level Block Diagram of the DPDK Dropper
Fig. 27.11 Flow Through the Dropper
Fig. 27.12 Example Data Flow Through Dropper
Fig. 27.13 Packet Drop Probability for a Given RED Configuration
Fig. 27.14 Initial Drop Probability (pb), Actual Drop probability (pa) Computed Using a Factor 1 (Blue Curve) and a Factor 2 (Red Curve)
Fig. 30.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. 30.3 Sequence of Steps for Hash Table Operations in a Packet Processing Context
Fig. 30.4 Data Structures for Configurable Key Size Hash Tables
Fig. 30.5 Bucket Search Pipeline for Key Lookup Operation (Configurable Key Size Hash Tables)
Fig. 30.6 Data Structures for 8-byte Key Hash Tables
Fig. 30.7 Data Structures for 16-byte Key Hash Tables
Fig. 30.8 Bucket Search Pipeline for Key Lookup Operation (Single Key Size Hash Tables)
Fig. 15.4 Load Balancing Using Front End Node
Fig. 15.6 Table Based Flow Distribution
Fig. 15.7 Searching for Perfect Hash Function
Fig. 15.8 Divide and Conquer for Millions of Keys
Fig. 15.9 EFD as a Flow-Level Load Balancer
Fig. 15.11 Perfect Hash Search - Assigned Keys & Target Value
Fig. 15.12 Perfect Hash Search - Satisfy Target Values
Fig. 15.13 Finding Hash Index for Conflict Free lookup_table
Fig. 15.14 EFD Lookup Operation
Tables
Table 27.1 Packet Processing Pipeline Implementing QoS
Table 27.2 Infrastructure Blocks Used by the Packet Processing Pipeline
Table 27.3 Port Scheduling Hierarchy
Table 27.4 Scheduler Internal Data Structures per Port
Table 27.5 Ethernet Frame Overhead Fields
Table 27.6 Token Bucket Generic Operations
Table 27.7 Token Bucket Generic Parameters
Table 27.8 Token Bucket Persistent Data Structure
Table 27.9 Token Bucket Operations
Table 27.10 Subport/Pipe Traffic Class Upper Limit Enforcement Persistent Data Structure
Table 27.11 Subport/Pipe Traffic Class Upper Limit Enforcement Operations
Table 27.12 Weighted Round Robin (WRR)
Table 27.13 Subport Traffic Class Oversubscription
Table 27.14 Watermark Propagation from Subport Level to Member Pipes at the Beginning of Each Traffic Class Upper Limit Enforcement Period
Table 27.15 Watermark Calculation
Table 27.16 RED Configuration Parameters
Table 27.17 Relative Performance of Alternative Approaches
Table 27.18 RED Configuration Corresponding to RED Configuration File
Table 30.2 20 Port Abstract Interface
Table 30.5 Configuration Parameters Common for All Hash Table Types
Table 30.6 Configuration Parameters Specific to Extendable Bucket Hash Table
Table 30.7 Configuration Parameters Specific to Pre-computed Key Signature Hash Table
Table 30.8 Main Large Data Structures (Arrays) used for Configurable Key Size Hash Tables
Table 30.9 Field Description for Bucket Array Entry (Configurable Key Size Hash Tables)
Table 30.10 Description of the Bucket Search Pipeline Stages (Configurable Key Size Hash Tables)
Table 30.11 Lookup Tables for Match, Match_Many and Match_Pos
Table 30.12 Collapsed Lookup Tables for Match, Match_Many and Match_Pos
Table 30.13 Main Large Data Structures (Arrays) used for 8-byte and 16-byte Key Size Hash Tables
Table 30.14 Field Description for Bucket Array Entry (8-byte and 16-byte Key Hash Tables)
Table 30.15 Description of the Bucket Search Pipeline Stages (8-byte and 16-byte Key Hash Tables)
Table 30.16 Next Hop Actions (Reserved)
Table 30.17 User Action Examples
Table 14.1 Entry distribution measured with an example table with 1024 random entries using jhash algorithm
Table 14.2 Entry distribution measured with an example table with 1 million random entries using jhash algorithm