• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/bin/sh
2# Copyright (c) 2015-2017 Oracle and/or its affiliates.
3#
4# This program is free software; you can redistribute it and/or
5# modify it under the terms of the GNU General Public License as
6# published by the Free Software Foundation; either version 2 of
7# the License, or (at your option) any later version.
8#
9# This program is distributed in the hope that it would be useful,
10# but WITHOUT ANY WARRANTY; without even the implied warranty of
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12# GNU General Public License for more details.
13#
14# You should have received a copy of the GNU General Public License
15# along with this program. If not, see <http://www.gnu.org/licenses/>.
16#
17# Author: Alexey Kodanev <alexey.kodanev@oracle.com>
18#
19# It requires remote host. Test will setup IPv4 and IPv6 virtual
20# tunnel between two hosts, then will compare TCP performance
21# with and without GRE using ping or netstress test.
22
23TCID=gre01
24TST_TOTAL=1
25TST_NEEDS_TMPDIR=1
26
27. test_net.sh
28
29virt_type="gre"
30[ "$TST_IPV6" ] && virt_type="ip6gre"
31
32. virt_lib.sh
33
34TST_CLEANUP="virt_cleanup"
35
36if [ -z $ip_local -o -z $ip_remote ]; then
37	tst_brkm TBROK "you must specify IP address"
38fi
39
40tst_resm TINFO "test $virt_type"
41virt_setup "local $(tst_ipaddr) remote $(tst_ipaddr rhost) dev $(tst_iface)" \
42"local $(tst_ipaddr rhost) remote $(tst_ipaddr) dev $(tst_iface rhost)"
43
44virt_netperf_msg_sizes
45
46tst_exit
47