Skip to content

Commit 8f4d328

Browse files
author
Pavel Siska
committed
Ddpk: Add README
1 parent aff862f commit 8f4d328

File tree

1 file changed

+98
-0
lines changed

1 file changed

+98
-0
lines changed

src/plugins/input/dpdk/README.md

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
# DPDK (input plugin)
2+
3+
DPDK (Data Plane Development Kit) is used for high-performance packet processing. It enables
4+
direct access to network interfaces, bypassing the kernel, and is suitable for use in environments
5+
requiring high throughput, low latency, and high packet processing rates.
6+
7+
## Example configuration
8+
9+
```yaml
10+
input_plugin:
11+
dpdk:
12+
allowed_nics: "0000:ca:00.0"
13+
### Optional parameters
14+
burst_size: 64
15+
mempool_size: 8192
16+
rx_queues: 8
17+
eal_opts: null
18+
mtu: 1518
19+
```
20+
21+
## Parameters
22+
23+
**Mandatory parameters:**
24+
25+
|Parameter | Description |
26+
|---|---|
27+
|__allowed_nics__|List of allowed NICs in PCI address format `0000:XX:YY.Z` separated with `,` |
28+
29+
**Optional parameters:**
30+
|Parameter | Default | Description |
31+
|---|---|---|
32+
|__burst_size__ | 64 | Number of packets processed in each burst cycle. Affects batch processing efficiency. |
33+
|__mempool_size__ | 8192 | Size of the memory pool used for buffering incoming packets. Must be a power of 2.|
34+
|__rx_queues__ | 1| Number of RX queues workers. Increasing this can help distribute load across multiple CPU cores. |
35+
|__eal_opts__ | null | Extra options to be passed to the DPDK EAL (Environment Abstraction Layer). Can be used for fine-tuning DPDK behavior.|
36+
|__mtu__ | 1518 | Maximum Transmission Unit size for the interface. Defines the maximum packet size that can be received.|
37+
38+
## How to use
39+
40+
To use the DPDK input plugin, you must ensure that your system is properly configured for DPDK operation. This includes the following steps:
41+
42+
### 1. Install DPDK Tools
43+
44+
To begin with, you will need to install DPDK and its associated tools. Follow the installation instructions for your operating system:
45+
46+
- **On RHEL/CentOS**:
47+
```sh
48+
dnf install dpdk-tools
49+
```
50+
51+
- **On Debian/Ubuntu**:
52+
```sh
53+
apt-get install dpdk
54+
```
55+
56+
### 2. Configure the DPDK Driver
57+
58+
TODO Mellanox, broadcom, intel
59+
60+
### 3. Allocate Hugepages
61+
62+
DPDK requires hugepages for optimal performance. Instead of manually configuring hugepages, you can use the `dpdk-hugepages` tool, which simplifies the process.
63+
64+
To allocate hugepages, run:
65+
```sh
66+
dpdk-hugepages.py -p 1G --setup 2G
67+
```
68+
69+
This allocates 2GB of hugepages with a default page size of 1GB. You can adjust these values based on your memory requirements.
70+
71+
To verify the allocated hugepages:
72+
73+
```sh
74+
dpdk-hugepages -s
75+
```
76+
77+
Recommended hugepages configuration for 100G probe is:
78+
79+
```sh
80+
dpdk-hugepages.py -p 1G --setup 4G
81+
```
82+
83+
### 4. Validate with dpdk-testpmd
84+
85+
TODO
86+
87+
## FAQ
88+
89+
|Q: | How many `rx_queues` should I configure? |
90+
|---|---|
91+
|A: | TODO |
92+
93+
|Q: | ??? |
94+
|---|---|
95+
|A: | TODO |
96+
97+
98+

0 commit comments

Comments
 (0)