xref: /aosp_15_r20/external/ltp/testcases/network/virt/geneve02.sh (revision 49cdfc7efb34551c7342be41a7384b9c40d7cab7)
1#!/bin/sh
2# SPDX-License-Identifier: GPL-2.0-or-later
3# Copyright (c) 2019 Oracle and/or its affiliates.
4
5TST_NEEDS_TMPDIR=1
6TST_OPTS="hi:d:"
7TST_PARSE_ARGS=virt_lib_parse_args
8TST_NEEDS_DRIVERS="geneve"
9TST_TESTFUNC=do_test
10TST_CLEANUP=virt_cleanup
11TST_TEST_DATA="noudpcsum udp6zerocsumtx udp6zerocsumrx, udpcsum"
12TST_TEST_DATA_IFS=","
13VIRT_PERF_THRESHOLD_MIN=160
14
15virt_type="geneve"
16start_id=16700000
17
18# Setting GENEVE tunnel with 'ip' command is very similar to VxLAN
19# that is why using here 'vxlan_*' library functions.
20vxlan_dst_addr="uni"
21
22do_test()
23{
24	virt_check_cmd virt_add ltp_v0 id 1 $2 remote \
25		$(tst_ipaddr rhost) || return 1
26
27	vxlan_setup_subnet_$vxlan_dst_addr "id 0xFFFFFE $2" "id 0xFFFFFE $2"
28	virt_netperf_rand_sizes
29	virt_cleanup_rmt
30
31	return 0
32}
33
34. virt_lib.sh
35tst_run
36