From ff50a5c29bb69d3caa1b3dc546730350259799fa Mon Sep 17 00:00:00 2001 From: Pim van Pelt Date: Sat, 3 May 2025 11:18:49 +0200 Subject: [PATCH] Add a note about VFIO and how to add devices in the containerlab idiom --- README.md | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 118a743..e7724d5 100644 --- a/README.md +++ b/README.md @@ -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 ```