1#!/bin/sh 2# SPDX-License-Identifier: GPL-2.0-or-later 3# Copyright (c) 2018 Petr Vorel <pvorel@suse.cz> 4# Copyright (c) 2014-2017 Oracle and/or its affiliates. 5# Author: Alexey Kodanev <alexey.kodanev@oracle.com> 6# 7# Test-case 1: It requires remote host. Test will setup IPv4 and IPv6 virtual 8# sub-nets between two hosts, then will compare TCP performance 9# with and without VxLAN using ping or netstress test. 10# 11# Test-case 2: The same as above but must fail, because VXLAN allows 12# to communicate only within the same VXLAN segment. 13 14TST_NEEDS_TMPDIR=1 15TST_OPTS="hi:d:" 16TST_PARSE_ARGS=virt_lib_parse_args 17TST_USAGE=virt_lib_usage 18 19virt_type="vxlan" 20start_id=16700000 21 22# Destination address, can be unicast or multicast address 23vxlan_dst_addr="uni" 24 25TST_TEST_DATA=",gbp" 26TST_TEST_DATA_IFS="," 27TST_NEEDS_TMPDIR=1 28TST_TESTFUNC=do_test 29TST_CLEANUP=virt_cleanup 30# In average cases (with small packets less then 150 bytes) VxLAN slower 31# by 10-30%. If hosts are too close to each other, e.g. connected to the same 32# switch, VxLAN can be much slower when comparing to the performance without 33# any encapsulation. 34VIRT_PERF_THRESHOLD_MIN=160 35 36do_test() 37{ 38 virt_check_cmd virt_add ltp_v0 id 0 $2 || return 39 40 tst_res TINFO "the same VNI must work" 41 # VNI is 24 bits long, so max value, which is not reserved, is 0xFFFFFE 42 vxlan_setup_subnet_$vxlan_dst_addr "id 0xFFFFFE $2" "id 0xFFFFFE $2" 43 virt_netperf_msg_sizes 44 virt_cleanup_rmt 45 46 tst_res TINFO "different VNI shall not work together" 47 vxlan_setup_subnet_$vxlan_dst_addr "id 0xFFFFFE $2" "id 0xFFFFFD $2" 48 virt_minimize_timeout 49 virt_compare_netperf "fail" 50 virt_cleanup_rmt 51} 52 53. virt_lib.sh 54tst_run 55