Lines Matching +full:add +full:- +full:user +full:- +full:device

1 # How to test Vhost-user net with OpenVSwitch/DPDK
3 The purpose of this document is to illustrate how to test vhost-user-net
4 in cloud-hypervisor with OVS/DPDK as the backend. This document was
10 …te the communication between two virtual machine, connecting them to vhost-user ports respectively…
12 … +----+----------+ +-------------+-----------+-------------+ +----------+----+
14 … | |vhost-user|----------| vhost-user | ovs | vhost-user |----------|vhost-user| |
15 … | |net device| | port 1 | | port 2 | |net device| |
17 … | +----------+ +-------------+-----------+-------------+ +----------+ |
21 …+--+---------------------------------------------------------------------------------------------+
23 …| +---------------------------------------------------------------------------------------------+…
27 …+-------------------------------------------------------------------------------------------------…
32 - Enable hugepages
33 - Install DPDK
34 - Install OVS
39 On Ubuntu systems (18.04 or newer), the OpenVswitch-DPDK package can be
42 sudo apt-get update
43 sudo apt-get install openvswitch-switch-dpdk
44 sudo update-alternatives --set ovs-vswitchd /usr/lib/openvswitch-switch-dpdk/ovs-vswitchd-dpdk
57 sudo service openvswitch-switch start
58 ovs-vsctl init
59 ovs-vsctl set Open_vSwitch . other_config:dpdk-init=true
60 # run on core 0-3 only
61 ovs-vsctl set Open_vSwitch . other_config:dpdk-lcore-mask=0xf
63 ovs-vsctl set Open_vSwitch . other_config:dpdk-socket-mem=1024
64 # run PMD (Pull Mode Driver) threads on core 0-3 only
65 ovs-vsctl set Open_vSwitch . other_config:pmd-cpu-mask=0xf
66 sudo service openvswitch-switch restart
68 ovs-vsctl list Open_vSwitch
71 Here is an example how to create a bridge and add two DPDK ports to it
75 ovs-vsctl add-br ovsbr0 -- set bridge ovsbr0 datapath_type=netdev
76 # create two DPDK ports and add them to the bridge
77 ovs-vsctl add-port ovsbr0 vhost-user1 -- set Interface vhost-user1 type=dpdkvhostuserclient options…
78 ovs-vsctl add-port ovsbr0 vhost-user2 -- set Interface vhost-user2 type=dpdkvhostuserclient options…
80 ovs-vsctl set Interface vhost-user1 options:n_rxq=2
81 ovs-vsctl set Interface vhost-user2 options:n_rxq=2
88 # From one terminal. We need to give the cloud-hypervisor binary the NET_ADMIN capabilities for it …
89 ./cloud-hypervisor \
90 --cpus boot=2 \
91 --memory size=512M,hugepages=on,shared=true \
92 --kernel vmlinux \
93 --cmdline "console=ttyS0 console=hvc0 root=/dev/vda1 rw" \
94 --disk path=focal-server-cloudimg-amd64.raw \
95--net mac=52:54:00:02:d9:01,vhost_user=true,socket=/tmp/vhost-user1,num_queues=4,vhost_mode=server
97 # From another terminal. We need to give the cloud-hypervisor binary the NET_ADMIN capabilities for…
98 ./cloud-hypervisor \
99 --cpus boot=2 \
100 --memory size=512M,hugepages=on,shared=true \
101 --kernel vmlinux \
102 --cmdline "console=ttyS0 console=hvc0 root=/dev/vda1 rw" \
103 --disk path=focal-server-cloudimg-amd64.raw \
104--net mac=52:54:20:11:C5:02,vhost_user=true,socket=/tmp/vhost-user2,num_queues=4,vhost_mode=server
110 sudo ip addr add 172.100.0.1/24 dev ens3
117 sudo ip addr add 172.100.0.2/24 dev ens3
138 iperf3 -s -p 4444
144 iperf3 -c 172.100.0.1 -t 30 -p 4444 &