Home | History | Annotate | Download | only in virt
      1 #!/bin/sh
      2 # Copyright (c) 2016 Oracle and/or its affiliates. All Rights Reserved.
      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 (at] oracle.com>
     18 
     19 TCID=geneve01
     20 TST_TOTAL=1
     21 
     22 virt_type="geneve"
     23 start_id=16700000
     24 
     25 # Setting GENEVE tunnel with 'ip' command is very similar to VxLAN
     26 # that is why using here 'vxlan_*' library functions.
     27 vxlan_dst_addr="uni"
     28 
     29 . test_net.sh
     30 . virt_lib.sh
     31 
     32 VIRT_PERF_THRESHOLD=${VIRT_PERF_THRESHOLD:-160}
     33 [ "$VIRT_PERF_THRESHOLD" -lt 160 ] && VIRT_PERF_THRESHOLD=160
     34 
     35 cleanup()
     36 {
     37 	cleanup_vifaces
     38 	tst_rhost_run -c "ip link delete ltp_v0 2>/dev/null"
     39 }
     40 TST_CLEANUP="cleanup"
     41 
     42 if [ -z $ip_local -o -z $ip_remote ]; then
     43 	tst_brkm TBROK "you must specify IP address"
     44 fi
     45 
     46 tst_resm TINFO "the same VNI must work"
     47 # VNI is 24 bits long, so max value, which is not reserved, is 0xFFFFFE
     48 vxlan_setup_subnet_$vxlan_dst_addr "id 0xFFFFFE" "id 0xFFFFFE"
     49 virt_compare_netperf
     50 
     51 tst_resm TINFO "different VNI shall not work together"
     52 vxlan_setup_subnet_$vxlan_dst_addr "id 0xFFFFFE" "id 0xFFFFFD"
     53 virt_compare_netperf "fail"
     54 
     55 tst_exit
     56