• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/bin/sh
2# SPDX-License-Identifier: GPL-2.0-or-later
3# Copyright (c) 2018 Petr Vorel <pvorel@suse.cz>
4# Copyright (c) 2015-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 VLAN using ping or netstress test.
10#
11# Test-case 2: The same as above but must fail, because VLAN allows
12#              to communicate only within the same VLAN segment.
13
14p0="protocol 802.1Q"
15p1="protocol 802.1ad"
16lb0="loose_binding off"
17lb1="loose_binding on"
18rh0="reorder_hdr off"
19rh1="reorder_hdr on"
20
21virt_type="vlan"
22
23TST_NEEDS_TMPDIR=1
24TST_TEST_DATA=",$p0 $lb0 $rh1,$p1 $lb1 $rh1"
25TST_TEST_DATA_IFS=","
26TST_TESTFUNC=do_test
27TST_SETUP=virt_lib_setup
28TST_CLEANUP=virt_cleanup
29
30do_test()
31{
32	virt_check_cmd virt_add ltp_v0 id 0 $2 || return
33
34	tst_res TINFO "networks with the same VLAN ID must work"
35	virt_setup "id 4094 $2" "id 4094 $2"
36	virt_netperf_msg_sizes
37	virt_cleanup_rmt
38
39	tst_res TINFO "different VLAN ID shall not work together"
40	virt_setup "id 4093 $2" "id 4094 $2"
41	virt_minimize_timeout
42	virt_compare_netperf "fail"
43	virt_cleanup_rmt
44}
45
46. virt_lib.sh
47tst_run
48