Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doc update re DPDK configuration #686

Merged
merged 1 commit into from
Apr 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
*.pyc
*.swp
output
dpdk-devbind.py
38 changes: 24 additions & 14 deletions docs/dpdk-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ Copyright 2022 Intel Corporation

# DPDK Configuration

If you are planning to use the UPF with DPDK, the following steps are required to properly configure the devices:
The following steps are required to properly configure the devices to deploy the
UPF in DPDK mode. Let's assume that interfaces `ens801f0` and `ens801f1` are the
ones to be used for this purpose.

- Let's assume that interfaces `ens801f0` and `ens801f1` are the ones to be used for DPDK
- Get their MAC addresses
- Get their MAC addresses
```bash
$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
Expand All @@ -25,15 +26,18 @@ $ ip a
...
```

- Clone `dpdk`
> Note: This clone of DPDK is used only to bind the devices. This is NOT used to build BESS
- Download a copy of dpdk-devbind script

The dpdk-devbind script from DPDK is used for this purpose. To get a copy of it,
execute the following command from the UPF's root directory:
```bash
$ git clone https://github.com/DPDK/dpdk.git
$ cd dpdk
$ wget https://raw.githubusercontent.com/DPDK/dpdk/main/usertools/dpdk-devbind.py -O dpdk-devbind.py
$ chmod +x dpdk-devbind.py
```
- Display status of the devices

- Get the PCI addresses of interest
```bash
$ ./usertools/dpdk-devbind.py -s
$ ./dpdk-devbind.py -s
Network devices using kernel driver
===================================
0000:17:00.0 'Ethernet Controller X710 for 10GBASE-T 15ff' if=ens260f0 drv=i40e unused=vfio-pci *Active*
Expand All @@ -49,11 +53,16 @@ No 'Baseband' devices detected
...
```

- Bind devices
- Bind devices to `DPDK-compatible driver`

```bash
$ sudo ./usertools/dpdk-devbind.py -b vfio-pci 0000:b1:00.0
$ sudo ./usertools/dpdk-devbind.py -b vfio-pci 0000:b1:00.1
$ ./usertools/dpdk-devbind.py -s
$ sudo ./dpdk-devbind.py -b vfio-pci 0000:b1:00.0
$ sudo ./dpdk-devbind.py -b vfio-pci 0000:b1:00.1
```

- Verify that the binding was successful
```bash
$ ./dpdk-devbind.py -s

Network devices using DPDK-compatible driver
============================================
Expand All @@ -72,7 +81,8 @@ No 'Baseband' devices detected

...
```
- Now, we need to see the group that these two interfaces got assigned

- Now, check the group that these two interfaces got assigned
```bash
$ ls /dev/vfio/
184 185 vfio
Expand Down