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. Shutdown and Cleanup
- 3.1.3. Multi-process Support
- 3.1.4. Memory Mapping Discovery and Memory Reservation
- 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. Helpers
- 9.7. Caveats
- 9.8. PMD interface
- 9.9. Device compatibility
- 9.10. Future evolutions
- 9.11. API migration
- 9.11.1.
MACVLAN
toETH
→VF
,PF
- 9.11.2.
ETHERTYPE
toETH
→QUEUE
,DROP
- 9.11.3.
FLEXIBLE
toRAW
→QUEUE
- 9.11.4.
SYN
toTCP
→QUEUE
- 9.11.5.
NTUPLE
toIPV4
,TCP
,UDP
→QUEUE
- 9.11.6.
TUNNEL
toETH
,IPV4
,IPV6
,VXLAN
(or other) →QUEUE
- 9.11.7.
FDIR
to most item types →QUEUE
,DROP
,PASSTHRU
- 9.11.8.
HASH
- 9.11.9.
L2_TUNNEL
toVOID
→VXLAN
(or others)
- 9.11.1.
- 10. Traffic Metering and Policing API
- 11. Traffic Management API
- 12. Wireless Baseband Device Library
- 13. Cryptography Device Library
- 14. Security Library
- 15. Rawdevice Library
- 16. Link Bonding Poll Mode Driver Library
- 17. Timer Library
- 18. Hash Library
- 19. Elastic Flow Distributor Library
- 20. Membership Library
- 21. LPM Library
- 22. LPM6 Library
- 23. Flow Classification Library
- 24. Packet Distributor Library
- 25. Reorder Library
- 26. IP Fragmentation and Reassembly Library
- 27. Generic Receive Offload Library
- 28. Generic Segmentation Offload Library
- 29. The librte_pdump Library
- 30. Multi-process Support
- 31. Kernel NIC Interface
- 32. Thread Safety of DPDK Functions
- 33. Event Device Library
- 34. Event Ethernet Rx Adapter Library
- 35. Quality of Service (QoS) Framework
- 36. Power Management
- 37. Packet Classification and Access Control
- 38. Packet Framework
- 39. Vhost Library
- 40. Metrics Library
- 41. Port Hotplug Framework
- 42. Source Organization
- 43. Development Kit Build System
- 43.1. Building the Development Kit Binary
- 43.2. Building External Applications
- 43.3. Makefile Description
- 43.3.1. General Rules For DPDK Makefiles
- 43.3.2. Makefile Types
- 43.3.3. Internally Generated Build Tools
- 43.3.4. Useful Variables Provided by the Build System
- 43.3.5. Variables that Can be Set/Overridden in a Makefile Only
- 43.3.6. Variables that can be Set/Overridden by the User on the Command Line Only
- 43.3.7. Variables that Can be Set/Overridden by the User in a Makefile or Command Line
- 44. Development Kit Root Makefile Help
- 45. Extending the DPDK
- 46. Building Your Own Application
- 47. External Application/Library Makefile help
- 48. Performance Optimization Guidelines
- 49. Writing Efficient Code
- 50. Profile Your Application
- 51. 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.9 Multiple producer enqueue first step
Fig. 5.10 Multiple producer enqueue second step
Fig. 5.11 Multiple producer enqueue third step
Fig. 5.12 Multiple producer enqueue fourth step
Fig. 5.13 Multiple producer enqueue last step
Fig. 5.14 Modulo 32-bit indexes - Example 1
Fig. 5.15 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. 30.2 Memory Sharing in the DPDK Multi-process Sample Application
Fig. 31.4 Components of a DPDK KNI Application
Fig. 31.5 Packet Flow via mbufs in the DPDK KNI
Fig. 35.1 Complex Packet Processing Pipeline with QoS Support
Fig. 35.2 Hierarchical Scheduler Block Internal Diagram
Fig. 35.3 Scheduling Hierarchy per Port
Fig. 35.4 Internal Data Structures per Port
Fig. 35.5 Prefetch Pipeline for the Hierarchical Scheduler Enqueue Operation
Fig. 35.6 Pipe Prefetch State Machine for the Hierarchical Scheduler Dequeue Operation
Fig. 35.7 High-level Block Diagram of the DPDK Dropper
Fig. 35.8 Flow Through the Dropper
Fig. 35.9 Example Data Flow Through Dropper
Fig. 35.10 Packet Drop Probability for a Given RED Configuration
Fig. 35.11 Initial Drop Probability (pb), Actual Drop probability (pa) Computed Using a Factor 1 (Blue Curve) and a Factor 2 (Red Curve)
Fig. 38.4 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. 38.5 Sequence of Steps for Hash Table Operations in a Packet Processing Context
Fig. 38.6 Data Structures for Configurable Key Size Hash Tables
Fig. 38.7 Bucket Search Pipeline for Key Lookup Operation (Configurable Key Size Hash Tables)
Fig. 38.8 Data Structures for 8-byte Key Hash Tables
Fig. 38.9 Data Structures for 16-byte Key Hash Tables
Fig. 38.10 Bucket Search Pipeline for Key Lookup Operation (Single Key Size Hash Tables)
Fig. 19.1 Load Balancing Using Front End Node
Fig. 19.3 Table Based Flow Distribution
Fig. 19.4 Searching for Perfect Hash Function
Fig. 19.5 Divide and Conquer for Millions of Keys
Fig. 19.6 EFD as a Flow-Level Load Balancer
Fig. 19.8 Perfect Hash Search - Assigned Keys & Target Value
Fig. 19.9 Perfect Hash Search - Satisfy Target Values
Fig. 19.10 Finding Hash Index for Conflict Free lookup_table
Fig. 19.11 EFD Lookup Operation
Fig. 20.1 Example Usages of Membership Library
Fig. 20.2 Bloom Filter False Positive Probability
Fig. 20.3 Detecting Routing Loops Using BF
Fig. 20.4 Vector Bloom Filter (vBF) Overview
Fig. 20.5 vBF for Flow Scheduling to Worker Thread
Fig. 20.6 Using HTSS for Attack Signature Matching
Fig. 20.7 Using HTSS with False Negatives for Wild Card Classification
Tables
Table 35.1 Packet Processing Pipeline Implementing QoS
Table 35.2 Infrastructure Blocks Used by the Packet Processing Pipeline
Table 35.3 Port Scheduling Hierarchy
Table 35.4 Scheduler Internal Data Structures per Port
Table 35.5 Ethernet Frame Overhead Fields
Table 35.6 Token Bucket Generic Parameters
Table 35.7 Token Bucket Generic Operations
Table 35.8 Token Bucket Persistent Data Structure
Table 35.9 Token Bucket Operations
Table 35.10 Subport/Pipe Traffic Class Upper Limit Enforcement Persistent Data Structure
Table 35.11 Subport/Pipe Traffic Class Upper Limit Enforcement Operations
Table 35.12 Weighted Round Robin (WRR)
Table 35.13 Subport Traffic Class Oversubscription
Table 35.14 Watermark Propagation from Subport Level to Member Pipes at the Beginning of Each Traffic Class Upper Limit Enforcement Period
Table 35.15 Watermark Calculation
Table 35.16 RED Configuration Parameters
Table 35.17 Relative Performance of Alternative Approaches
Table 35.18 RED Configuration Corresponding to RED Configuration File
Table 38.20 20 Port Abstract Interface
Table 38.23 Configuration Parameters Common for All Hash Table Types
Table 38.24 Configuration Parameters Specific to Extendable Bucket Hash Table
Table 38.25 Configuration Parameters Specific to Pre-computed Key Signature Hash Table
Table 38.26 Main Large Data Structures (Arrays) used for Configurable Key Size Hash Tables
Table 38.27 Field Description for Bucket Array Entry (Configurable Key Size Hash Tables)
Table 38.28 Description of the Bucket Search Pipeline Stages (Configurable Key Size Hash Tables)
Table 38.29 Lookup Tables for Match, Match_Many and Match_Pos
Table 38.30 Collapsed Lookup Tables for Match, Match_Many and Match_Pos
Table 38.31 Main Large Data Structures (Arrays) used for 8-byte and 16-byte Key Size Hash Tables
Table 38.32 Field Description for Bucket Array Entry (8-byte and 16-byte Key Hash Tables)
Table 38.33 Description of the Bucket Search Pipeline Stages (8-byte and 16-byte Key Hash Tables)
Table 38.34 Next Hop Actions (Reserved)
Table 38.35 User Action Examples
Table 18.1 Entry distribution measured with an example table with 1024 random entries using jhash algorithm
Table 18.2 Entry distribution measured with an example table with 1 million random entries using jhash algorithm