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. PCI Access
- 3.1.5. Per-lcore and Shared Variables
- 3.1.6. Logs
- 3.1.7. CPU Feature Identification
- 3.1.8. User Space Interrupt Event
- 3.1.9. Blacklisting
- 3.1.10. 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 to ETH → VF, PF
- 9.11.2. ETHERTYPE to ETH → QUEUE, DROP
- 9.11.3. FLEXIBLE to RAW → QUEUE
- 9.11.4. SYN to TCP → QUEUE
- 9.11.5. NTUPLE to IPV4, TCP, UDP → QUEUE
- 9.11.6. TUNNEL to ETH, 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 to VOID → VXLAN (or others)
- 10. Traffic Metering and Policing API
- 11. Traffic Management API
- 12. Cryptography Device Library
- 13. Security Library
- 14. Link Bonding Poll Mode Driver Library
- 15. Timer Library
- 16. Hash Library
- 17. Elastic Flow Distributor Library
- 18. Membership Library
- 19. LPM Library
- 20. LPM6 Library
- 21. Flow Classification Library
- 22. Packet Distributor Library
- 23. Reorder Library
- 24. IP Fragmentation and Reassembly Library
- 25. Generic Receive Offload Library
- 26. Generic Segmentation Offload Library
- 27. The librte_pdump Library
- 28. Multi-process Support
- 29. Kernel NIC Interface
- 30. Thread Safety of DPDK Functions
- 31. Event Device Library
- 32. Event Ethernet Rx Adapter Library
- 33. Quality of Service (QoS) Framework
- 34. Power Management
- 35. Packet Classification and Access Control
- 36. Packet Framework
- 37. Vhost Library
- 38. Metrics Library
- 39. Port Hotplug Framework
- 40. Source Organization
- 41. Development Kit Build System
- 41.1. Building the Development Kit Binary
- 41.2. Building External Applications
- 41.3. Makefile Description
- 41.3.1. General Rules For DPDK Makefiles
- 41.3.2. Makefile Types
- 41.3.3. Internally Generated Build Tools
- 41.3.4. Useful Variables Provided by the Build System
- 41.3.5. Variables that Can be Set/Overridden in a Makefile Only
- 41.3.6. Variables that can be Set/Overridden by the User on the Command Line Only
- 41.3.7. Variables that Can be Set/Overridden by the User in a Makefile or Command Line
- 42. Development Kit Root Makefile Help
- 43. Extending the DPDK
- 44. Building Your Own Application
- 45. External Application/Library Makefile help
- 46. Performance Optimization Guidelines
- 47. Writing Efficient Code
- 48. Profile Your Application
- 49. Glossary
Figures
Figure Core Components Architecture
Figure EAL Initialization in a Linux Application Environment
Figure Example of a malloc heap and malloc elements within the malloc library
Figure Multiple producer enqueue first step
Figure Multiple producer enqueue second step
Figure Multiple producer enqueue third step
Figure Multiple producer enqueue fourth step
Figure Multiple producer enqueue last step
Figure Modulo 32-bit indexes - Example 1
Figure Modulo 32-bit indexes - Example 2
Figure Two Channels and Quad-ranked DIMM Example
Figure Three Channels and Two Dual-ranked DIMM Example
Figure A mempool in Memory with its Associated Ring
Figure An mbuf with One Segment
Figure An mbuf with Three Segments
Figure Memory Sharing in the DPDK Multi-process Sample Application
Figure Components of a DPDK KNI Application
Figure Packet Flow via mbufs in the DPDK KNI
Figure Complex Packet Processing Pipeline with QoS Support
Figure Hierarchical Scheduler Block Internal Diagram
Figure Scheduling Hierarchy per Port
Figure Internal Data Structures per Port
Figure Prefetch Pipeline for the Hierarchical Scheduler Enqueue Operation
Figure Pipe Prefetch State Machine for the Hierarchical Scheduler Dequeue Operation
Figure High-level Block Diagram of the DPDK Dropper
Figure Flow Through the Dropper
Figure Example Data Flow Through Dropper
Figure Packet Drop Probability for a Given RED Configuration
Figure Initial Drop Probability (pb), Actual Drop probability (pa) Computed Using a Factor 1 (Blue Curve) and a Factor 2 (Red Curve)
Figure 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
Figure Sequence of Steps for Hash Table Operations in a Packet Processing Context
Figure Data Structures for Configurable Key Size Hash Tables
Figure Bucket Search Pipeline for Key Lookup Operation (Configurable Key Size Hash Tables)
Figure Data Structures for 8-byte Key Hash Tables
Figure Data Structures for 16-byte Key Hash Tables
Figure Bucket Search Pipeline for Key Lookup Operation (Single Key Size Hash Tables)
Figure Load Balancing Using Front End Node
Figure Table Based Flow Distribution
Figure Searching for Perfect Hash Function
Figure Divide and Conquer for Millions of Keys
Figure EFD as a Flow-Level Load Balancer
Figure Perfect Hash Search - Assigned Keys & Target Value
Figure Perfect Hash Search - Satisfy Target Values
Figure Finding Hash Index for Conflict Free lookup_table
Figure Example Usages of Membership Library
Figure Bloom Filter False Positive Probability
Figure Detecting Routing Loops Using BF
Figure Vector Bloom Filter (vBF) Overview
Figure vBF for Flow Scheduling to Worker Thread
Figure Using HTSS for Attack Signature Matching
Figure Using HTSS with False Negatives for Wild Card Classification
Tables
Table Packet Processing Pipeline Implementing QoS
Table Infrastructure Blocks Used by the Packet Processing Pipeline
Table Port Scheduling Hierarchy
Table Scheduler Internal Data Structures per Port
Table Ethernet Frame Overhead Fields
Table Token Bucket Generic Operations
Table Token Bucket Generic Parameters
Table Token Bucket Persistent Data Structure
Table Subport/Pipe Traffic Class Upper Limit Enforcement Persistent Data Structure
Table Subport/Pipe Traffic Class Upper Limit Enforcement Operations
Table Weighted Round Robin (WRR)
Table Subport Traffic Class Oversubscription
Table Watermark Propagation from Subport Level to Member Pipes at the Beginning of Each Traffic Class Upper Limit Enforcement Period
Table RED Configuration Parameters
Table Relative Performance of Alternative Approaches
Table RED Configuration Corresponding to RED Configuration File
Table 20 Port Abstract Interface
Table Configuration Parameters Common for All Hash Table Types
Table Configuration Parameters Specific to Extendable Bucket Hash Table
Table Configuration Parameters Specific to Pre-computed Key Signature Hash Table
Table Main Large Data Structures (Arrays) used for Configurable Key Size Hash Tables
Table Field Description for Bucket Array Entry (Configurable Key Size Hash Tables)
Table Description of the Bucket Search Pipeline Stages (Configurable Key Size Hash Tables)
Table Lookup Tables for Match, Match_Many and Match_Pos
Table Collapsed Lookup Tables for Match, Match_Many and Match_Pos
Table Main Large Data Structures (Arrays) used for 8-byte and 16-byte Key Size Hash Tables
Table Field Description for Bucket Array Entry (8-byte and 16-byte Key Hash Tables)
Table Description of the Bucket Search Pipeline Stages (8-byte and 16-byte Key Hash Tables)
Table Next Hop Actions (Reserved)
Table Entry distribution measured with an example table with 1024 random entries using jhash algorithm
Table Entry distribution measured with an example table with 1 million random entries using jhash algorithm