virtualization-virtio-vdpa-dpdk

Overview

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# 06:00.3 is intel vDPA device or simulated vDPA devices
# qemu as vhost-user server, dpdk as client
$ ./dpdk-vdpa -c 0x2 -n 4 --socket-mem 1024,1024 \
-a 0000:06:00.4,vdpa=1 \
-- --client --iface=/tmp/qemu-vhost-user-net.sock

$ modprobe vfio-pci
$ ./usertools/dpdk-devbind.py -b vfio-pci 06:00.4

# start vm TODO
$ qemu-system-x86_64 -cpu host -enable-kvm \
-mem-prealloc \
-chardev socket,id=char0,path=/tmp/qemu-vhost-user-net.sock \
-netdev type=vhost-user,id=vdpa,chardev=char0 \
-device virtio-net-pci,netdev=vdpa,mac=00:aa:bb:cc:dd:ee,page-per-vq=on \

# ==================== more options==========================================================
# 0000:ca:0f.5 is VF NET PCI device created by ConnectX-6, bind with vfio-pci kernel driver
# vhost-user-net-server.sock is created by qemu
$/usr/local/bin/vdpa-dpdk --lcore 0@(0-127) -n 4 --huge-dir=/mnt/huge_2MB --log-level=9 -w 0000:ca:0f.5,class=vdpa,event_mode=2 --log-level=pmd.vdpa.mlx5:7 --log-level=pmd:8 --file-prefix=vfnet1 -- --client --iface=vhost-user-net-server.sock

Ref