Add a note about VFIO and how to add devices in the containerlab idiom

This commit is contained in:
Pim van Pelt
2025-05-03 11:18:49 +02:00
parent f80bcaa570
commit ff50a5c29b

View File

@ -25,13 +25,31 @@ docker build -f Dockerfile.bookworm . -t pimvanpelt/vpp-containerlab
docker network create --driver=bridge network2 --subnet=172.19.1.0/24
docker rm clab-pim
docker run --cap-add=NET_ADMIN --cap-add=SYS_NICE --cap-add=SYS_PTRACE \
--device=/dev/net/tun:/dev/net/tun --device=/dev/vfio/vfio:/dev/vfio/vfio \
--device=/dev/net/tun:/dev/net/tun \
--device=/dev/vhost-net:/dev/vhost-net \
--privileged=True --name clab-pim \
docker.io/pimvanpelt/vpp-containerlab
docker network connect network2 clab-pim
```
Note, DPDK will be disabled by default as it requires hugepages and VFIO and/or UIO to use physical
network cards. If DPDK at some future point is desired, mapping VFIO can be done by adding this:
```
--device=/dev/vfio/vfio:/dev/vfio/vfio
```
or in Containerlab, using the `devices` feature:
```
my-node:
image: vpp-containerlab:latest
kind: vpp
devices:
- /dev/vfio/vfio
- /dev/net/tun
- /dev/vhost-net
```
## Configuring VPP
```