diff options
author | pmikus <pmikus@cisco.com> | 2020-10-02 05:48:34 +0000 |
---|---|---|
committer | Peter Mikus <pmikus@cisco.com> | 2021-01-04 10:31:09 +0000 |
commit | 29ba4d375b1dd9a9357e7c0d6fa52107f0cab372 (patch) | |
tree | ceb4afd2b358f0968b4d49ba22132f3b7fc9e701 /resources/templates | |
parent | 3260a13762d1acf44af48581caacc5da611deae1 (diff) |
GSO: TAP/VHOST use case
Signed-off-by: pmikus <pmikus@cisco.com>
Change-Id: Ibafaaca4438587284d1e255c764f0701002941e8
(cherry picked from commit 44dcb3113c8ade2e44543746abca861a89362c9b)
Diffstat (limited to 'resources/templates')
-rw-r--r-- | resources/templates/vm/init_iperf3.sh | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/resources/templates/vm/init_iperf3.sh b/resources/templates/vm/init_iperf3.sh new file mode 100644 index 0000000000..959406ff4c --- /dev/null +++ b/resources/templates/vm/init_iperf3.sh @@ -0,0 +1,27 @@ +#!/bin/bash +mkdir /dev/pts +mkdir /dev/hugepages +mount -t devpts -o "rw,noexec,nosuid,gid=5,mode=0620" devpts /dev/pts || true +mount -t tmpfs -o "rw,noexec,nosuid,size=10%,mode=0755" tmpfs /run +cp /tmp/openvpp-testing/resources/tools/iperf/iperf_client.py /run +mount -t tmpfs -o "rw,noexec,nosuid,size=10%,mode=0755" tmpfs /tmp +mkdir -p /tmp/openvpp-testing/resources/tools/iperf/ +mv /run/iperf_client.py /tmp/openvpp-testing/resources/tools/iperf/ +mount -t hugetlbfs -o "rw,relatime,pagesize=2M" hugetlbfs /dev/hugepages +echo Y > /sys/module/vfio/parameters/enable_unsafe_noiommu_mode + +# Qemu virtio-net-pci mgmt +ip address add dev ens3 10.0.2.15/24 +ip link set dev ens3 up +ip route add default via 10.0.2.2 + +# Qemu virtio-net-pci vhost1 +ip address add dev ens6 ${ip_address_l} +ip link set dev ens6 up +ip route add ${ip_route_r} via ${ip_address_r} + +# Payload +${vnf_bin} + +# Safenet +poweroff -f
\ No newline at end of file |