1f08c3bdfSopenharmony_ci#!/bin/sh
2f08c3bdfSopenharmony_ci# SPDX-License-Identifier: GPL-2.0-or-later
3f08c3bdfSopenharmony_ci# Copyright (c) 2018 Petr Vorel <pvorel@suse.cz>
4f08c3bdfSopenharmony_ci# Copyright (c) 2016-2017 Oracle and/or its affiliates.
5f08c3bdfSopenharmony_ci# Author: Alexey Kodanev <alexey.kodanev@oracle.com>
6f08c3bdfSopenharmony_ci
7f08c3bdfSopenharmony_ciTST_NEEDS_TMPDIR=1
8f08c3bdfSopenharmony_ciTST_OPTS="hi:d:"
9f08c3bdfSopenharmony_ciTST_PARSE_ARGS=virt_lib_parse_args
10f08c3bdfSopenharmony_ciTST_NEEDS_DRIVERS="geneve"
11f08c3bdfSopenharmony_ciTST_TESTFUNC=do_test
12f08c3bdfSopenharmony_ciTST_CLEANUP=virt_cleanup
13f08c3bdfSopenharmony_ciVIRT_PERF_THRESHOLD_MIN=160
14f08c3bdfSopenharmony_ci
15f08c3bdfSopenharmony_civirt_type="geneve"
16f08c3bdfSopenharmony_cistart_id=16700000
17f08c3bdfSopenharmony_ci
18f08c3bdfSopenharmony_ci# Setting GENEVE tunnel with 'ip' command is very similar to VxLAN
19f08c3bdfSopenharmony_ci# that is why using here 'vxlan_*' library functions.
20f08c3bdfSopenharmony_civxlan_dst_addr="uni"
21f08c3bdfSopenharmony_ci
22f08c3bdfSopenharmony_cido_test()
23f08c3bdfSopenharmony_ci{
24f08c3bdfSopenharmony_ci	tst_res TINFO "the same VNI must work"
25f08c3bdfSopenharmony_ci	# VNI is 24 bits long, so max value, which is not reserved, is 0xFFFFFE
26f08c3bdfSopenharmony_ci	vxlan_setup_subnet_$vxlan_dst_addr "id 0xFFFFFE" "id 0xFFFFFE"
27f08c3bdfSopenharmony_ci	virt_netperf_msg_sizes
28f08c3bdfSopenharmony_ci	virt_cleanup_rmt
29f08c3bdfSopenharmony_ci
30f08c3bdfSopenharmony_ci	tst_res TINFO "different VNI shall not work together"
31f08c3bdfSopenharmony_ci	vxlan_setup_subnet_$vxlan_dst_addr "id 0xFFFFFE" "id 0xFFFFFD"
32f08c3bdfSopenharmony_ci	virt_minimize_timeout
33f08c3bdfSopenharmony_ci	virt_compare_netperf "fail"
34f08c3bdfSopenharmony_ci}
35f08c3bdfSopenharmony_ci
36f08c3bdfSopenharmony_ci. virt_lib.sh
37f08c3bdfSopenharmony_citst_run
38