• 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# It requires remote host. Test will setup IPv4 and IPv6 virtual
8# tunnel between two hosts, then will compare TCP performance
9# with and without GRE using ping or netstress test.
10
11TST_NEEDS_TMPDIR=1
12TST_TESTFUNC=virt_netperf_msg_sizes
13TST_SETUP=do_setup
14TST_CLEANUP=virt_cleanup
15. virt_lib.sh
16
17do_setup()
18{
19	virt_type="gre"
20	[ "$TST_IPV6" ] && virt_type="ip6gre"
21	virt_lib_setup
22
23	if [ -z $ip_local -o -z $ip_remote ]; then
24		tst_brk TBROK "you must specify IP address"
25	fi
26
27	tst_res TINFO "test $virt_type"
28	virt_setup "local $(tst_ipaddr) remote $(tst_ipaddr rhost) dev $(tst_iface)" \
29	"local $(tst_ipaddr rhost) remote $(tst_ipaddr) dev $(tst_iface rhost)"
30}
31
32tst_run
33