Skip to content

Commit e7ecd8c

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

File tree

1 file changed

+88
-0
lines changed

1 file changed

+88
-0
lines changed

src/plugins/input/dpdk/README.md

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
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 per NIC. Increasing this can improve performance on multi-core systems.|
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__ | RTE_ETHER_MAX_LEN (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. Configure the DPDK Driver
43+
44+
TODO MEllanox, broadcom
45+
46+
### 2. Allocate Hugepages
47+
48+
DPDK requires hugepages for optimal performance. Instead of manually configuring hugepages, you can use the `dpdk-hugepages` tool, which simplifies the process.
49+
50+
### Install `dpdk-hugepages`
51+
52+
`dpdk-hugepages` is part of the DPDK utilities package. You can install it as follows:
53+
54+
- **On RHEL/CentOS**:
55+
```sh
56+
dnf install dpdk-tools
57+
```
58+
- **On Debian/Ubuntu**:
59+
```sh
60+
apt-get install dpdk
61+
```
62+
63+
### Allocate Hugepages with `dpdk-hugepages`
64+
65+
To allocate hugepages, run:
66+
67+
```sh
68+
dpdk-hugepages.py -p 1G --setup 2G
69+
```
70+
71+
This allocates 2GB of hugepages with a default page size of 1GB. You can adjust these values based on your memory requirements.
72+
73+
To verify the allocated hugepages:
74+
75+
```sh
76+
dpdk-hugepages -s
77+
```
78+
79+
Recommended hugepages configuration for 100G probe is:
80+
81+
```sh
82+
dpdk-hugepages.py -p 1G --setup 4G
83+
```
84+
85+
### 2. Validate with dpdk-testpmd
86+
87+
TODO
88+

0 commit comments

Comments
 (0)