Skip to content

Commit 551a56c

Browse files
author
Pavel Siska
committed
Ddpk: Add README
1 parent 7705a7a commit 551a56c

File tree

1 file changed

+69
-0
lines changed

1 file changed

+69
-0
lines changed

src/plugins/input/dpdk/README.md

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
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+
## Parameters
8+
```
9+
p, port=NUMBER DPDK port to be used as an input interface (required)
10+
b, bsize=SIZE Size of the MBUF packet buffer (default: 64)
11+
m, mem=SIZE Size of the memory pool for received packets. (default: 8192)
12+
q, queue=COUNT Number of RX queues (default: 1)
13+
e, eal=PARAMS Extra parameters to be passed to DPDK EAL (Environment Abstraction Layer)
14+
M, mtu=SIZE Maximum transmission unit size for the port (default: 1500)
15+
````
16+
17+
# How to use
18+
19+
To use the DPDK input plugin, you must ensure that your system is properly configured for DPDK operation. This includes the following steps:
20+
21+
## 1. Configure the DPDK Driver
22+
23+
TODO MEllanox, broadcom
24+
25+
### 2. Allocate Hugepages
26+
27+
DPDK requires hugepages for optimal performance. Instead of manually configuring hugepages, you can use the `dpdk-hugepages` tool, which simplifies the process.
28+
29+
### Install `dpdk-hugepages`
30+
31+
`dpdk-hugepages` is part of the DPDK utilities package. You can install it as follows:
32+
33+
- **On RHEL/CentOS**:
34+
```sh
35+
dnf install dpdk-tools
36+
```
37+
- **On Debian/Ubuntu**:
38+
```sh
39+
apt-get install dpdk
40+
```
41+
42+
### Allocate Hugepages with `dpdk-hugepages`
43+
44+
To allocate hugepages, run:
45+
46+
```sh
47+
dpdk-hugepages.py -p 1G --setup 2G
48+
```
49+
50+
This allocates 2GB of hugepages with a default page size of 1GB. You can adjust these values based on your memory requirements.
51+
52+
To verify the allocated hugepages:
53+
54+
```sh
55+
dpdk-hugepages -s
56+
```
57+
58+
### Configuration:
59+
60+
```yaml
61+
input_plugin:
62+
dpdk:
63+
allowed_nics: "0000:00:00.0,0000:00:00.1" # List of allowed NICs (PCI addresses)
64+
burst_size: 64 # Number of packets processed in each cycle
65+
mempool_size: 8192 # Size of the memory pool (power of 2)
66+
rx_queues: 1 # Number of RX queues
67+
eal_opts: null # EAL options (null = default)
68+
mtu: null # Maximum Transmission Unit (defaults to RTE_ETHER_MAX_LEN)
69+
```

0 commit comments

Comments
 (0)