diff options
Diffstat (limited to 'conf')
-rw-r--r-- | conf/00_common.conf | 34 | ||||
-rwxr-xr-x | conf/01_testcases.conf | 146 | ||||
-rw-r--r-- | conf/02_vswitch.conf | 29 | ||||
-rw-r--r-- | conf/03_traffic.conf | 131 | ||||
-rw-r--r-- | conf/04_vnf.conf | 29 | ||||
-rw-r--r-- | conf/05_collector.conf | 51 | ||||
-rw-r--r-- | conf/07_loadgen.conf | 18 | ||||
-rw-r--r-- | conf/08_llcmanagement.conf | 62 | ||||
-rw-r--r-- | conf/10_custom.conf | 7 | ||||
-rw-r--r-- | conf/11_openstack.conf | 43 | ||||
-rw-r--r-- | conf/12_k8s.conf | 41 | ||||
-rw-r--r-- | conf/__init__.py | 20 | ||||
-rw-r--r-- | conf/integration/01_testcases.conf | 598 | ||||
-rw-r--r-- | conf/integration/01a_testcases_l34_vxlan.conf | 18 | ||||
-rw-r--r-- | conf/integration/01b_dpdk_regression_tests.conf | 260 | ||||
-rw-r--r-- | conf/integration/01c_trex_vm_tests.conf | 182 | ||||
-rw-r--r-- | conf/integration/02_vswitch.conf | 6 | ||||
-rw-r--r-- | conf/kubernetes/01_testcases.conf | 12 |
18 files changed, 1043 insertions, 644 deletions
diff --git a/conf/00_common.conf b/conf/00_common.conf index 4c25b0b8..c3579014 100644 --- a/conf/00_common.conf +++ b/conf/00_common.conf @@ -98,11 +98,14 @@ SHELL_CMD = ['/bin/bash', '-c'] LOG_DIR = '/tmp' # default log for all "small" executables -LOG_FILE_DEFAULT = 'overall.log' +LOG_FILE_DEFAULT = 'vsperf-overall.log' # log file for all commands executed on host LOG_FILE_HOST_CMDS = 'host-cmds.log' +# log file prefix for infrastructure metrics +LOG_FILE_INFRA_METRICS_PFX = 'collectd_' + # ############################ # Test configuration # ############################ @@ -119,6 +122,18 @@ TEST_PARAMS = {} # delay enforced after every step to allow system to process changes TEST_STEP_DELAY = 5 +# parameter used, when running mupltiple tests, to accumulate _PARAMS_LIST +# parameters for multiple tests running in a series +CUMULATIVE_PARAMS = False + +# metric used by the performance matrix for comparision and analysis +# of tests run in a series. Must always refer to a numeric value. +# For example: 'throughput_rx_mbps', 'throughput_rx_fps', 'avg_latency_ns' +MATRIX_METRIC = 'throughput_rx_fps' + +# OPNFVPOD specification. +OPNFVPOD = '' + # ############################ # Modules # ############################ @@ -127,4 +142,19 @@ TEST_STEP_DELAY = 5 # it can be used to suppress automatic load of obsoleted or abstract modules # Example: # EXCLUDE_MODULES = ['ovs_vanilla', 'qemu_virtio_net', 'pidstat'] -EXCLUDE_MODULES = ["testcenter-rfc2544-throughput"] +EXCLUDE_MODULES = ["testcenter-rfc2544-throughput", "vsperf_controller", "vsperf_pb2", "vsperf_client", "vsperf_pb2_grpc"] + +# ############################ +# Vsperf Internal Options +# ############################ +# following options should not be changed by the user + +# internal list to keep track of PIDs of jobs executed by vsperf +_EXECUTED_PIDS = [] + +# dictionary containing the test-specific parameters of all tests being run +# for the purposes of cummulative parameter assignment using performance matrix +_PARAMS_LIST = {} + +# index number of the current test, used for naming of result files +_TEST_INDEX = 0 diff --git a/conf/01_testcases.conf b/conf/01_testcases.conf index bd5ba9eb..d766df65 100755 --- a/conf/01_testcases.conf +++ b/conf/01_testcases.conf @@ -1,4 +1,4 @@ -# Copyright 2015-2017 Intel Corporation. +# Copyright 2015-2018 Intel Corporation., Tieto # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -92,82 +92,6 @@ # "Dependency": [Test_Case_Name |None], # -# VPP specific macros used in TC defintions -# -VPP_P2P = [ - ['vswitch', 'add_switch', 'int_br0'], # STEP 0 - ['vswitch', 'add_phy_port', 'int_br0'], # STEP 1 - ['vswitch', 'add_phy_port', 'int_br0'], # STEP 2 - ['vswitch', 'add_connection', 'int_br0', '#STEP[1][0]', '#STEP[2][0]', True], - ['vswitch', 'add_connection', 'int_br0', '#STEP[2][0]', '#STEP[1][0]', True], - ['trafficgen', 'send_traffic', {}], - ['vswitch', 'dump_connections', 'int_br0'], - ['vswitch', 'del_connection', 'int_br0', '#STEP[1][0]', '#STEP[2][0]', True], - ['vswitch', 'del_connection', 'int_br0', '#STEP[2][0]', '#STEP[1][0]', True], - ['vswitch', 'del_port', 'int_br0', '#STEP[1][0]'], - ['vswitch', 'del_port', 'int_br0', '#STEP[2][0]'], - ['vswitch', 'del_switch', 'int_br0'], - ] -VPP_PVP = [ - ['vswitch', 'add_switch', 'int_br0'], # STEP 0 - ['vswitch', 'add_phy_port', 'int_br0'], # STEP 1 - ['vswitch', 'add_phy_port', 'int_br0'], # STEP 2 - ['vswitch', 'add_vport', 'int_br0'], # STEP 3 - ['vswitch', 'add_vport', 'int_br0'], # STEP 4 - ['vswitch', 'add_connection', 'int_br0', '#STEP[1][0]', '#STEP[3][0]', True], - ['vswitch', 'add_connection', 'int_br0', '#STEP[4][0]', '#STEP[2][0]', True], - ['vswitch', 'add_connection', 'int_br0', '#STEP[2][0]', '#STEP[4][0]', True], - ['vswitch', 'add_connection', 'int_br0', '#STEP[3][0]', '#STEP[1][0]', True], - ['vnf', 'start'], - ['trafficgen', 'send_traffic', {}], - ['vnf', 'stop'], - ['vswitch', 'dump_connections', 'int_br0'], - ['vswitch', 'del_connection', 'int_br0', '#STEP[1][0]', '#STEP[3][0]', True], - ['vswitch', 'del_connection', 'int_br0', '#STEP[4][0]', '#STEP[2][0]', True], - ['vswitch', 'del_connection', 'int_br0', '#STEP[2][0]', '#STEP[4][0]', True], - ['vswitch', 'del_connection', 'int_br0', '#STEP[3][0]', '#STEP[1][0]', True], - ['vswitch', 'del_port', 'int_br0', '#STEP[1][0]'], - ['vswitch', 'del_port', 'int_br0', '#STEP[2][0]'], - ['vswitch', 'del_port', 'int_br0', '#STEP[3][0]'], - ['vswitch', 'del_port', 'int_br0', '#STEP[4][0]'], - ['vswitch', 'del_switch', 'int_br0'], - ] -VPP_PVVP = [ - ['vswitch', 'add_switch', 'int_br0'], # STEP 0 - ['vswitch', 'add_phy_port', 'int_br0'], # STEP 1 - ['vswitch', 'add_phy_port', 'int_br0'], # STEP 2 - ['vswitch', 'add_vport', 'int_br0'], # STEP 3 - ['vswitch', 'add_vport', 'int_br0'], # STEP 4 - ['vswitch', 'add_vport', 'int_br0'], # STEP 5 - ['vswitch', 'add_vport', 'int_br0'], # STEP 6 - ['vswitch', 'add_connection', 'int_br0', '#STEP[1][0]', '#STEP[3][0]', True], - ['vswitch', 'add_connection', 'int_br0', '#STEP[4][0]', '#STEP[5][0]', True], - ['vswitch', 'add_connection', 'int_br0', '#STEP[6][0]', '#STEP[2][0]', True], - ['vswitch', 'add_connection', 'int_br0', '#STEP[2][0]', '#STEP[6][0]', True], - ['vswitch', 'add_connection', 'int_br0', '#STEP[5][0]', '#STEP[4][0]', True], - ['vswitch', 'add_connection', 'int_br0', '#STEP[3][0]', '#STEP[1][0]', True], - ['vnf1', 'start'], - ['vnf2', 'start'], - ['trafficgen', 'send_traffic', {}], - ['vnf2', 'stop'], - ['vnf1', 'stop'], - ['vswitch', 'dump_connections', 'int_br0'], - ['vswitch', 'del_connection', 'int_br0', '#STEP[1][0]', '#STEP[3][0]', True], - ['vswitch', 'del_connection', 'int_br0', '#STEP[4][0]', '#STEP[5][0]', True], - ['vswitch', 'del_connection', 'int_br0', '#STEP[6][0]', '#STEP[2][0]', True], - ['vswitch', 'del_connection', 'int_br0', '#STEP[2][0]', '#STEP[6][0]', True], - ['vswitch', 'del_connection', 'int_br0', '#STEP[5][0]', '#STEP[4][0]', True], - ['vswitch', 'del_connection', 'int_br0', '#STEP[3][0]', '#STEP[1][0]', True], - ['vswitch', 'del_port', 'int_br0', '#STEP[1][0]'], - ['vswitch', 'del_port', 'int_br0', '#STEP[2][0]'], - ['vswitch', 'del_port', 'int_br0', '#STEP[3][0]'], - ['vswitch', 'del_port', 'int_br0', '#STEP[4][0]'], - ['vswitch', 'del_port', 'int_br0', '#STEP[5][0]'], - ['vswitch', 'del_port', 'int_br0', '#STEP[6][0]'], - ['vswitch', 'del_switch', 'int_br0'], - ] - -# # Generic performance TC definitions # PERFORMANCE_TESTS = [ @@ -232,6 +156,18 @@ PERFORMANCE_TESTS = [ }, }, }, + { + "Name": "phy2phy_tput_mod_vlan_cont", + "Deployment": "p2p", + "Frame Modification": "vlan", + "Description": "Phy2Phy VLAN Continuous Stream", + "Parameters" : { + "TRAFFIC" : { + "traffic_type" : "rfc2544_continuous", + "frame_rate" : 100, + }, + }, + }, { "Name": "phy2phy_cont", "Deployment": "p2p", @@ -244,6 +180,18 @@ PERFORMANCE_TESTS = [ }, }, { + "Name": "phy2phy_burst", + "Deployment": "p2p", + "Description": "Phy2Phy single burst of 1000 frames at 100% frame rate", + "Parameters" : { + "TRAFFIC" : { + "traffic_type" : "burst", + "frame_rate" : 100, + "burst_size" : 1000, + }, + }, + }, + { "Name": "pvp_cont", "Deployment": "pvp", "Description": "PVP Continuous Stream", @@ -288,6 +236,18 @@ PERFORMANCE_TESTS = [ }, }, { + "Name": "phy2phy_scalability_cont", + "Deployment": "p2p", + "Description": "Phy2Phy Scalability Continuous Stream", + "Parameters" : { + "TRAFFIC" : { + "traffic_type" : "rfc2544_continuous", + "frame_rate" : 100, + "multistream" : 8000, + }, + }, + }, + { "Name": "pvp_tput", "Deployment": "pvp", "Description": "LTD.Throughput.RFC2544.PacketLossRatio", @@ -361,9 +321,14 @@ PERFORMANCE_TESTS = [ }, }, }, + # + # Backward compatible definition of VPP TCs. + # It will be removed after CI reporting will be fixed to use + # default TCs for VPP reporting. + # { "Name": "phy2phy_tput_vpp", - "Deployment": "clean", + "Deployment": "p2p", "Description": "VPP: LTD.Throughput.RFC2544.PacketLossRatio", "vSwitch" : "VppDpdkVhost", "Parameters" : { @@ -371,11 +336,10 @@ PERFORMANCE_TESTS = [ "traffic_type" : "rfc2544_throughput", }, }, - "TestSteps": VPP_P2P, }, { "Name": "phy2phy_cont_vpp", - "Deployment": "clean", + "Deployment": "p2p", "Description": "VPP: Phy2Phy Continuous Stream", "vSwitch" : "VppDpdkVhost", "Parameters" : { @@ -384,11 +348,10 @@ PERFORMANCE_TESTS = [ "frame_rate" : 100, }, }, - "TestSteps": VPP_P2P, }, { "Name": "phy2phy_back2back_vpp", - "Deployment": "clean", + "Deployment": "p2p", "Description": "VPP: LTD.Throughput.RFC2544.BackToBackFrames", "vSwitch" : "VppDpdkVhost", "Parameters" : { @@ -396,11 +359,10 @@ PERFORMANCE_TESTS = [ "traffic_type" : "rfc2544_back2back", }, }, - "TestSteps": VPP_P2P, }, { "Name": "pvp_tput_vpp", - "Deployment": "clean", + "Deployment": "pvp", "Description": "VPP: LTD.Throughput.RFC2544.PacketLossRatio", "vSwitch" : "VppDpdkVhost", "Parameters" : { @@ -408,11 +370,10 @@ PERFORMANCE_TESTS = [ "traffic_type" : "rfc2544_throughput", }, }, - "TestSteps": VPP_PVP, }, { "Name": "pvp_cont_vpp", - "Deployment": "clean", + "Deployment": "pvp", "Description": "VPP: PVP Continuous Stream", "vSwitch" : "VppDpdkVhost", "Parameters" : { @@ -420,11 +381,10 @@ PERFORMANCE_TESTS = [ "traffic_type" : "rfc2544_continuous", }, }, - "TestSteps": VPP_PVP, }, { "Name": "pvp_back2back_vpp", - "Deployment": "clean", + "Deployment": "pvp", "Description": "VPP: LTD.Throughput.RFC2544.BackToBackFrames", "vSwitch" : "VppDpdkVhost", "Parameters" : { @@ -432,11 +392,10 @@ PERFORMANCE_TESTS = [ "traffic_type" : "rfc2544_back2back", }, }, - "TestSteps": VPP_PVP, }, { "Name": "pvvp_tput_vpp", - "Deployment": "clean", + "Deployment": "pvvp", "Description": "VPP: LTD.Throughput.RFC2544.PacketLossRatio", "vSwitch" : "VppDpdkVhost", "Parameters" : { @@ -444,11 +403,10 @@ PERFORMANCE_TESTS = [ "traffic_type" : "rfc2544_throughput", }, }, - "TestSteps": VPP_PVVP, }, { "Name": "pvvp_cont_vpp", - "Deployment": "clean", + "Deployment": "pvvp", "Description": "VPP: PVP Continuous Stream", "vSwitch" : "VppDpdkVhost", "Parameters" : { @@ -456,11 +414,10 @@ PERFORMANCE_TESTS = [ "traffic_type" : "rfc2544_continuous", }, }, - "TestSteps": VPP_PVVP, }, { "Name": "pvvp_back2back_vpp", - "Deployment": "clean", + "Deployment": "pvvp", "Description": "VPP: LTD.Throughput.RFC2544.BackToBackFrames", "vSwitch" : "VppDpdkVhost", "Parameters" : { @@ -468,6 +425,5 @@ PERFORMANCE_TESTS = [ "traffic_type" : "rfc2544_back2back", }, }, - "TestSteps": VPP_PVVP, }, ] diff --git a/conf/02_vswitch.conf b/conf/02_vswitch.conf index 6a830a05..4eca1a52 100644 --- a/conf/02_vswitch.conf +++ b/conf/02_vswitch.conf @@ -1,4 +1,4 @@ -# Copyright 2015-2016 Intel Corporation. +# Copyright 2015-2018 Intel Corporation, Tieto and others. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -115,7 +115,7 @@ PATHS['vswitch'] = { 'path': os.path.join(ROOT_DIR, 'src/vpp/vpp/build-root/install-vpp-native/vpp'), 'vpp': 'bin/vpp', 'vppctl': 'bin/vppctl', - 'vpp_plugin_path' : 'lib64/vpp_plugins', + 'vpp_plugin_path' : 'lib/vpp_plugins', }, 'bin': { 'vpp': 'vpp', @@ -172,7 +172,11 @@ OVS_OLD_STYLE_MQ = False VSWITCHD_VANILLA_ARGS = [] # Bridge name to be used by VSWTICH -VSWITCH_BRIDGE_NAME = 'br0' +VSWITCH_BRIDGE_NAME = 'vsperf-br0' + +# A tunnel type used by OP2P and PTUNP deployments +# Supported values: 'vxlan', 'gre' or 'geneve' +TUNNEL_TYPE = 'vxlan' # directory where hugepages will be mounted on system init HUGEPAGE_DIR = '/dev/hugepages' @@ -201,12 +205,26 @@ VSWITCH = "OvsDpdkVhost" VSWITCH_JUMBO_FRAMES_ENABLED = False VSWITCH_JUMBO_FRAMES_SIZE = 9000 +# default arguments of OVS ctl tools +OVS_VSCTL_ARGS = [] +OVS_OFCTL_ARGS = ['-O', 'OpenFlow13'] # backward compatible default value +OVS_APPCTL_ARGS = [] + +# default flow template to be used by OVS classes +OVS_FLOW_TEMPLATE = { + 'idle_timeout': '0' +} + +# enable or disable configuration of routing tables; See vswitchperf_design.rst +# for details. +OVS_ROUTING_TABLES = False + ######################### ## VPP ######################### # Set of arguments used for startup of VPP # NOTE: DPDK socket mem allocation is driven by parameter DPDK_SOCKET_MEM -VSWITCH_VPP_CLI_SOCK = '' +VSWITCH_VPP_CLI_SOCK = '/run/vpp/cli.sock' VSWITCH_VPP_ARGS = { 'unix' : [ 'interactive', # required by VSPERF to detect successful VPP startup @@ -218,6 +236,9 @@ VSWITCH_VPP_ARGS = { 'workers 2', 'corelist-workers 4,5', ], + 'socksvr' : [ + 'socket-name /run/vpp-api.sock', + ], } # log file for VPP diff --git a/conf/03_traffic.conf b/conf/03_traffic.conf index 3c7bd2f5..01747a38 100644 --- a/conf/03_traffic.conf +++ b/conf/03_traffic.conf @@ -1,4 +1,4 @@ -# Copyright 2015-2017 Intel Corporation. +# Copyright 2015-2018 Intel Corporation., Tieto # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -23,8 +23,8 @@ LOG_FILE_TRAFFIC_GEN = 'traffic-gen.log' # Detailed description of TRAFFIC dictionary items follows: # # 'traffic_type' - One of the supported traffic types. -# E.g. rfc2544_throughput, rfc2544_back2back -# or rfc2544_continuous +# E.g. rfc2544_throughput, rfc2544_back2back, +# rfc2544_continuous or burst # Data type: str # Default value: "rfc2544_throughput". # 'bidir' - Specifies if generated traffic will be full-duplex (True) @@ -36,6 +36,12 @@ LOG_FILE_TRAFFIC_GEN = 'traffic-gen.log' # continuous stream tests. # Data type: int # Default value: 100. +# 'burst_size' - Defines a number of frames in the single burst, which is sent +# by burst traffic type. Burst size is applied for each direction, +# i.e. the total number of tx frames will be 2*burst_size in case of +# bidirectional traffic. +# Data type: int +# Default value: 100. # 'multistream' - Defines number of flows simulated by traffic generator. # Value 0 disables multistream feature # Data type: int @@ -58,7 +64,6 @@ LOG_FILE_TRAFFIC_GEN = 'traffic-gen.log' # feature. If enabled, it will implicitly insert a flow # for each stream. If multistream is disabled, then # pre-installed flows will be ignored. -# Note: It is supported only for p2p deployment scenario. # Data type: str # Supported values: # "Yes" - flows will be inserted into OVS @@ -112,7 +117,7 @@ LOG_FILE_TRAFFIC_GEN = 'traffic-gen.log' # NOTE: It can be modified by vsperf in some scenarios. # Data type: str # Default value: "90.90.90.90". -# 'proto' - Specifies deflaut protocol type. +# 'proto' - Specifies protocol type. # Please check particular traffic generator implementation # for supported protocol types. # Data type: str @@ -147,9 +152,81 @@ LOG_FILE_TRAFFIC_GEN = 'traffic-gen.log' # congestion (DEI header field). # Data type: int (NOTE: must fit to 1 bit) # Default value: 0 +# 'capture' - A dictionary with traffic capture configuration. +# NOTE: It is supported only by T-Rex traffic generator. +# 'enabled' - Specifies if traffic should be captured +# Data type: bool +# Default value: False +# 'tx_ports' - A list of ports, where frames transmitted towards DUT will +# be captured. Ports have numbers 0 and 1. TX packet capture +# is disabled if list of ports is empty. +# Data type: list +# Default value: [0] +# 'rx_ports' - A list of ports, where frames received from DUT will +# be captured. Ports have numbers 0 and 1. RX packet capture +# is disabled if list of ports is empty. +# Data type: list +# Default value: [1] +# 'count' - A number of frames to be captured. The same count value +# is applied to both TX and RX captures. +# Data type: int +# Default value: 1 +# 'filter' - An expression used to filter TX and RX packets. It uses the same +# syntax as pcap library. See pcap-filter man page for additional +# details. +# Data type: str +# Default value: '' +# 'scapy' - A dictionary with definition of a frame content for both traffic +# directions. The frame content is defined by a SCAPY notation. +# NOTE: It is supported only by the T-Rex traffic generator. +# Following keywords can be used to refer to the related parts of +# the TRAFFIC dictionary: +# Ether_src - refers to TRAFFIC['l2']['srcmac'] +# Ether_dst - refers to TRAFFIC['l2']['dstmac'] +# IP_proto - refers to TRAFFIC['l3']['proto'] +# IP_PROTO - refers to upper case version of TRAFFIC['l3']['proto'] +# IP_src - refers to TRAFFIC['l3']['srcip'] +# IP_dst - refers to TRAFFIC['l3']['dstip'] +# IP_PROTO_sport - refers to TRAFFIC['l4']['srcport'] +# IP_PROTO_dport - refers to TRAFFIC['l4']['dstport'] +# Dot1Q_prio - refers to TRAFFIC['vlan']['priority'] +# Dot1Q_id - refers to TRAFFIC['vlan']['cfi'] +# Dot1Q_vlan - refers to TRAFFIC['vlan']['id'] +# '0' - A string with the frame definition for the 1st direction. +# Data type: str +# Default value: 'Ether(src={Ether_src}, dst={Ether_dst})/' +# 'Dot1Q(prio={Dot1Q_prio}, id={Dot1Q_id}, vlan={Dot1Q_vlan})/' +# 'IP(proto={IP_proto}, src={IP_src}, dst={IP_dst})/' +# '{IP_PROTO}(sport={IP_PROTO_sport}, dport={IP_PROTO_dport})' +# '1' - A string with the frame definition for the 2nd direction. +# Data type: str +# Default value: 'Ether(src={Ether_dst}, dst={Ether_src})/' +# 'Dot1Q(prio={Dot1Q_prio}, id={Dot1Q_id}, vlan={Dot1Q_vlan})/' +# 'IP(proto={IP_proto}, src={IP_dst}, dst={IP_src})/' +# '{IP_PROTO}(sport={IP_PROTO_dport}, dport={IP_PROTO_sport})', +# 'latency_histogram' +# - A dictionary with definition of a latency histogram provision in results. +# 'enabled' - Specifies if the histogram provisioning is enabled or not. +# 'type' - Defines how histogram is provided. Currenty only 'Default' is defined. +# 'Default' - Default histogram as provided by the Traffic-generator. +# 'imix' - A dictionary for IMIX Specification. +# 'enabled' - Specifies if IMIX is enabled or NOT. +# 'type' - The specification type - denotes how IMIX is specified. +# Currently only 'genome' type is defined. +# Other types (ex: table-of-proportions) can be added in future. +# 'genome' - The Genome Encoding of Pkt-Sizes and Ratio for IMIX. +# The ratio is inferred from the number of particular geneome characters. +# Genome encoding is described in RFC 6985. This specification is closest +# to the method described in section 6.2 of RFC 6985. +# Ex: 'aaaaaaaddddg' denotes ratio of 7:4:1 of packets sizes 64:512:1518. +# Note: Exact-sequence is not maintained, only the ratio of packets +# is ensured. +# Data type: str +# Default Value: 'aaaaaaaddddg' TRAFFIC = { 'traffic_type' : 'rfc2544_throughput', 'frame_rate' : 100, + 'burst_size' : 100, 'bidir' : 'True', # will be passed as string in title format to tgen 'multistream' : 0, 'stream_type' : 'L4', @@ -179,6 +256,33 @@ TRAFFIC = { 'priority': 0, 'cfi': 0, }, + 'capture': { + 'enabled': False, + 'tx_ports' : [0], + 'rx_ports' : [1], + 'count': 1, + 'filter': '', + }, + 'scapy': { + 'enabled': False, + '0' : 'Ether(src={Ether_src}, dst={Ether_dst})/' + 'Dot1Q(prio={Dot1Q_prio}, id={Dot1Q_id}, vlan={Dot1Q_vlan})/' + 'IP(proto={IP_proto}, src={IP_src}, dst={IP_dst})/' + '{IP_PROTO}(sport={IP_PROTO_sport}, dport={IP_PROTO_dport})', + '1' : 'Ether(src={Ether_dst}, dst={Ether_src})/' + 'Dot1Q(prio={Dot1Q_prio}, id={Dot1Q_id}, vlan={Dot1Q_vlan})/' + 'IP(proto={IP_proto}, src={IP_dst}, dst={IP_src})/' + '{IP_PROTO}(sport={IP_PROTO_dport}, dport={IP_PROTO_sport})', + }, + 'latency_histogram': { + 'enabled': False, + 'type': 'Default', + }, + 'imix': { + 'enabled': False, + 'type': 'genome', + 'genome': 'aaaaaaaddddg', + }, } #path to traffic generators directory. @@ -368,6 +472,12 @@ TRAFFICGEN_STC_WEST_INTF_GATEWAY_ADDR = "" # Print additional information to the terminal during the test TRAFFICGEN_STC_VERBOSE = "True" +# Live Results Required? +TRAFFICGEN_STC_LIVE_RESULTS = "True" + +# Live results file name +TRAFFICGEN_STC_LIVERESULTS_FILE = "stc-liveresults.dat" + # Spirent TestCenter Configuration -- END ######################################### @@ -456,11 +566,20 @@ TRAFFICGEN_TREX_LEARNING_MODE = True TRAFFICGEN_TREX_LEARNING_DURATION = 5 # FOR SR-IOV or multistream layer 2 tests to work with T-Rex enable Promiscuous mode TRAFFICGEN_TREX_PROMISCUOUS = False +# Enable below options to force T-rex api to attempt to use speed specified on server +# side when pushing traffic. For 40G use 40000. For 25G use 25000. +TRAFFICGEN_TREX_FORCE_PORT_SPEED = False +TRAFFICGEN_TREX_PORT_SPEED = 10000 # 10G +TRAFFICGEN_TREX_LIVE_RESULTS = True +TRAFFICGEN_TREX_LC_FILE = "trex-liveresults-counts.dat" +TRAFFICGEN_TREX_LE_FILE = "trex-liveresults-errors.dat" + + PATHS['trafficgen'] = { 'Trex': { 'type' : 'src', 'src': { - 'path': os.path.join(ROOT_DIR, 'src/trex/trex/scripts/automation/trex_control_plane/stl') + 'path': os.path.join(ROOT_DIR, 'src/trex/trex/scripts/automation/trex_control_plane/interactive') } } } diff --git a/conf/04_vnf.conf b/conf/04_vnf.conf index 37fbe2b1..1574ca8d 100644 --- a/conf/04_vnf.conf +++ b/conf/04_vnf.conf @@ -87,8 +87,9 @@ GUEST_TIMEOUT = [180] # Guest images may require different drive types such as ide to mount shared # locations and/or boot correctly. You can modify the types here. -GUEST_BOOT_DRIVE_TYPE = ['scsi'] -GUEST_SHARED_DRIVE_TYPE = ['scsi'] +# Default setting to ide to support qemu version 3.1.1. +GUEST_BOOT_DRIVE_TYPE = ['ide'] +GUEST_SHARED_DRIVE_TYPE = ['ide'] # guest loopback application method; supported options are: # 'testpmd' - testpmd from dpdk will be built and used @@ -130,10 +131,13 @@ GUEST_PROMPT = ['root.*#'] GUEST_NICS_NR = [2] # template for guests with 4 NICS, but only GUEST_NICS_NR NICS will be configured at runtime -GUEST_NICS = [[{'device' : 'eth0', 'mac' : '#MAC(00:00:00:00:00:01,2)', 'pci' : '00:04.0', 'ip' : '#IP(192.168.1.2,4)/24'}, - {'device' : 'eth1', 'mac' : '#MAC(00:00:00:00:00:02,2)', 'pci' : '00:05.0', 'ip' : '#IP(192.168.1.3,4)/24'}, - {'device' : 'eth2', 'mac' : '#MAC(cc:00:00:00:00:01,2)', 'pci' : '00:06.0', 'ip' : '#IP(192.168.1.4,4)/24'}, - {'device' : 'eth3', 'mac' : '#MAC(cc:00:00:00:00:02,2)', 'pci' : '00:07.0', 'ip' : '#IP(192.168.1.5,4)/24'}, +# With qemu verison 3.1.1 the PCI assignments are starting from 00.03.0. +# TODO: Need a better approach for pci configuration. Currently its based on what qemu-system-x86_64 assigns. +# One option is to use the pci configuration as one of the parameters of the qemu-system-x86_64 command. +GUEST_NICS = [[{'device' : 'eth0', 'mac' : '#MAC(00:00:00:00:00:01,2)', 'pci' : '00:03.0', 'ip' : '#IP(192.168.1.2,4)/24'}, + {'device' : 'eth1', 'mac' : '#MAC(00:00:00:00:00:02,2)', 'pci' : '00:04.0', 'ip' : '#IP(192.168.1.3,4)/24'}, + {'device' : 'eth2', 'mac' : '#MAC(cc:00:00:00:00:01,2)', 'pci' : '00:05.0', 'ip' : '#IP(192.168.1.4,4)/24'}, + {'device' : 'eth3', 'mac' : '#MAC(cc:00:00:00:00:02,2)', 'pci' : '00:06.0', 'ip' : '#IP(192.168.1.5,4)/24'}, ]] # amount of host memory allocated for each guest @@ -142,6 +146,8 @@ GUEST_MEMORY = ['2048'] GUEST_HUGEPAGES_NR = ['1024'] # test-pmd requires 2 VM cores +# It is also possible to configure GUEST's CPU topology, +# e.g. GUEST_SMP = ["sockets=1,cores=2"] GUEST_SMP = ['2'] # cpu features to the guest, default options provided to pass all available @@ -206,11 +212,18 @@ GUEST_BRIDGE_IP = ['#IP(1.1.1.5)/16'] # Note: Testpmd must be executed in interactive mode. It means, that # VSPERF won't work correctly if '-i' will be removed. GUEST_TESTPMD_PARAMS = ['-c 0x3 -n 4 --socket-mem 512 -- ' - '--burst=64 -i --txqflags=0xf00 ' - '--disable-hw-vlan'] + '--burst=64 -i '] # packet forwarding mode supported by testpmd; Please see DPDK documentation # for comprehensive list of modes supported by your version. # e.g. io|mac|mac_retry|macswap|flowgen|rxonly|txonly|csum|icmpecho|... # Note: Option "mac_retry" has been changed to "mac retry" since DPDK v16.07 GUEST_TESTPMD_FWD_MODE = ['csum'] + +# map queue stats to separate regs to verify MQ functionality +# setting this from testpmd command line prameters since DPDK 18.11 does not +# work as expected so we have to set this inside testpmd i.e. to set rx queue +# 2 on port 0 to mapping 5 add: "rx 0 2 5" +# Please see DPDK documentation to get more information how to set stat_qmap +# (https://doc.dpdk.org/guides/testpmd_app_ug/testpmd_funcs.html) +GUEST_QUEUE_STATS_MAPPING = [] diff --git a/conf/05_collector.conf b/conf/05_collector.conf index 9fd2558c..882ef414 100644 --- a/conf/05_collector.conf +++ b/conf/05_collector.conf @@ -1,4 +1,4 @@ -# Copyright 2015 Intel Corporation. +# Copyright 2015-2018 Intel Corporation, Spirent Communications # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -31,3 +31,52 @@ PIDSTAT_SAMPLE_INTERVAL = 1 # prefix of pidstat's log file; separate log file is created # for each testcase in the directory with results LOG_FILE_PIDSTAT = 'pidstat' + +########################################## +# Collectd Specific configuration +########################################## +COLLECTD_IP = "127.0.0.1" +COLLECTD_PORT = 25826 +COLLECTD_SECURITY_LEVEL = 0 +COLLECTD_AUTH_FILE = '' +LOG_FILE_COLLECTD = 'collectd' + +# Configure filters - Interested (KEYS), Not-Interested (XKEYS) +COLLECTD_CPU_KEYS = ['system', 'idle'] +COLLECTD_PROCESSES_KEYS = ['user', 'system'] +COLLECTD_INTERFACE_KEYS = ['dropped'] +COLLECTD_OVSSTAT_KEYS = ['dropped', 'broadcast'] +COLLECTD_DPDKSTAT_KEYS = ['dropped'] +COLLECTD_INTELRDT_KEYS = ['llc'] + +# Interface types to exclude +COLLECTD_INTERFACE_XKEYS = ['docker', 'lo'] +# Core-Ids to Exclude from +# Provide individual core-ids or range of core-ids. +# The range is specified using '-' +COLLECTD_INTELRDT_XKEYS = [ ] + +############################################### +# Multi Command Collector Configurations +############################################### +MC_COLLECTD_CSV = '/tmp/csv/' +MC_COLLECTD_CMD = '/opt/collectd/sbin/collectd' +MC_PROX_HOME = '/home/opnfv/irq/' +MC_PROX_CMD = './runrapid.py' +MC_PROX_OUT = 'RUNirq.irq.log' +MC_CRON_OUT = '/tmp/ovs-cores.log' +MC_BEAT_CFILE = '/etc/filebeat/filebeat.yml' + +############################################### +# Cadvisor Specific configuration +############################################### + +LOG_FILE_CADVISOR = 'cadvisor' +CADVISOR_STORAGE_DRIVER = 'stdout,influxdb' +# ip:port of influxdb +CADVISOR_STORAGE_HOST = '10.10.120.22:8086' +CADVISOR_DRIVER_DB = '_internal' +# names of all containers to calcualte results +#CADVISOR_CONTAINERS = ['container1name','container2name'] +CADVISOR_CONTAINERS = [] + diff --git a/conf/07_loadgen.conf b/conf/07_loadgen.conf index e7349a5d..0b2cc1e6 100644 --- a/conf/07_loadgen.conf +++ b/conf/07_loadgen.conf @@ -15,7 +15,23 @@ LOADGEN_DIR = os.path.join(ROOT_DIR, 'tools/load_gen') ###################################################### -# LOADGEN tool: one of DummyLoadGen, Stress, StressNg +# LOADGEN tool: one of DummyLoadGen, Stress, StressNg, +# and StressorVM ###################################################### LOADGEN = "DummyLoadGen" ###################################################### + + +###################################################### +# StressorVm specific COnfiguration +###################################################### +NN_COUNT = 1 +NN_MEMORY = ['4096'] +NN_SMP = ['2'] +NN_IMAGE = ['/home/opnfv/stressng-images/stressng-high-TypeE.qemu'] +NN_SHARED_DRIVE_TYPE = ['scsi'] +NN_BOOT_DRIVE_TYPE = ['scsi'] +NN_CORE_BINDING = [('9','10')] +NN_NICS_NR = ['2'] +NN_BASE_VNC_PORT = 4 +NN_LOG_FILE = 'nnqemu.log' diff --git a/conf/08_llcmanagement.conf b/conf/08_llcmanagement.conf new file mode 100644 index 00000000..92e6367c --- /dev/null +++ b/conf/08_llcmanagement.conf @@ -0,0 +1,62 @@ +# Copyright 2017-2018 Spirent Communications. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +################################## +# LLC Management Configuration # +################################## + +#################################################################### +# Specify how the policy is defined. +# Select any one of the following: COS, CUSTOM. +#################################################################### +POLICY_TYPE = 'COS' + +#################################################################### +# Policy Definition by COS +# Choose any one class of service among Gold, Silver and Bronze. +# The min-cache and max-cache for these 3 services vary. +# gold - has the maximum with 'guaranteed' allocation. +# sliver-bf- lower than gold, and best effort. +# bronze-shared - least and shared. +# This value will be used for "policy" variable in the REST call. +#################################################################### +VSWITCH_COS = "silver-bf" +VNF_COS = "silver-bf" +PMD_COS = "gold" +NOISEVM_COS = "bronze-shared" + +#################################################################### +# CUSTOM Policy Definition +# Specify Minimum and Maximum Cache Values each workload +# [mincache, maxcache] +#################################################################### +VSWITCH_CA = [10, 18] +VNF_CA = [8, 10] +PMD_CA = [10, 16] +NOISEVM_CA = [1, 1] + +#################################################################### +# Intel RMD Server Specific Configuration +# Port: 8081 (Debug) 8888 (normal) +# Version: v1 +# IP: only localhost. +#################################################################### +RMD_PORT = 8081 +RMD_SERVER_IP = '127.0.0.1' +RMD_API_VERSION = 'v1' + +#################################################################### +# LLC Allocation Control. +#################################################################### +LLC_ALLOCATION = False diff --git a/conf/10_custom.conf b/conf/10_custom.conf index 917d16b4..99600966 100644 --- a/conf/10_custom.conf +++ b/conf/10_custom.conf @@ -138,11 +138,18 @@ TRAFFICGEN_TREX_LEARNING_MODE = True TRAFFICGEN_TREX_LEARNING_DURATION = 5 # FOR SR-IOV or multistream layer 2 tests to work with T-Rex enable Promiscuous mode TRAFFICGEN_TREX_PROMISCUOUS = False +# Enable below options to force T-rex api to attempt to use speed specified on server +# side when pushing traffic. For 40G use 40000. For 25G use 25000. +TRAFFICGEN_TREX_FORCE_PORT_SPEED = False +TRAFFICGEN_TREX_PORT_SPEED = 10000 # 10G # TRex validation option for RFC2544 TRAFFICGEN_TREX_VERIFICATION_MODE = False TRAFFICGEN_TREX_VERIFICATION_DURATION = 60 TRAFFICGEN_TREX_MAXIMUM_VERIFICATION_TRIALS = 10 +TRAFFICGEN_TREX_RFC2544_MAX_REPEAT = 0 +TRAFFICGEN_TREX_RFC2544_BINARY_SEARCH_LOSS_VERIFICATION = False + # TREX Configuration and Connection Info-- END #################################################### diff --git a/conf/11_openstack.conf b/conf/11_openstack.conf new file mode 100644 index 00000000..6be65228 --- /dev/null +++ b/conf/11_openstack.conf @@ -0,0 +1,43 @@ +# Copyright 2020 Spirent Communications +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# This file describes a list of parameters used for deploying a TGEN, +# on Openstack. + + +DEFAULT_POLLING_INTERVAL = 10 +SCENARIOS = ['templates/l2_2c_2i.yaml'] + +SCHEMA = 'templates/scenario.yaml' + +OS_AUTH_URL="http://10.10.180.21/identity" +OS_PROJECT_ID="0440a230a799460facec0d09dde64497" +OS_PROJECT_NAME="admin" +OS_USER_DOMAIN_NAME="Default" +OS_PROJECT_DOMAIN_ID="default" +OS_USERNAME="admin" +OS_PASSWORD="admin123" +OS_REGION_NAME="RegionOne" +OS_INTERFACE="public" +OS_IDENTITY_API_VERSION=3 +OS_INSECURE=False +OS_CA_CERT= 'None' + +STACK_NAME = 'testvnf_vsperf' +CLEANUP_ON_EXIT = True + +FLAVOR_NAME = 'm1.large' +IMAGE_NAME = 'bionic' +EXTERNAL_NET = 'public' +DNS_NAMESERVERS = ['8.8.8.8', '8.8.4.4'] diff --git a/conf/12_k8s.conf b/conf/12_k8s.conf new file mode 100644 index 00000000..5cfac966 --- /dev/null +++ b/conf/12_k8s.conf @@ -0,0 +1,41 @@ +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Information about the Master Node. + +POD_DIR=os.path.join(ROOT_DIR, 'pods/') +POD='Papi' + +MASTER_IP = '10.10.120.22' +MASTER_LOGIN = 'opnfv' +MASTER_PASSWD = 'opnfv' + +K8S_CONFIG_FILEPATH = '/home/opnfv/sridhar/k8sconfig' + +# Information about the Worker Node. Default is Localhost. +WORKER_IP = '10.10.120.21' +WORKER_LOGIN = 'opnfv' +WORKER_PASSWD = 'opnfv' + + +# Plugin to use. +PLUGIN = 'ovsdpdk' + +# Paths. Default location: Master Node. +NETWORK_ATTACHMENT_FILEPATH = ['/home/opnfv/sridhar/cnb/userspace/ovsdpdk/userspace-ovs-netAttach.yaml'] +POD_MANIFEST_FILEPATH = '/home/opnfv/sridhar/cnb/userspace/ovsdpdk/userspace-ovs-netapp-pod.yaml' + + +# Application pod +APP_NAME = 'l2fwd' + diff --git a/conf/__init__.py b/conf/__init__.py index d5d26757..7f6c1912 100644 --- a/conf/__init__.py +++ b/conf/__init__.py @@ -70,7 +70,7 @@ class Settings(object): except AttributeError: pass return param - elif isinstance(param, list) or isinstance(param, tuple): + elif isinstance(param, (list, tuple)): tmp_list = [] for item in param: tmp_list.append(self._eval_param(item)) @@ -108,6 +108,13 @@ class Settings(object): raise AttributeError("%r object has no attribute %r" % (self.__class__, attr)) + def hasValue(self, attr): + """Return true if key exists + """ + if attr in self.__dict__: + return True + return False + def __setattr__(self, name, value): """Set a value """ @@ -229,7 +236,7 @@ class Settings(object): if key not in self.__dict__ and key not in _EXTRA_TEST_PARAMS: unknown_keys.append(key) - if len(unknown_keys): + if unknown_keys: raise RuntimeError('Test parameters contain unknown configuration ' 'parameter(s): {}'.format(', '.join(unknown_keys))) @@ -256,6 +263,9 @@ class Settings(object): Expand VM option with given key for given number of VMs """ tmp_value = self.getValue(key) + # skip empty/not set value + if not tmp_value: + return if isinstance(tmp_value, str): scalar = True master_value = tmp_value @@ -270,7 +280,7 @@ class Settings(object): for vmindex in range(vm_number): value = master_value_str.replace('#VMINDEX', str(vmindex)) for macro, args, param, _, step in re.findall(_PARSE_PATTERN, value): - multi = int(step) if len(step) and int(step) else 1 + multi = int(step) if step and int(step) else 1 if macro == '#EVAL': # pylint: disable=eval-used tmp_result = str(eval(param)) @@ -325,13 +335,13 @@ class Settings(object): assert result == self.getValue(attr) return True - def validate_setValue(self, dummy_result, name, value): + def validate_setValue(self, _dummy_result, name, value): """Verifies, that value was correctly set """ assert value == self.__dict__[name] return True - def validate_resetValue(self, dummy_result, attr): + def validate_resetValue(self, _dummy_result, attr): """Verifies, that value was correctly reset """ return 'TEST_PARAMS' not in self.__dict__ or \ diff --git a/conf/integration/01_testcases.conf b/conf/integration/01_testcases.conf index 692f1561..7daff217 100644 --- a/conf/integration/01_testcases.conf +++ b/conf/integration/01_testcases.conf @@ -1,4 +1,4 @@ -# Copyright 2015-2017 Intel Corporation. +# Copyright 2015-2018 Intel Corporation, Tieto and others. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,10 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -# The 1st value of SUPPORTED_TUNNELING_PROTO is used as the default -# tunneling protocol for OP2P tests. -SUPPORTED_TUNNELING_PROTO = ['vxlan', 'gre', 'geneve'] - # # Generic test configuration options are described at conf/01_testcases.conf # @@ -39,7 +35,9 @@ SUPPORTED_TUNNELING_PROTO = ['vxlan', 'gre', 'geneve'] # Common TestSteps parts ("macros") # +# # P2P macros +# STEP_VSWITCH_P2P_INIT = [ ['vswitch', 'add_switch', 'int_br0'], # STEP 0 ['vswitch', 'add_phy_port', 'int_br0'], # STEP 1 @@ -52,6 +50,18 @@ STEP_VSWITCH_P2P_FINIT = [ ['vswitch', 'del_switch', 'int_br0'], ] +STEP_VSWITCH_P2P_CONNECTIONS_INIT = STEP_VSWITCH_P2P_INIT + [ + ['vswitch', 'add_connection', 'int_br0', '#STEP[1][0]', '#STEP[2][0]'], + ['vswitch', 'add_connection', 'int_br0', '#STEP[2][0]', '#STEP[1][0]'], +] + +STEP_VSWITCH_P2P_CONNECTIONS_FINIT = [ + ['vswitch', 'dump_connections', 'int_br0'], + ['vswitch', 'del_connection', 'int_br0', '#STEP[1][0]', '#STEP[2][0]'], + ['vswitch', 'del_connection', 'int_br0', '#STEP[2][0]', '#STEP[1][0]'], +] + STEP_VSWITCH_P2P_FINIT + +# P2P OVS specific macros STEP_VSWITCH_P2P_FLOWS_INIT = STEP_VSWITCH_P2P_INIT + [ ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[1][1]', 'actions': ['output:#STEP[2][1]'], 'idle_timeout': '0'}], ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[2][1]', 'actions': ['output:#STEP[1][1]'], 'idle_timeout': '0'}], @@ -63,7 +73,9 @@ STEP_VSWITCH_P2P_FLOWS_FINIT = [ ['vswitch', 'del_flow', 'int_br0', {'in_port': '#STEP[2][1]'}], ] + STEP_VSWITCH_P2P_FINIT -# PVP and PVVP macros +# +# PVP macros +# STEP_VSWITCH_PVP_INIT = STEP_VSWITCH_P2P_INIT + [ ['vswitch', 'add_vport', 'int_br0'], # STEP 3 vm1 ports ['vswitch', 'add_vport', 'int_br0'], # STEP 4 @@ -74,6 +86,22 @@ STEP_VSWITCH_PVP_FINIT = [ ['vswitch', 'del_port', 'int_br0', '#STEP[4][0]'], ] + STEP_VSWITCH_P2P_FINIT +STEP_VSWITCH_PVP_CONNECTIONS_INIT = STEP_VSWITCH_PVP_INIT + [ + ['vswitch', 'add_connection', 'int_br0', '#STEP[1][0]', '#STEP[3][0]'], + ['vswitch', 'add_connection', 'int_br0', '#STEP[4][0]', '#STEP[2][0]'], + ['vswitch', 'add_connection', 'int_br0', '#STEP[2][0]', '#STEP[4][0]'], + ['vswitch', 'add_connection', 'int_br0', '#STEP[3][0]', '#STEP[1][0]'], +] + +STEP_VSWITCH_PVP_CONNECTIONS_FINIT = [ + ['vswitch', 'dump_connections', 'int_br0'], + ['vswitch', 'del_connection', 'int_br0', '#STEP[1][0]', '#STEP[3][0]'], + ['vswitch', 'del_connection', 'int_br0', '#STEP[4][0]', '#STEP[2][0]'], + ['vswitch', 'del_connection', 'int_br0', '#STEP[2][0]', '#STEP[4][0]'], + ['vswitch', 'del_connection', 'int_br0', '#STEP[3][0]', '#STEP[1][0]'], +] + STEP_VSWITCH_PVP_FINIT + +# PVP OVS specific macros STEP_VSWITCH_PVP_FLOWS_INIT = STEP_VSWITCH_PVP_INIT + [ ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[1][1]', 'actions': ['output:#STEP[3][1]'], 'idle_timeout': '0'}], ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[4][1]', 'actions': ['output:#STEP[2][1]'], 'idle_timeout': '0'}], @@ -89,6 +117,9 @@ STEP_VSWITCH_PVP_FLOWS_FINIT = [ ['vswitch', 'del_flow', 'int_br0', {'in_port': '#STEP[3][1]'}], ] + STEP_VSWITCH_PVP_FINIT +# +# PVVP macros +# STEP_VSWITCH_PVVP_INIT = STEP_VSWITCH_PVP_INIT + [ ['vswitch', 'add_vport', 'int_br0'], # STEP 5 vm2 ports ['vswitch', 'add_vport', 'int_br0'], # STEP 6 @@ -99,6 +130,26 @@ STEP_VSWITCH_PVVP_FINIT = [ ['vswitch', 'del_port', 'int_br0', '#STEP[6][0]'], ] + STEP_VSWITCH_PVP_FINIT +STEP_VSWITCH_PVVP_CONNECTIONS_INIT = STEP_VSWITCH_PVVP_INIT + [ + ['vswitch', 'add_connection', 'int_br0', '#STEP[1][0]', '#STEP[3][0]'], + ['vswitch', 'add_connection', 'int_br0', '#STEP[4][0]', '#STEP[5][0]'], + ['vswitch', 'add_connection', 'int_br0', '#STEP[6][0]', '#STEP[2][0]'], + ['vswitch', 'add_connection', 'int_br0', '#STEP[2][0]', '#STEP[6][0]'], + ['vswitch', 'add_connection', 'int_br0', '#STEP[5][0]', '#STEP[4][0]'], + ['vswitch', 'add_connection', 'int_br0', '#STEP[3][0]', '#STEP[1][0]'], +] + +STEP_VSWITCH_PVVP_CONNECTIONS_FINIT = [ + ['vswitch', 'dump_connections', 'int_br0'], + ['vswitch', 'del_connection', 'int_br0', '#STEP[1][0]', '#STEP[3][0]'], + ['vswitch', 'del_connection', 'int_br0', '#STEP[4][0]', '#STEP[5][0]'], + ['vswitch', 'del_connection', 'int_br0', '#STEP[6][0]', '#STEP[2][0]'], + ['vswitch', 'del_connection', 'int_br0', '#STEP[2][0]', '#STEP[6][0]'], + ['vswitch', 'del_connection', 'int_br0', '#STEP[5][0]', '#STEP[4][0]'], + ['vswitch', 'del_connection', 'int_br0', '#STEP[3][0]', '#STEP[1][0]'], +] + STEP_VSWITCH_PVVP_FINIT + +# PVVP OVS specific macros STEP_VSWITCH_PVVP_FLOWS_INIT = STEP_VSWITCH_PVVP_INIT + [ ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[1][1]', 'actions': ['output:#STEP[3][1]'], 'idle_timeout': '0'}], ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[4][1]', 'actions': ['output:#STEP[5][1]'], 'idle_timeout': '0'}], @@ -118,192 +169,6 @@ STEP_VSWITCH_PVVP_FLOWS_FINIT = [ ['vswitch', 'del_flow', 'int_br0', {'in_port': '#STEP[3][1]'}], ] + STEP_VSWITCH_PVVP_FINIT -STEP_VSWITCH_P4VP_INIT = STEP_VSWITCH_PVVP_INIT + [ - ['vswitch', 'add_vport', 'int_br0'], # STEP 7 vm3 ports - ['vswitch', 'add_vport', 'int_br0'], # STEP 8 - ['vswitch', 'add_vport', 'int_br0'], # STEP 9 vm4 ports - ['vswitch', 'add_vport', 'int_br0'], # STEP 10 -] - -STEP_VSWITCH_P4VP_FINIT = [ - ['vswitch', 'del_port', 'int_br0', '#STEP[7][0]'], # vm3 ports - ['vswitch', 'del_port', 'int_br0', '#STEP[8][0]'], - ['vswitch', 'del_port', 'int_br0', '#STEP[9][0]'], # vm4 ports - ['vswitch', 'del_port', 'int_br0', '#STEP[10][0]'], -] + STEP_VSWITCH_PVVP_FINIT - -STEP_VSWITCH_P4VP_FLOWS_INIT = STEP_VSWITCH_P4VP_INIT + [ - ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[1][1]', \ - 'actions': ['output:#STEP[3][1]'], 'idle_timeout': '0'}], - ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[4][1]', \ - 'actions': ['output:#STEP[5][1]'], 'idle_timeout': '0'}], - ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[6][1]', \ - 'actions': ['output:#STEP[7][1]'], 'idle_timeout': '0'}], - ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[8][1]', \ - 'actions': ['output:#STEP[9][1]'], 'idle_timeout': '0'}], - ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[10][1]', \ - 'actions': ['output:#STEP[2][1]'], 'idle_timeout': '0'}], - ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[2][1]', \ - 'actions': ['output:#STEP[10][1]'], 'idle_timeout': '0'}], - ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[9][1]', \ - 'actions': ['output:#STEP[8][1]'], 'idle_timeout': '0'}], - ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[7][1]', \ - 'actions': ['output:#STEP[6][1]'], 'idle_timeout': '0'}], - ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[5][1]', \ - 'actions': ['output:#STEP[4][1]'], 'idle_timeout': '0'}], - ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[3][1]', \ - 'actions': ['output:#STEP[1][1]'], 'idle_timeout': '0'}], -] - -STEP_VSWITCH_P4VP_FLOWS_FINIT = [ - ['vswitch', 'dump_flows', 'int_br0'], - ['vswitch', 'del_flow', 'int_br0'], -] + STEP_VSWITCH_P4VP_FINIT - -STEP_VSWITCH_2PHY_2VM_INIT = STEP_VSWITCH_PVVP_INIT - -STEP_VSWITCH_2PHY_2VM_FINIT = STEP_VSWITCH_PVVP_FINIT - -STEP_VSWITCH_2_PARALLEL_VM_FLOWS_INIT = [ - # Setup Flows to reply ICMPv6 and similar packets, so to - # avoid flooding the internal port with their re-transmissions - ['vswitch', 'add_flow', 'int_br0', \ - {'priority': '1', 'dl_src': '00:00:00:00:00:01', \ - 'actions': ['output:#STEP[3][1]'], 'idle_timeout': '0'}], - ['vswitch', 'add_flow', 'int_br0', \ - {'priority': '1', 'dl_src': '00:00:00:00:00:02', \ - 'actions': ['output:#STEP[4][1]'], 'idle_timeout': '0'}], - ['vswitch', 'add_flow', 'int_br0', \ - {'priority': '1', 'dl_src': '00:00:00:00:00:03', \ - 'actions': ['output:#STEP[5][1]'], 'idle_timeout': '0'}], - ['vswitch', 'add_flow', 'int_br0', \ - {'priority': '1', 'dl_src': '00:00:00:00:00:04', \ - 'actions': ['output:#STEP[6][1]'], 'idle_timeout': '0'}], - # Forward UDP packets depending on dest port - ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[1][1]', \ - 'dl_type': '0x0800', 'nw_proto': '17', 'udp_dst': '0', \ - 'actions': ['output:#STEP[3][1]'], 'idle_timeout': '0'}], - ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[1][1]', \ - 'dl_type': '0x0800', 'nw_proto': '17', 'udp_dst': '1', \ - 'actions': ['output:#STEP[5][1]'], 'idle_timeout': '0'}], - # Send VM outputs to phy port #2 - ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[4][1]', \ - 'actions': ['output:#STEP[2][1]'], 'idle_timeout': '0'}], - ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[6][1]', \ - 'actions': ['output:#STEP[2][1]'], 'idle_timeout': '0'}], -] - -STEP_VSWITCH_2PHY_4VM_INIT = STEP_VSWITCH_2PHY_2VM_INIT + [ - ['vswitch', 'add_vport', 'int_br0'], # STEP 7 vm3 ports - ['vswitch', 'add_vport', 'int_br0'], # STEP 8 - ['vswitch', 'add_vport', 'int_br0'], # STEP 9 vm4 ports - ['vswitch', 'add_vport', 'int_br0'], # STEP 10 -] - -STEP_VSWITCH_2PHY_4VM_FINIT = [ - ['vswitch', 'del_port', 'int_br0', '#STEP[7][0]'], # vm3 ports - ['vswitch', 'del_port', 'int_br0', '#STEP[8][0]'], - ['vswitch', 'del_port', 'int_br0', '#STEP[9][0]'], # vm4 ports - ['vswitch', 'del_port', 'int_br0', '#STEP[10][0]'], -] + STEP_VSWITCH_2PHY_2VM_FINIT - -STEP_VSWITCH_FLOWS_FINIT = [ - ['vswitch', 'dump_flows', 'int_br0'], - ['vswitch', 'del_flow', 'int_br0'], -] - -STEP_VSWITCH_4_PARALLEL_VM_FLOWS_INIT = [ - # Setup Flows to reply ICMPv6 and similar packets, so to - # avoid flooding the internal port with their re-transmissions - ['vswitch', 'add_flow', 'int_br0', \ - {'priority': '1', 'dl_src': '00:00:00:00:00:01', \ - 'actions': ['output:#STEP[3][1]'], 'idle_timeout': '0'}], - ['vswitch', 'add_flow', 'int_br0', \ - {'priority': '1', 'dl_src': '00:00:00:00:00:02', \ - 'actions': ['output:#STEP[4][1]'], 'idle_timeout': '0'}], - ['vswitch', 'add_flow', 'int_br0', \ - {'priority': '1', 'dl_src': '00:00:00:00:00:03', \ - 'actions': ['output:#STEP[5][1]'], 'idle_timeout': '0'}], - ['vswitch', 'add_flow', 'int_br0', \ - {'priority': '1', 'dl_src': '00:00:00:00:00:04', \ - 'actions': ['output:#STEP[6][1]'], 'idle_timeout': '0'}], - ['vswitch', 'add_flow', 'int_br0', \ - {'priority': '1', 'dl_src': '00:00:00:00:00:05', \ - 'actions': ['output:#STEP[7][1]'], 'idle_timeout': '0'}], - ['vswitch', 'add_flow', 'int_br0', \ - {'priority': '1', 'dl_src': '00:00:00:00:00:06', \ - 'actions': ['output:#STEP[8][1]'], 'idle_timeout': '0'}], - ['vswitch', 'add_flow', 'int_br0', \ - {'priority': '1', 'dl_src': '00:00:00:00:00:07', \ - 'actions': ['output:#STEP[9][1]'], 'idle_timeout': '0'}], - ['vswitch', 'add_flow', 'int_br0', \ - {'priority': '1', 'dl_src': '00:00:00:00:00:08', \ - 'actions': ['output:#STEP[10][1]'], 'idle_timeout': '0'}], - # Forward UDP packets depending on dest port - ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[1][1]', \ - 'dl_type': '0x0800', 'nw_proto': '17', 'udp_dst': '0', \ - 'actions': ['output:#STEP[3][1]'], 'idle_timeout': '0'}], - ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[1][1]', \ - 'dl_type': '0x0800', 'nw_proto': '17', 'udp_dst': '1', \ - 'actions': ['output:#STEP[5][1]'], 'idle_timeout': '0'}], - ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[1][1]', \ - 'dl_type': '0x0800', 'nw_proto': '17', 'udp_dst': '2', \ - 'actions': ['output:#STEP[7][1]'], 'idle_timeout': '0'}], - ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[1][1]', \ - 'dl_type': '0x0800', 'nw_proto': '17', 'udp_dst': '3', \ - 'actions': ['output:#STEP[9][1]'], 'idle_timeout': '0'}], - # Send VM outputs to phy port #2 - ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[4][1]', \ - 'actions': ['output:#STEP[2][1]'], 'idle_timeout': '0'}], - ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[6][1]', \ - 'actions': ['output:#STEP[2][1]'], 'idle_timeout': '0'}], - ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[8][1]', \ - 'actions': ['output:#STEP[2][1]'], 'idle_timeout': '0'}], - ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[10][1]', \ - 'actions': ['output:#STEP[2][1]'], 'idle_timeout': '0'}], -] - -STEP_VSWITCH_2PHY_6VM_INIT = STEP_VSWITCH_2PHY_4VM_INIT + [ - ['vswitch', 'add_vport', 'int_br0'], # STEP 11 vm5 vhu8 - ['vswitch', 'add_vport', 'int_br0'], # STEP 12 vhu9 - ['vswitch', 'add_vport', 'int_br0'], # STEP 13 vm6 vhu10 - ['vswitch', 'add_vport', 'int_br0'], # STEP 14 vhu11 -] - -STEP_VSWITCH_6_PARALLEL_VM_FLOWS_INIT = STEP_VSWITCH_4_PARALLEL_VM_FLOWS_INIT + [ - ['vswitch', 'add_flow', 'int_br0', \ - {'priority': '1', 'dl_src': '00:00:00:00:00:09', \ - 'actions': ['output:#STEP[11][1]'], 'idle_timeout': '0'}], - ['vswitch', 'add_flow', 'int_br0', \ - {'priority': '1', 'dl_src': '00:00:00:00:00:0a', \ - 'actions': ['output:#STEP[12][1]'], 'idle_timeout': '0'}], - ['vswitch', 'add_flow', 'int_br0', \ - {'priority': '1', 'dl_src': '00:00:00:00:00:0b', \ - 'actions': ['output:#STEP[13][1]'], 'idle_timeout': '0'}], - ['vswitch', 'add_flow', 'int_br0', \ - {'priority': '1', 'dl_src': '00:00:00:00:00:0c', \ - 'actions': ['output:#STEP[14][1]'], 'idle_timeout': '0'}], - # Forward UDP packets depending on dest port - ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[1][1]', \ - 'dl_type': '0x0800', 'nw_proto': '17', 'udp_dst': '4', \ - 'actions': ['output:#STEP[11][1]'], 'idle_timeout': '0'}], - ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[1][1]', \ - 'dl_type': '0x0800', 'nw_proto': '17', 'udp_dst': '5', \ - 'actions': ['output:#STEP[13][1]'], 'idle_timeout': '0'}], - # Send VM outputs to phy port #2 - ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[12][1]', \ - 'actions': ['output:#STEP[2][1]'], 'idle_timeout': '0'}], - ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[14][1]', \ - 'actions': ['output:#STEP[2][1]'], 'idle_timeout': '0'}], -] - -STEP_VSWITCH_2PHY_6VM_FINIT = [ - ['vswitch', 'del_port', 'int_br0', '#STEP[11][0]'], # vm5 ports - ['vswitch', 'del_port', 'int_br0', '#STEP[12][0]'], - ['vswitch', 'del_port', 'int_br0', '#STEP[13][0]'], # vm6 ports - ['vswitch', 'del_port', 'int_br0', '#STEP[14][0]'], -] + STEP_VSWITCH_2PHY_4VM_FINIT - # # Definition of integration tests # @@ -327,7 +192,6 @@ INTEGRATION_TESTS = [ { "Name": "overlay_p2p_tput", "Deployment": "op2p", - "Tunnel Type": SUPPORTED_TUNNELING_PROTO[0], "Tunnel Operation": "encapsulation", "Description": "Overlay Encapsulation Throughput RFC2544 Test", "Parameters": { @@ -341,7 +205,6 @@ INTEGRATION_TESTS = [ { "Name": "overlay_p2p_cont", "Deployment": "op2p", - "Tunnel Type": SUPPORTED_TUNNELING_PROTO[0], "Tunnel Operation": "encapsulation", "Description": "Overlay Encapsulation RFC2544 Continuous Stream", "Parameters": { @@ -355,7 +218,6 @@ INTEGRATION_TESTS = [ { "Name": "overlay_p2p_decap_tput", "Deployment": "op2p", - "Tunnel Type": SUPPORTED_TUNNELING_PROTO[0], "Tunnel Operation": "decapsulation", "Description": "Overlay Decapsulation Throughput RFC2544 Test", "Parameters": { @@ -369,7 +231,6 @@ INTEGRATION_TESTS = [ { "Name": "overlay_p2p_decap_cont", "Deployment": "op2p", - "Tunnel Type": SUPPORTED_TUNNELING_PROTO[0], "Tunnel Operation": "decapsulation", "Description": "Overlay Decapsulation RFC2544 Continuous Stream", "Parameters": { @@ -449,9 +310,49 @@ INTEGRATION_TESTS = [ ] }, { + "Name": "vswitch_add_del_connection", + "Deployment": "clean", + "Description": "vSwitch - add and delete connection", + "TestSteps": [ + ['vswitch', 'add_switch', 'int_br0'], + ['vswitch', 'add_phy_port', 'int_br0'], + ['vswitch', 'add_phy_port', 'int_br0'], + ['vswitch', 'add_connection', 'int_br0', '#STEP[1][0]', '#STEP[2][0]'], + ['vswitch', 'dump_connections', 'int_br0'], + ['vswitch', 'del_connection', 'int_br0', '#STEP[1][0]', '#STEP[2][0]'], + ['vswitch', 'del_port', 'int_br0', '#STEP[1][0]'], + ['vswitch', 'del_port', 'int_br0', '#STEP[2][0]'], + ['vswitch', 'del_switch', 'int_br0'], + ] + }, + { + "Name": "vswitch_vports_add_del_connection", + "Deployment": "clean", + "Description": "vSwitch - add and delete connection", + "Description": "vSwitch - configure switch with vports, add and delete connection", + "TestSteps": [ + ['vswitch', 'add_switch', 'int_br0'], + ['vswitch', 'add_vport', 'int_br0'], + ['vswitch', 'add_vport', 'int_br0'], + ['vswitch', 'add_connection', 'int_br0', '#STEP[1][0]', '#STEP[2][0]'], + ['vswitch', 'dump_connections', 'int_br0'], + ['vswitch', 'del_connection', 'int_br0', '#STEP[1][0]', '#STEP[2][0]'], + ['vswitch', 'del_port', 'int_br0', '#STEP[1][0]'], + ['vswitch', 'del_port', 'int_br0', '#STEP[2][0]'], + ['vswitch', 'del_switch', 'int_br0'], + ] + }, + { + "Name": "vswitch_add_del_connections", + "Deployment": "clean", + "Description": "vSwitch - add and delete connections", + "TestSteps": STEP_VSWITCH_P2P_CONNECTIONS_INIT + + STEP_VSWITCH_P2P_CONNECTIONS_FINIT + }, + { "Name": "vswitch_add_del_flow", "Deployment": "clean", - "Description": "vSwitch - add and delete flow", + "Description": "OVS: vSwitch - add and delete flow", "TestSteps": [ ['vswitch', 'add_switch', 'int_br0'], ['vswitch', 'add_phy_port', 'int_br0'], @@ -466,7 +367,7 @@ INTEGRATION_TESTS = [ { "Name": "vswitch_vports_add_del_flow", "Deployment": "clean", - "Description": "vSwitch - configure switch with vports, add and delete flow", + "Description": "OVS: vSwitch - configure switch with vports, add and delete flow", "TestSteps": [ ['vswitch', 'add_switch', 'int_br0'], ['vswitch', 'add_vport', 'int_br0'], @@ -481,7 +382,7 @@ INTEGRATION_TESTS = [ { "Name": "vswitch_add_del_flows", "Deployment": "clean", - "Description": "vSwitch - add and delete flows", + "Description": "OVS: vSwitch - add and delete flows", "TestSteps": STEP_VSWITCH_P2P_FLOWS_INIT + STEP_VSWITCH_P2P_FLOWS_FINIT }, @@ -489,31 +390,31 @@ INTEGRATION_TESTS = [ "Name": "vswitch_p2p_tput", "Deployment": "clean", "Description": "vSwitch - configure switch and execute RFC2544 throughput test", - "TestSteps": STEP_VSWITCH_P2P_FLOWS_INIT + + "TestSteps": STEP_VSWITCH_P2P_CONNECTIONS_INIT + [ ['trafficgen', 'send_traffic', {'traffic_type' : 'rfc2544_throughput', 'bidir' : 'True'}], ] + - STEP_VSWITCH_P2P_FLOWS_FINIT + STEP_VSWITCH_P2P_CONNECTIONS_FINIT }, { "Name": "vswitch_p2p_back2back", "Deployment": "clean", "Description": "vSwitch - configure switch and execute RFC2544 back2back test", - "TestSteps": STEP_VSWITCH_P2P_FLOWS_INIT + + "TestSteps": STEP_VSWITCH_P2P_CONNECTIONS_INIT + [ ['trafficgen', 'send_traffic', {'traffic_type' : 'rfc2544_back2back', 'bidir' : 'True'}], ] + - STEP_VSWITCH_P2P_FLOWS_FINIT + STEP_VSWITCH_P2P_CONNECTIONS_FINIT }, { "Name": "vswitch_p2p_cont", "Deployment": "clean", "Description": "vSwitch - configure switch and execute RFC2544 continuous stream test", - "TestSteps": STEP_VSWITCH_P2P_FLOWS_INIT + + "TestSteps": STEP_VSWITCH_P2P_CONNECTIONS_INIT + [ ['trafficgen', 'send_traffic', {'traffic_type' : 'rfc2544_continuous', 'bidir' : 'True'}], ] + - STEP_VSWITCH_P2P_FLOWS_FINIT + STEP_VSWITCH_P2P_CONNECTIONS_FINIT }, { "Name": "vswitch_pvp", @@ -545,43 +446,43 @@ INTEGRATION_TESTS = [ "Name": "vswitch_pvp_tput", "Deployment": "clean", "Description": "vSwitch - configure switch, vnf and execute RFC2544 throughput test", - "TestSteps": STEP_VSWITCH_PVP_FLOWS_INIT + + "TestSteps": STEP_VSWITCH_PVP_CONNECTIONS_INIT + [ ['vnf', 'start'], ['trafficgen', 'send_traffic', {'traffic_type' : 'rfc2544_throughput', 'bidir' : 'True'}], ['vnf', 'stop'], ] + - STEP_VSWITCH_PVP_FLOWS_FINIT + STEP_VSWITCH_PVP_CONNECTIONS_FINIT }, { "Name": "vswitch_pvp_back2back", "Deployment": "clean", "Description": "vSwitch - configure switch, vnf and execute RFC2544 back2back test", - "TestSteps": STEP_VSWITCH_PVP_FLOWS_INIT + + "TestSteps": STEP_VSWITCH_PVP_CONNECTIONS_INIT + [ ['vnf', 'start'], ['trafficgen', 'send_traffic', {'traffic_type' : 'rfc2544_back2back', 'bidir' : 'True'}], ['vnf', 'stop'], ] + - STEP_VSWITCH_PVP_FLOWS_FINIT + STEP_VSWITCH_PVP_CONNECTIONS_FINIT }, { "Name": "vswitch_pvp_cont", "Deployment": "clean", "Description": "vSwitch - configure switch, vnf and execute RFC2544 continuous stream test", - "TestSteps": STEP_VSWITCH_PVP_FLOWS_INIT + + "TestSteps": STEP_VSWITCH_PVP_CONNECTIONS_INIT + [ ['vnf', 'start'], ['trafficgen', 'send_traffic', {'traffic_type' : 'rfc2544_continuous', 'bidir' : 'True'}], ['vnf', 'stop'], ] + - STEP_VSWITCH_PVP_FLOWS_FINIT + STEP_VSWITCH_PVP_CONNECTIONS_FINIT }, { "Name": "vswitch_pvp_all", "Deployment": "clean", "Description": "vSwitch - configure switch, vnf and execute all test types", - "TestSteps": STEP_VSWITCH_PVP_FLOWS_INIT + + "TestSteps": STEP_VSWITCH_PVP_CONNECTIONS_INIT + [ ['vnf', 'start'], ['trafficgen', 'send_traffic', {'traffic_type' : 'rfc2544_throughput', 'bidir' : 'True'}], @@ -589,7 +490,7 @@ INTEGRATION_TESTS = [ ['trafficgen', 'send_traffic', {'traffic_type' : 'rfc2544_continuous', 'bidir' : 'True'}], ['vnf', 'stop'], ] + - STEP_VSWITCH_PVP_FLOWS_FINIT + STEP_VSWITCH_PVP_CONNECTIONS_FINIT }, { "Name": "vswitch_pvvp", @@ -608,7 +509,7 @@ INTEGRATION_TESTS = [ "Name": "vswitch_pvvp_tput", "Deployment": "clean", "Description": "vSwitch - configure switch, two chained vnfs and execute RFC2544 throughput test", - "TestSteps": STEP_VSWITCH_PVVP_FLOWS_INIT + + "TestSteps": STEP_VSWITCH_PVVP_CONNECTIONS_INIT + [ ['vnf1', 'start'], ['vnf2', 'start'], @@ -616,13 +517,13 @@ INTEGRATION_TESTS = [ ['vnf1', 'stop'], ['vnf2', 'stop'], ] + - STEP_VSWITCH_PVVP_FLOWS_FINIT + STEP_VSWITCH_PVVP_CONNECTIONS_FINIT }, { "Name": "vswitch_pvvp_back2back", "Deployment": "clean", "Description": "vSwitch - configure switch, two chained vnfs and execute RFC2544 back2back test", - "TestSteps": STEP_VSWITCH_PVVP_FLOWS_INIT + + "TestSteps": STEP_VSWITCH_PVVP_CONNECTIONS_INIT + [ ['vnf1', 'start'], ['vnf2', 'start'], @@ -630,13 +531,13 @@ INTEGRATION_TESTS = [ ['vnf1', 'stop'], ['vnf2', 'stop'], ] + - STEP_VSWITCH_PVVP_FLOWS_FINIT + STEP_VSWITCH_PVVP_CONNECTIONS_FINIT }, { "Name": "vswitch_pvvp_cont", "Deployment": "clean", "Description": "vSwitch - configure switch, two chained vnfs and execute RFC2544 continuous stream test", - "TestSteps": STEP_VSWITCH_PVVP_FLOWS_INIT + + "TestSteps": STEP_VSWITCH_PVVP_CONNECTIONS_INIT + [ ['vnf1', 'start'], ['vnf2', 'start'], @@ -644,13 +545,13 @@ INTEGRATION_TESTS = [ ['vnf1', 'stop'], ['vnf2', 'stop'], ] + - STEP_VSWITCH_PVVP_FLOWS_FINIT + STEP_VSWITCH_PVVP_CONNECTIONS_FINIT }, { "Name": "vswitch_pvvp_all", "Deployment": "clean", "Description": "vSwitch - configure switch, two chained vnfs and execute all test types", - "TestSteps": STEP_VSWITCH_PVVP_FLOWS_INIT + + "TestSteps": STEP_VSWITCH_PVVP_CONNECTIONS_INIT + [ ['vnf1', 'start'], ['vnf2', 'start'], @@ -660,104 +561,48 @@ INTEGRATION_TESTS = [ ['vnf1', 'stop'], ['vnf2', 'stop'], ] + - STEP_VSWITCH_PVVP_FLOWS_FINIT - }, - { - "Name": "vswitch_p4vp", - "Description": "Just configure 4 chained vnfs", - "Deployment": "clean", - "TestSteps": STEP_VSWITCH_P4VP_FLOWS_INIT + - [ - ['vnf1', 'start'], - ['vnf2', 'start'], - ['vnf3', 'start'], - ['vnf4', 'start'], - ['vnf1', 'stop'], - ['vnf2', 'stop'], - ['vnf3', 'stop'], - ['vnf4', 'stop'], - ] + - STEP_VSWITCH_P4VP_FLOWS_FINIT + STEP_VSWITCH_PVVP_CONNECTIONS_FINIT }, { "Name": "vswitch_p4vp_tput", - "Description": "4 chained vnfs, execute RFC2544 throughput test", - "Deployment": "clean", - "TestSteps": STEP_VSWITCH_P4VP_FLOWS_INIT + - [ - ['vnf1', 'start'], - ['vnf2', 'start'], - ['vnf3', 'start'], - ['vnf4', 'start'], - ['trafficgen', 'send_traffic', {'traffic_type' : 'rfc2544_throughput', \ - 'bidir' : 'True'}], - ['vnf1', 'stop'], - ['vnf2', 'stop'], - ['vnf3', 'stop'], - ['vnf4', 'stop'], - ] + - STEP_VSWITCH_P4VP_FLOWS_FINIT + "Description": "4 chained vnfs, execute RFC2544 throughput test, deployment pvvp4", + "Deployment": "pvvp4", + "Parameters" : { + "TRAFFIC" : { + "traffic_type" : "rfc2544_throughput", + }, + }, }, { "Name": "vswitch_p4vp_back2back", - "Description": "4 chained vnfs, execute RFC2544 back2back test", - "Deployment": "clean", - "TestSteps": STEP_VSWITCH_P4VP_FLOWS_INIT + - [ - ['vnf1', 'start'], - ['vnf2', 'start'], - ['vnf3', 'start'], - ['vnf4', 'start'], - ['trafficgen', 'send_traffic', {'traffic_type' : 'rfc2544_back2back', \ - 'bidir' : 'True'}], - ['vnf1', 'stop'], - ['vnf2', 'stop'], - ['vnf3', 'stop'], - ['vnf4', 'stop'], - ] + - STEP_VSWITCH_P4VP_FLOWS_FINIT + "Description": "4 chained vnfs, execute RFC2544 back2back test, deployment pvvp4", + "Deployment": "pvvp4", + "Parameters" : { + "TRAFFIC" : { + "traffic_type" : "rfc2544_back2back", + }, + }, }, { "Name": "vswitch_p4vp_cont", - "Description": "4 chained vnfs, execute RFC2544 continuous stream test", - "Deployment": "clean", - "TestSteps": STEP_VSWITCH_P4VP_FLOWS_INIT + - [ - ['vnf1', 'start'], - ['vnf2', 'start'], - ['vnf3', 'start'], - ['vnf4', 'start'], - ['trafficgen', 'send_traffic', {'traffic_type' : 'rfc2544_continuous', \ - 'bidir' : 'True'}], - ['vnf1', 'stop'], - ['vnf2', 'stop'], - ['vnf3', 'stop'], - ['vnf4', 'stop'], - ] + - STEP_VSWITCH_P4VP_FLOWS_FINIT + "Description": "4 chained vnfs, execute RFC2544 continuous stream test, deployment pvvp4", + "Deployment": "pvvp4", + "Parameters" : { + "TRAFFIC" : { + "traffic_type" : "rfc2544_continuous", + }, + }, }, { "Name": "vswitch_p4vp_all", - "Description": "4 chained vnfs, execute RFC2544 throughput test", - "Deployment": "clean", - "TestSteps": STEP_VSWITCH_P4VP_FLOWS_INIT + + "Description": "4 chained vnfs, execute RFC2544 throughput tests, deployment pvvp4", + "Deployment": "pvvp4", + "TestSteps": [ - ['vnf1', 'start'], - ['vnf2', 'start'], - ['vnf3', 'start'], - ['vnf4', 'start'], - ['trafficgen', 'send_traffic', {'traffic_type' : 'rfc2544_throughput', \ - 'bidir' : 'True'}], - ['trafficgen', 'send_traffic', {'traffic_type' : 'rfc2544_back2back', \ - 'bidir' : 'True'}], - ['trafficgen', 'send_traffic', {'traffic_type' : 'rfc2544_continuous', \ - 'bidir' : 'True'}], - ['vnf1', 'stop'], - ['vnf2', 'stop'], - ['vnf3', 'stop'], - ['vnf4', 'stop'], - ] + - STEP_VSWITCH_P4VP_FLOWS_FINIT + ['trafficgen', 'send_traffic', {'traffic_type' : 'rfc2544_throughput'}], + ['trafficgen', 'send_traffic', {'traffic_type' : 'rfc2544_back2back'}], + ['trafficgen', 'send_traffic', {'traffic_type' : 'rfc2544_continuous'}], + ] }, { # Topology: 2 Parallel PVP connections @@ -766,25 +611,13 @@ INTEGRATION_TESTS = [ # or add "Parameters" option to the test definition: # "Parameters" : {'GUEST_LOOPBACK' : ['linux_bridge'],}, "Name": "2pvp_udp_dest_flows", - "Description": "RFC2544 Continuous TC with 2 Parallel VMs, flows on UDP Dest Port", - "Deployment": "clean", + "Description": "RFC2544 Continuous TC with 2 Parallel VMs, flows on UDP Dest Port, deployment pvpv2", + "Deployment": "pvpv2", "Parameters" : { "TRAFFIC" : { - "multistream" : 2, - "stream_type" : "L4", + "traffic_type" : "rfc2544_continuous", }, }, - "TestSteps": STEP_VSWITCH_2PHY_2VM_INIT + - STEP_VSWITCH_2_PARALLEL_VM_FLOWS_INIT + [ - # Start 2 VMs - ['vnf1', 'start'], - ['vnf2', 'start'], - ['trafficgen', 'send_traffic', {'traffic_type' : 'rfc2544_continuous', 'bidir' : 'False'}], - ['vnf1', 'stop'], - ['vnf2', 'stop'], - # Clean up - ] + STEP_VSWITCH_FLOWS_FINIT + - STEP_VSWITCH_2PHY_2VM_FINIT }, { # Topology: 4 Parallel PVP connections @@ -793,29 +626,13 @@ INTEGRATION_TESTS = [ # or add "Parameters" option to the test definition: # "Parameters" : {'GUEST_LOOPBACK' : ['linux_bridge'],}, "Name": "4pvp_udp_dest_flows", - "Description": "RFC2544 Continuous TC with 4 Parallel VMs, flows on UDP Dest Port", - "Deployment": "clean", + "Description": "RFC2544 Continuous TC with 4 Parallel VMs, flows on UDP Dest Port, deployment pvpv4", + "Deployment": "pvpv4", "Parameters" : { "TRAFFIC" : { - "multistream" : 4, - "stream_type" : "L4", + "traffic_type" : "rfc2544_continuous", }, }, - "TestSteps": STEP_VSWITCH_2PHY_4VM_INIT + - STEP_VSWITCH_4_PARALLEL_VM_FLOWS_INIT + [ - # Start 4 VMs - ['vnf1', 'start'], - ['vnf2', 'start'], - ['vnf3', 'start'], - ['vnf4', 'start'], - ['trafficgen', 'send_traffic', {'traffic_type' : 'rfc2544_continuous', 'bidir' : 'False'}], - ['vnf1', 'stop'], - ['vnf2', 'stop'], - ['vnf3', 'stop'], - ['vnf4', 'stop'], - # Clean up - ] + STEP_VSWITCH_FLOWS_FINIT + - STEP_VSWITCH_2PHY_4VM_FINIT }, { # Topology: 6 Parallel PVP connections @@ -824,32 +641,13 @@ INTEGRATION_TESTS = [ # or add "Parameters" option to the test definition: # "Parameters" : {'GUEST_LOOPBACK' : ['linux_bridge'],}, "Name": "6pvp_udp_dest_flows", - "Description": "RFC2544 Continuous TC with 6 Parallel VMs, flows on UDP Dest Port", - "Deployment": "clean", + "Description": "RFC2544 Continuous TC with 6 Parallel VMs, flows on UDP Dest Port, deployment pvpv6", + "Deployment": "pvpv6", "Parameters" : { "TRAFFIC" : { - "multistream" : 6, - "stream_type" : "L4", + "traffic_type" : "rfc2544_continuous", }, }, - "TestSteps": STEP_VSWITCH_2PHY_6VM_INIT + - STEP_VSWITCH_6_PARALLEL_VM_FLOWS_INIT + [ - # Start VMs - ['vnf1', 'start'], - ['vnf2', 'start'], - ['vnf3', 'start'], - ['vnf4', 'start'], - ['vnf5', 'start'], - ['vnf6', 'start'], - ['trafficgen', 'send_traffic', {'traffic_type' : 'rfc2544_continuous', 'bidir' : 'False'}], - ['vnf1', 'stop'], - ['vnf2', 'stop'], - ['vnf3', 'stop'], - ['vnf4', 'stop'], - ['vnf5', 'stop'], - ['vnf6', 'stop'], - ] + STEP_VSWITCH_FLOWS_FINIT + - STEP_VSWITCH_2PHY_6VM_FINIT }, { # Testcase for verification of vHost User NUMA awareness feature @@ -979,23 +777,6 @@ INTEGRATION_TESTS = [ ['tools', 'assert', 'len(#STEP[-1][0])'], ] }, - { - "Name": "vswitch_vports_add_del_connection_vpp", - "Deployment": "clean", - "Description": "VPP: vSwitch - configure switch with vports, add and delete connection", - "vSwitch" : "VppDpdkVhost", - "TestSteps": [ - ['vswitch', 'add_switch', 'int_br0'], - ['vswitch', 'add_vport', 'int_br0'], - ['vswitch', 'add_vport', 'int_br0'], - ['vswitch', 'add_connection', 'int_br0', '#STEP[1][0]', '#STEP[2][0]', True], - ['vswitch', 'dump_connections', 'int_br0'], - ['vswitch', 'del_connection', 'int_br0', '#STEP[1][0]', '#STEP[2][0]', True], - ['vswitch', 'del_port', 'int_br0', '#STEP[1][0]'], - ['vswitch', 'del_port', 'int_br0', '#STEP[2][0]'], - ['vswitch', 'del_switch', 'int_br0'], - ] - }, # # END of VPP tests used by VERIFY and MERGE jobs by OPNFV Jenkins # @@ -1027,9 +808,9 @@ INTEGRATION_TESTS = [ }, "TestSteps": [ # replace original flows with vlan ID modification - ['!vswitch', 'add_flow', 'br0', {'in_port': '1', 'actions': ['mod_vlan_vid:4','output:3']}], - ['!vswitch', 'add_flow', 'br0', {'in_port': '2', 'actions': ['mod_vlan_vid:4','output:4']}], - ['vswitch', 'dump_flows', 'br0'], + ['!vswitch', 'add_flow', '$VSWITCH_BRIDGE_NAME', {'in_port': '1', 'actions': ['mod_vlan_vid:4','output:3']}], + ['!vswitch', 'add_flow', '$VSWITCH_BRIDGE_NAME', {'in_port': '2', 'actions': ['mod_vlan_vid:4','output:4']}], + ['vswitch', 'dump_flows', '$VSWITCH_BRIDGE_NAME'], # verify that received frames have modified vlan ID ['VNF0', 'execute_and_wait', 'tcpdump -i eth0 -c 5 -w dump.pcap vlan 4 &'], ['trafficgen', 'send_traffic',{}], @@ -1055,14 +836,14 @@ _CAPTURE_P2P2P_SETUP = [ # create and configure two bridges to forward traffic through NIC under # the test and back to the traffic generator # 1st bridge: - ['vswitch', 'add_switch', 'br0'], + ['vswitch', 'add_switch', '$VSWITCH_BRIDGE_NAME'], ['tools', 'exec_shell', 'sudo ip addr flush dev $NICS[0]["device"]'], ['tools', 'exec_shell', 'sudo ip link set dev $NICS[0]["device"] up'], - ['tools', 'exec_shell', '$TOOLS["ovs-vsctl"] add-port br0 $NICS[0]["device"]'], + ['tools', 'exec_shell', '$TOOLS["ovs-vsctl"] add-port $VSWITCH_BRIDGE_NAME $NICS[0]["device"]'], ['tools', 'exec_shell', 'sudo $TOOLS["bind-tool"] --bind igb_uio $NICS[3]["pci"]'], - ['tools', 'exec_shell', '$TOOLS["ovs-vsctl"] add-port br0 dpdk0 -- ' + ['tools', 'exec_shell', '$TOOLS["ovs-vsctl"] add-port $VSWITCH_BRIDGE_NAME dpdk0 -- ' 'set Interface dpdk0 type=dpdk options:dpdk-devargs=$NICS[3]["pci"]'], - ['tools', 'exec_shell', '$TOOLS["ovs-ofctl"] add-flow br0 in_port=1,action=' + ['tools', 'exec_shell', '$TOOLS["ovs-ofctl"] add-flow $VSWITCH_BRIDGE_NAME in_port=1,action=' '$_CAPTURE_P2P2P_OVS_ACTION,output:2'], # 2nd bridge: ['vswitch', 'add_switch', 'br1'], @@ -1074,7 +855,7 @@ _CAPTURE_P2P2P_SETUP = [ ['tools', 'exec_shell', '$TOOLS["ovs-vsctl"] add-port br1 $NICS[1]["device"]'], ['vswitch', 'add_flow', 'br1', {'in_port': '1', 'actions': ['output:2']}], # log flow details - ['vswitch', 'dump_flows', 'br0'], + ['vswitch', 'dump_flows', '$VSWITCH_BRIDGE_NAME'], ['vswitch', 'dump_flows', 'br1'], ] INTEGRATION_TESTS += [ @@ -1108,7 +889,7 @@ INTEGRATION_TESTS += [ ['tools', 'exec_shell_background', 'tcpdump -i $NICS[2]["device"] -c 5 -w capture.pcap ' 'ether src $TRAFFIC["l2"]["srcmac"]'], ['trafficgen', 'send_traffic', {}], - ['vswitch', 'dump_flows', 'br0'], + ['vswitch', 'dump_flows', '$VSWITCH_BRIDGE_NAME'], ['vswitch', 'dump_flows', 'br1'], # there must be 5 captured frames... ['tools', 'exec_shell', 'tcpdump -r capture.pcap | wc -l', '|^(\d+)$'], @@ -1118,6 +899,45 @@ INTEGRATION_TESTS += [ ['tools', 'assert', '#STEP[-1][0] == 0'], ], }, + # Capture Example 3 - Traffic capture by traffic generator. + # This TestCase uses OVS flow to add VLAN tag with given ID into every + # frame send by traffic generator. Correct frame modificaiton is verified by + # inspection of packet capture received by T-Rex. + { + "Name": "capture_p2p_add_vlan_ovs_trex", + "Deployment": "clean", + "Description": "OVS: Test VLAN tag modification and verify it by traffic capture", + "vSwitch" : "OvsDpdkVhost", # works also for Vanilla OVS + "Parameters" : { + "TRAFFICGEN" : "Trex", + "TRAFFICGEN_TREX_LEARNING_MODE" : True, + "TRAFFIC" : { + "traffic_type" : "burst", + "frame_rate" : 100, + "burst_size" : 5, + # enable capture of five RX frames + 'capture': { + 'enabled': True, + 'tx_ports' : [], + 'rx_ports' : [1], + 'count' : 5, + }, + }, + }, + "TestSteps" : STEP_VSWITCH_P2P_INIT + [ + # replace standard L2 flows by flows, which will add VLAN tag with ID 3 + ['!vswitch', 'add_flow', 'int_br0', {'in_port': '1', 'actions': ['mod_vlan_vid:3','output:2']}], + ['!vswitch', 'add_flow', 'int_br0', {'in_port': '2', 'actions': ['mod_vlan_vid:3','output:1']}], + ['vswitch', 'dump_flows', 'int_br0'], + ['trafficgen', 'send_traffic', {}], + ['trafficgen', 'get_results'], + # verify that captured frames have vlan tag with ID 3 + ['tools', 'exec_shell', 'tcpdump -qer $RESULTS_PATH/#STEP[-1][0]["capture_rx"] vlan 3 ' + '2>/dev/null | wc -l', '|^(\d+)$'], + # number of received frames with expected VLAN id must match the number of captured frames + ['tools', 'assert', '#STEP[-1][0] == 5'], + ] + STEP_VSWITCH_P2P_FINIT, + }, # # End of examples of functional testcases with traffic capture validation # @@ -1132,11 +952,11 @@ INTEGRATION_TESTS += [ # "VNF" : "QemuVirtioNet", # "Trafficgen": "IxNet", # "Parameters": {"GUEST_LOOPBACK" : ["linux_bridge"],}, -# "TestSteps": STEP_VSWITCH_PVP_FLOWS_INIT + +# "TestSteps": STEP_VSWITCH_PVP_CONNECTIONS_INIT + # [ # ['vnf', 'start'], # ['trafficgen', 'send_traffic', {'traffic_type' : 'rfc2544_continuous', 'bidir' : 'True'}], # ['vnf', 'stop'], # ] + -# STEP_VSWITCH_PVP_FLOWS_FINIT +# STEP_VSWITCH_PVP_CONNECTIONS_FINIT # }, diff --git a/conf/integration/01a_testcases_l34_vxlan.conf b/conf/integration/01a_testcases_l34_vxlan.conf index 17c0d6ff..b42a14d1 100644 --- a/conf/integration/01a_testcases_l34_vxlan.conf +++ b/conf/integration/01a_testcases_l34_vxlan.conf @@ -1,4 +1,4 @@ -# Copyright 2017 Intel Corporation. +# Copyright 2017-2018 Intel Corporation and Tieto. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -63,7 +63,6 @@ INTEGRATION_TESTS = INTEGRATION_TESTS + [ 'cmds.close()'], ['tools', 'exec_shell', "sudo $TOOLS['ovs-ofctl'] -O OpenFlow13 --bundle add-flows int_br0 /tmp/ovsofctl_cmds.txt"], ['trafficgen', 'send_traffic', {}], - ['vswitch', 'del_flow', 'int_br0'], ] + STEP_VSWITCH_P2P_FINIT }, @@ -93,7 +92,6 @@ INTEGRATION_TESTS = INTEGRATION_TESTS + [ 'actions': ['output:#STEP[2][1]'], 'idle_timeout': '0' }], ['trafficgen', 'send_traffic', {}], ['vswitch', 'dump_flows', 'int_br0'], - ['vswitch', 'del_flow', 'int_br0'], ] + STEP_VSWITCH_P2P_FINIT }, @@ -130,7 +128,6 @@ INTEGRATION_TESTS = INTEGRATION_TESTS + [ ['trafficgen', 'send_traffic', {}], ['vswitch', 'dump_flows', 'int_br0'], ['vnf', 'stop'], - ['vswitch', 'del_flow', 'int_br0'], ] + STEP_VSWITCH_PVP_FINIT }, { @@ -172,7 +169,6 @@ INTEGRATION_TESTS = INTEGRATION_TESTS + [ ['vswitch', 'dump_flows', 'int_br0'], ['vnf2', 'stop'], ['vnf1', 'stop'], - ['vswitch', 'del_flow', 'int_br0'], ] + STEP_VSWITCH_PVVP_FINIT }, @@ -213,7 +209,6 @@ INTEGRATION_TESTS = INTEGRATION_TESTS + [ ['tools', 'exec_shell', "sudo $TOOLS['ovs-ofctl'] -O OpenFlow13 --bundle " "add-flows int_br0 /tmp/ovsofctl_cmds.txt"], ['trafficgen', 'send_traffic', {}], - ['vswitch', 'del_flow', 'int_br0'], ] + STEP_VSWITCH_P2P_FINIT }, @@ -249,7 +244,6 @@ INTEGRATION_TESTS = INTEGRATION_TESTS + [ 'actions': ['output:#STEP[2][1]'], 'idle_timeout': '0'}], ['trafficgen', 'send_traffic', {}], ['vswitch', 'dump_flows', 'int_br0'], - ['vswitch', 'del_flow', 'int_br0'], ] + STEP_VSWITCH_P2P_FINIT }, @@ -293,7 +287,6 @@ INTEGRATION_TESTS = INTEGRATION_TESTS + [ ['trafficgen', 'send_traffic', {}], ['vswitch', 'dump_flows', 'int_br0'], ['vnf', 'stop'], - ['vswitch', 'del_flow', 'int_br0'], ] + STEP_VSWITCH_PVP_FINIT }, @@ -344,7 +337,6 @@ INTEGRATION_TESTS = INTEGRATION_TESTS + [ ['vswitch', 'dump_flows', 'int_br0'], ['vnf2', 'stop'], ['vnf1', 'stop'], - ['vswitch', 'del_flow', 'int_br0'], ] + STEP_VSWITCH_PVVP_FINIT }, @@ -888,13 +880,13 @@ INTEGRATION_TESTS = INTEGRATION_TESTS + [ }, }, "TestSteps": [ - ['vswitch', 'del_flow', 'br0', {'in_port': '1'}], - ['vswitch', 'add_flow', 'br0', + ['vswitch', 'del_flow', '$TUNNEL_INTEGRATION_BRIDGE', {'in_port': '1'}], + ['vswitch', 'add_flow', '$TUNNEL_INTEGRATION_BRIDGE', {'in_port': '1', 'dl_type': '0x800', 'nw_proto': '17', 'nw_dst': '$TRAFFICGEN_PORT2_IP/8', 'actions': ['output:2'], 'idle_timeout': '0'}], - ['vswitch', 'dump_flows', 'br0'], - ['vswitch', 'dump_flows', 'br-ext'], + ['vswitch', 'dump_flows', '$TUNNEL_INTEGRATION_BRIDGE'], + ['vswitch', 'dump_flows', '$TUNNEL_EXTERNAL_BRIDGE'], ], }, { diff --git a/conf/integration/01b_dpdk_regression_tests.conf b/conf/integration/01b_dpdk_regression_tests.conf index 2e63d677..44343d28 100644 --- a/conf/integration/01b_dpdk_regression_tests.conf +++ b/conf/integration/01b_dpdk_regression_tests.conf @@ -1,4 +1,4 @@ -# Copyright 2017 Intel Corporation. +# Copyright 2017-2018 Intel Corporation., Tieto # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -21,6 +21,10 @@ # Generic configuration used by OVSDPDK testcases # ############################################################ + +# required to import path to the log file +from conf import settings + _OVSDPDK_1st_PMD_CORE = 4 _OVSDPDK_2nd_PMD_CORE = 5 # calculate PMD mask from core IDs configured above @@ -32,8 +36,11 @@ _OVSDPDK_GUEST_5_CORES = [('7', '8', '9', '10', '11')] # number of queues configured in OVS and GUEST _OVSDPDK_MQ = '2' -# Path to the log file -_OVSDPDK_VSWITCH_LOG = os.path.join(LOG_DIR, LOG_FILE_VSWITCHD) +# path to the log file +_RESULTS_PATH = settings.getValue('RESULTS_PATH') +name, ext = os.path.splitext(settings.getValue('LOG_FILE_VSWITCHD')) +log_file = "{name}_{uid}{ex}".format(name=name,uid=settings.getValue('LOG_TIMESTAMP'),ex=ext) +_OVSDPDK_VSWITCH_LOG = os.path.join(_RESULTS_PATH, log_file) _OVSDPDK_HEADER_LEN = 18 # length of frame headers in bytes, it's used for calculation # of payload size, i.e. payload = frame_size - header_len @@ -170,62 +177,6 @@ INTEGRATION_TESTS = INTEGRATION_TESTS + [ ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] show', '|Error attaching device.*$NICS[0]["pci"]'], ['tools', 'assert', 'not len(#STEP[-1])'], - # clean up - ['vswitch', 'del_port', 'int_br0', '#STEP[port2][0]'], - ['vswitch', 'del_switch', 'int_br0'], - ] - }, - { - # Support of netdev-dpdk/detach has been removed from OVS, so testcase will fail with recent - # OVS/DPDK versions. There is an ongoing discussion about possible support of netdev-dpdk/detach - # in the future OVS versions. - # Test has been tested with: - # OVS_TAG = 03d6399e618e4136c5da0be2b6f18f0b7d75b2bb - # DPDK_TAG = v16.11 - "Name": "ovsdpdk_hotplug_detach", - "Deployment": "clean", - "Description": "Same as ovsdpdk_hotplug_attach, but delete and detach the device after the hotplug. " - "Note: Support of netdev-dpdk/detach has been removed from OVS, so testcase will fail " - "with recent OVS/DPDK versions.", - "vSwitch" : "OvsDpdkVhost", - "Parameters" : { - # suppress DPDK configuration, so physical interfaces are not bound to DPDK driver - 'WHITELIST_NICS' : [], - 'NICS' : [], - }, - "TestSteps": [ - # check if OVS supports netdev-dpdk/detach, fail otherwise - ['tools', 'exec_shell', 'sudo $TOOLS["ovs-appctl"] list-commands', '|netdev-dpdk\/detach'], - ['tools', 'assert', 'len(#STEP[-1])'], - # restore original NICS configuration, so we can use add/del_phy_port - ['settings', 'setValue', 'TEST_PARAMS', ''], - # find out which DPDK driver is being used; it should be the last configured - # DPDK module; optional path and .ko suffix must be removed - ['tools', 'eval', '\'$TOOLS["dpdk_modules"][-1]\'.split("/")[-1].split(".")[0]'], - # bind NIC to DPDK driver - ['tools', 'exec_shell', 'sudo $TOOLS["bind-tool"] --bind #STEP[-1] $NICS[0]["pci"]'], - # and check that DPDK port can be created without errors - ['vswitch', 'add_switch', 'int_br0'], - ['#port', 'vswitch', 'add_phy_port', 'int_br0'], - ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] show', - '|Error attaching device.*$NICS[0]["pci"]'], - ['tools', 'assert', 'not len(#STEP[-1])'], - # try to unbind port - should fail beause it is being used - ['tools', 'exec_shell', 'sudo $TOOLS["ovs-appctl"] netdev-dpdk/detach $NICS[0]["pci"] 2>&1; exit 0', - '|Device.*$NICS[0]["pci"].*is being used by interface'], - ['tools', 'assert', 'len(#STEP[-1])'], - # delete port and unbind it - should succeed - ['vswitch', 'del_port', 'int_br0', '#STEP[port][0]'], - ['tools', 'exec_shell', 'sudo $TOOLS["ovs-appctl"] netdev-dpdk/detach $NICS[0]["pci"]', - '|Device.*$NICS[0]["pci"].*has been detached'], - ['tools', 'assert', 'len(#STEP[-1])'], - # try to add port again - ['vswitch', 'add_phy_port', 'int_br0'], - ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] show', - '|Error attaching device.*$NICS[0]["pci"]'], - # it will work because auto attach was implemented into OVS - ['tools', 'assert', 'not len(#STEP[-1])'], - ['vswitch', 'del_switch', 'int_br0'], ] }, ] @@ -344,14 +295,14 @@ INTEGRATION_TESTS = INTEGRATION_TESTS + [ # frame loss with small packets should be detected ['tools', 'assert', '#STEP[-1][0]["frame_loss_percent"] > 10'], # delete phy ports so they can be created with flow control - ['vswitch', 'del_flow', 'br0', {}], - ['vswitch', 'del_port', 'br0', 'dpdk0'], - ['vswitch', 'del_port', 'br0', 'dpdk1'], + ['vswitch', 'del_flow', '$VSWITCH_BRIDGE_NAME', {}], + ['vswitch', 'del_port', '$VSWITCH_BRIDGE_NAME', 'dpdk0'], + ['vswitch', 'del_port', '$VSWITCH_BRIDGE_NAME', 'dpdk1'], # turn on flow control - ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] add-port br0 dpdk0 -- set Interface dpdk0 type=dpdk options:dpdk-devargs=$NICS[0]["pci"] options:rx-flow-ctrl=true'], - ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] add-port br0 dpdk1 -- set Interface dpdk1 type=dpdk options:dpdk-devargs=$NICS[1]["pci"] options:rx-flow-ctrl=true'], - ['vswitch', 'add_flow', 'br0', {'in_port': '3', 'actions': ['output:4'], 'idle_timeout': '0'}], - ['vswitch', 'add_flow', 'br0', {'in_port': '4', 'actions': ['output:3'], 'idle_timeout': '0'}], + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] add-port $VSWITCH_BRIDGE_NAME dpdk0 -- set Interface dpdk0 type=dpdk options:dpdk-devargs=$NICS[0]["pci"] options:rx-flow-ctrl=true'], + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] add-port $VSWITCH_BRIDGE_NAME dpdk1 -- set Interface dpdk1 type=dpdk options:dpdk-devargs=$NICS[1]["pci"] options:rx-flow-ctrl=true'], + ['vswitch', 'add_flow', '$VSWITCH_BRIDGE_NAME', {'in_port': '3', 'actions': ['output:4'], 'idle_timeout': '0'}], + ['vswitch', 'add_flow', '$VSWITCH_BRIDGE_NAME', {'in_port': '4', 'actions': ['output:3'], 'idle_timeout': '0'}], ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] show'], ['trafficgen', 'send_traffic', {}], ['trafficgen', 'get_results'], @@ -413,7 +364,7 @@ INTEGRATION_TESTS = INTEGRATION_TESTS + [ "VSWITCH_DPDK_MULTI_QUEUES" : _OVSDPDK_MQ, }, "TestSteps": [ - ['tools', 'exec_shell', 'sudo $TOOLS["ovs-appctl"] dpif-netdev/pmd-rxq-show','|dpdk[01]\s+queue-id: \d+'], + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-appctl"] dpif-netdev/pmd-rxq-show','|dpdk[01]\s+queue-id:\s+\d+'], # check that requested nr of queues was created on both NICs ['tools', 'assert', 'len(#STEP[-1])=={}'.format(int(_OVSDPDK_MQ)*2)], ] @@ -435,8 +386,10 @@ INTEGRATION_TESTS = INTEGRATION_TESTS + [ }, "TestSteps": [ ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] -- set Interface dpdk0 other_config:pmd-rxq-affinity="0:{},1:{}"'.format(_OVSDPDK_1st_PMD_CORE, _OVSDPDK_1st_PMD_CORE)], - ['tools', 'exec_shell', 'sudo $TOOLS["ovs-appctl"] dpif-netdev/pmd-rxq-show','|dpdk0\s+queue-id: 0 1'], - ['tools', 'assert', 'len(#STEP[-1])==1'], + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-appctl"] dpif-netdev/pmd-rxq-show','|dpdk0\s+queue-id:\s+0'], + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-appctl"] dpif-netdev/pmd-rxq-show','|dpdk0\s+queue-id:\s+1'], + ['tools', 'assert', 'len(#STEP[-2])==1'], + ['tools', 'assert', 'len(#STEP[-2])==1'], ] }, { @@ -456,8 +409,8 @@ INTEGRATION_TESTS = INTEGRATION_TESTS + [ }, "TestSteps": [ ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] -- set Interface dpdk0 other_config:pmd-rxq-affinity="0:{},1:{}"'.format(_OVSDPDK_1st_PMD_CORE, _OVSDPDK_2nd_PMD_CORE)], - ['tools', 'exec_shell', 'sudo $TOOLS["ovs-appctl"] dpif-netdev/pmd-rxq-show','|dpdk0\s+queue-id: 0$'], - ['tools', 'exec_shell', 'sudo $TOOLS["ovs-appctl"] dpif-netdev/pmd-rxq-show','|dpdk0\s+queue-id: 1$'], + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-appctl"] dpif-netdev/pmd-rxq-show','|dpdk0\s+queue-id:\s+0'], + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-appctl"] dpif-netdev/pmd-rxq-show','|dpdk0\s+queue-id:\s+1'], ['tools', 'assert', 'len(#STEP[-2])==1'], ['tools', 'assert', 'len(#STEP[-2])==1'], ] @@ -478,12 +431,15 @@ INTEGRATION_TESTS = INTEGRATION_TESTS + [ "TestSteps": STEP_VSWITCH_PVP_INIT + [ ['tools', 'exec_shell', "sudo $TOOLS['ovs-appctl'] dpif-netdev/pmd-rxq-show", - '|dpdkvhostuserclient0\s+queue-id: \d'], + '|dpdkvhostuserclient0\s+queue-id:\s+\d'], ['tools', 'assert', 'len(#STEP[-1])==1'], ['vnf', 'start'], ['tools', 'exec_shell', "sudo $TOOLS['ovs-appctl'] dpif-netdev/pmd-rxq-show", - '|dpdkvhostuserclient0\s+queue-id: 0 1'], - ['tools', 'assert', 'len(#STEP[-1])==1'], + '|dpdkvhostuserclient0\s+queue-id:\s+0'], + ['tools', 'exec_shell', "sudo $TOOLS['ovs-appctl'] dpif-netdev/pmd-rxq-show", + '|dpdkvhostuserclient0\s+queue-id:\s+1'], + ['tools', 'assert', 'len(#STEP[-2])==1'], + ['tools', 'assert', 'len(#STEP[-2])==1'], ['vnf', 'stop'], ] + STEP_VSWITCH_PVP_FINIT @@ -503,11 +459,12 @@ INTEGRATION_TESTS = INTEGRATION_TESTS + [ "TRAFFICGEN_DURATION" : 5, "TRAFFICGEN" : "IxNet", "TRAFFIC" : { - "bidir" : "false", + "bidir" : "False", "traffic_type" : "rfc2544_continuous", "multistream" : 6, "stream_type" : "L3", "frame_rate" : 1, + "learning_frames" : False, 'l2': { 'srcmac': "00:00:07:00:0E:00", 'dstmac': "00:00:00:00:00:01" @@ -517,7 +474,7 @@ INTEGRATION_TESTS = INTEGRATION_TESTS + [ 'proto': 'udp', 'srcip': '6.6.6.6', 'dstip': '1.1.1.1', - }, + } } }, "TestSteps": STEP_VSWITCH_PVP_INIT + [ @@ -528,6 +485,7 @@ INTEGRATION_TESTS = INTEGRATION_TESTS + [ # so send_traffic() will end with success ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[2][1]', 'actions': ['output:#STEP[1][1]'], 'idle_timeout': '0'}], + ['vswitch', 'add_flow', 'int_br0', {'priority' : '0', 'actions' : ['NORMAL']}], ['vnf', 'start'], # configure two channels, so multiple cores could be used ['vnf', 'execute_and_wait', 'ethtool -L eth0 combined 2'], @@ -552,7 +510,6 @@ INTEGRATION_TESTS = INTEGRATION_TESTS + [ ['vnf', 'execute_and_wait', 'route add default gw 1.1.1.5 eth0'], ['vnf', 'execute_and_wait', 'arp -s 1.1.1.5 DE:AD:BE:EF:CA:FC'], ['vnf', 'execute_and_wait', 'ip a'], - ['trafficgen', 'send_traffic',{}], # check interrupts to verify that traffic was corectly dispatched... ['#result', 'vnf', 'execute_and_wait', 'cat /proc/interrupts', @@ -583,16 +540,15 @@ INTEGRATION_TESTS = INTEGRATION_TESTS + [ # there must be separate CPU for each of RX/TX queues "GUEST_SMP" : ['5'], "GUEST_TESTPMD_PARAMS" : ['-c 0x1F -n 4 --socket-mem 512 -- ' - '--burst=64 -i --txqflags=0xf00 --nb-cores=4 ' - # map queue stats to separate regs to verify MQ functionality - '--rx-queue-stats-mapping=\(0,0,0\),\(0,1,1\),\(1,0,2\),\(1,1,3\) ' - '--tx-queue-stats-mapping=\(0,0,4\),\(0,1,5\),\(1,0,6\),\(1,1,7\) ' - '--disable-hw-vlan --rxq=2 --txq=2'], + '--burst=64 -i --nb-cores=4 ' + '--rxq=2 --txq=2'], "TRAFFICGEN_DURATION" : 5, "TRAFFIC" : { "traffic_type" : "rfc2544_continuous", "multistream" : 3, "stream_type" : "L3", + "frame_rate" : 1, + "learning_frames" : False, 'l3': { 'enabled': True, 'proto': 'udp', @@ -600,12 +556,21 @@ INTEGRATION_TESTS = INTEGRATION_TESTS + [ 'dstip': '1.1.1.1', }, }, + "GUEST_QUEUE_STATS_MAPPING" : ["rx 0 0 0", + "rx 0 1 1", + "rx 1 0 2", + "rx 1 1 3", + "tx 0 0 4", + "tx 0 1 5", + "tx 1 0 6", + "tx 1 1 7" + ] }, "TestSteps": STEP_VSWITCH_PVP_FLOWS_INIT + [ ['vnf', 'start'], ['tools', 'exec_shell', "sudo $TOOLS['ovs-appctl'] dpif-netdev/pmd-rxq-show", - '|dpdk\w+\s+queue-id: \d'], + '|dpdk\w+\s+queue-id:\s+\d'], # there must be two standalone queue records for every interface (2x4) ['tools', 'assert', 'len(#STEP[-1])==8'], ['trafficgen', 'send_traffic', {}], @@ -671,15 +636,17 @@ INTEGRATION_TESTS = INTEGRATION_TESTS + [ "TestSteps": [ # send traffic to verify correct PVP configuration ['trafficgen', 'send_traffic', {}], - ['vswitch', 'dump_flows', 'br0'], + ['vswitch', 'dump_flows', '$VSWITCH_BRIDGE_NAME'], # restart vswitchd, ovsdb is kept untouched, so ovs configuration # (except flows) will be restored ['vswitch', 'restart'], - ['vswitch', 'del_flow', 'br0'], - ['vswitch', 'add_flow', 'br0', {'in_port': '1', 'actions': ['output:3'], 'idle_timeout': '0'}], - ['vswitch', 'add_flow', 'br0', {'in_port': '3', 'actions': ['output:1'], 'idle_timeout': '0'}], - ['vswitch', 'add_flow', 'br0', {'in_port': '2', 'actions': ['output:4'], 'idle_timeout': '0'}], - ['vswitch', 'add_flow', 'br0', {'in_port': '4', 'actions': ['output:2'], 'idle_timeout': '0'}], + ['vswitch', 'del_flow', '$VSWITCH_BRIDGE_NAME', {}], + ['vswitch', 'dump_flows', '$VSWITCH_BRIDGE_NAME'], + ['vswitch', 'add_flow', '$VSWITCH_BRIDGE_NAME', {'in_port': '1', 'actions': ['output:3'], 'idle_timeout': '0'}], + ['vswitch', 'add_flow', '$VSWITCH_BRIDGE_NAME', {'in_port': '3', 'actions': ['output:1'], 'idle_timeout': '0'}], + ['vswitch', 'add_flow', '$VSWITCH_BRIDGE_NAME', {'in_port': '2', 'actions': ['output:4'], 'idle_timeout': '0'}], + ['vswitch', 'add_flow', '$VSWITCH_BRIDGE_NAME', {'in_port': '4', 'actions': ['output:2'], 'idle_timeout': '0'}], + ['vswitch', 'dump_flows', '$VSWITCH_BRIDGE_NAME'], # send traffic to verify that OVS works correctly after restart ['trafficgen', 'send_traffic', {}], ], @@ -718,13 +685,13 @@ INTEGRATION_TESTS = INTEGRATION_TESTS + [ "VSWITCH_VHOSTUSER_SERVER_MODE" : True, }, "TestSteps": [ - ['vswitch', 'add_switch', 'br0'], + ['vswitch', 'add_switch', '$VSWITCH_BRIDGE_NAME'], ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] set Open_vSwitch . ' 'other_config:vhost-sock-dir=test_dir'], # enforce vswitchd to read new configuration ['vswitch', 'restart'], ['tools', 'exec_shell', 'sudo mkdir $TOOLS["ovs_var_tmp"]/test_dir'], - ['vswitch', 'add_vport', 'br0'], + ['vswitch', 'add_vport', '$VSWITCH_BRIDGE_NAME'], ['tools', 'exec_shell', 'ls -1 $TOOLS["ovs_var_tmp"]/test_dir', '|dpdkvhostuser0'], ['tools', 'assert', 'len(#STEP[-1])'], @@ -740,7 +707,7 @@ _OVSDPDK_VDEV_ADD_NULL = [ ['vswitch', 'add_switch', 'int_br0'], ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] add-port int_br0 null0 -- ' 'set Interface null0 type=dpdk options:dpdk-devargs=eth_null0'], - ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] show', '|dpdk-devargs=\S+eth_null0'], + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] show', '|dpdk-devargs=eth_null0'], ['tools', 'assert', 'len(#STEP[-1])==1'], ] @@ -777,7 +744,7 @@ INTEGRATION_TESTS = INTEGRATION_TESTS + [ "TestSteps": _OVSDPDK_VDEV_ADD_NULL + [ ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] del-port null0'], ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] show', - '|dpdk-devargs=\S+eth_null0'], + '|dpdk-devargs=eth_null0'], ['tools', 'assert', 'not len(#STEP[-1])'], ] }, @@ -1018,9 +985,9 @@ INTEGRATION_TESTS = INTEGRATION_TESTS + [ "TestSteps": [ ['vswitch', 'add_switch', 'int_br0'], ['vswitch', 'add_phy_port', 'int_br0'], - ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] set Interface dpdk0 mtu_request=9710'], + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] set Interface dpdk0 mtu_request=9702'], ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] get Interface dpdk0 mtu'], - ['tools', 'assert', 'int(#STEP[-1])==9710'], + ['tools', 'assert', 'int(#STEP[-1])==9702'], # get line number of next log file entry ['tools', 'exec_shell', 'echo $((1+`wc -l $_OVSDPDK_VSWITCH_LOG | cut -d" " -f1`))', '(\d+)'], ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] set Interface dpdk0 mtu_request=9711'], @@ -1028,7 +995,7 @@ INTEGRATION_TESTS = INTEGRATION_TESTS + [ ['tools', 'exec_shell', "sed -n '#STEP[-2][0],$ p' $_OVSDPDK_VSWITCH_LOG", '|unsupported MTU 9711'], ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] get Interface dpdk0 mtu'], - ['tools', 'assert', 'int(#STEP[-1])==9710'], + ['tools', 'assert', 'int(#STEP[-1])==9702'], ] }, { @@ -1042,9 +1009,9 @@ INTEGRATION_TESTS = INTEGRATION_TESTS + [ "TestSteps": [ ['vswitch', 'add_switch', 'int_br0'], ['vswitch', 'add_vport', 'int_br0'], - ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] set Interface dpdkvhostuserclient0 mtu_request=9710'], + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] set Interface dpdkvhostuserclient0 mtu_request=9702'], ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] get Interface dpdkvhostuserclient0 mtu'], - ['tools', 'assert', 'int(#STEP[-1])==9710'], + ['tools', 'assert', 'int(#STEP[-1])==9702'], # get line number of next log file entry ['tools', 'exec_shell', 'echo $((1+`wc -l $_OVSDPDK_VSWITCH_LOG | cut -d" " -f1`))', '(\d+)'], ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] set Interface dpdkvhostuserclient0 mtu_request=9711'], @@ -1053,7 +1020,7 @@ INTEGRATION_TESTS = INTEGRATION_TESTS + [ '|unsupported MTU 9711'], ['tools', 'assert', 'len(#STEP[-1])'], ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] get Interface dpdkvhostuserclient0 mtu'], - ['tools', 'assert', 'int(#STEP[-1])==9710'], + ['tools', 'assert', 'int(#STEP[-1])==9702'], ] }, { @@ -1201,8 +1168,8 @@ INTEGRATION_TESTS = INTEGRATION_TESTS + [ ['trafficgen', 'get_results'], # all traffic should pass through (i.e. 0% frame loss) ['tools', 'assert', 'float(#STEP[-1][0]["frame_loss_percent"])==0'], - # set packetsize to 9019 and send traffic - ['settings', 'setValue', 'TRAFFICGEN_PKT_SIZES', (9019,)], + # set packetsize to 9702 and send traffic + ['settings', 'setValue', 'TRAFFICGEN_PKT_SIZES', (9702,)], # disable verification of send_traffic "!" prefix, otherwise vsperf # will fail when 100% packet loss is detected ['!trafficgen', 'send_traffic', {}], @@ -1245,10 +1212,6 @@ _OVSDPDK_RATE_set_rate_limiter = [ 'set Interface $_OVSDPDK_RATE_PORT$_OVSDPDK_RATE_NICID ' 'ingress_policing_burst=$_OVSDPDK_RATE_BURST ' 'ingress_policing_rate=$_OVSDPDK_RATE_RATE'], - # check vswitchd log file, that rate limiter was created - ['tools', 'exec_shell', "sed -n '#STEP[-2][0],$ p' $_OVSDPDK_VSWITCH_LOG", - '|CIR period'], - ['tools', 'assert', '("CIR period" in #STEP[-1])==$_OVSDPDK_RATE_LIMITER_CREATED'], # verify that interface has correct rate limiter configuration ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] ' 'list interface $_OVSDPDK_RATE_PORT$_OVSDPDK_RATE_NICID', @@ -1297,7 +1260,7 @@ _OVSDPDK_RATE_confirm_multiple_rate_limit_setup = \ # check that traffic rate is no longer limited ['trafficgen', 'get_results'], ['tools', 'assert', 'int(#STEP[-1][0]["throughput_rx_mbps"])>500'], - ['vswitch', 'dump_flows', 'br0'], + ['vswitch', 'dump_flows', '$VSWITCH_BRIDGE_NAME'], ] INTEGRATION_TESTS = INTEGRATION_TESTS + [ @@ -1492,11 +1455,6 @@ _OVSDPDK_QOS_set_qos = [ 'other-config:cbs=$_OVSDPDK_QOS_CBS','|\w{8}-\w{4}-\w{4}-\w{4}-\w{12}'], ['tools', 'assert', 'len(#STEP[-1])==1'], - # Check the OVS logs - ['tools', 'exec_shell', "sed -n '#STEP[-3][0],$ p' $_OVSDPDK_VSWITCH_LOG", - '|CIR period'], - ['tools', 'assert', '"CIR period" in #STEP[-1]'], - # Check the QoS policy and attributes ['tools', 'exec_shell', 'sudo $TOOLS["ovs-appctl"] -t ovs-vswitchd qos/show ' '$_OVSDPDK_QOS_PORT$_OVSDPDK_QOS_NICID', '.+'], @@ -1603,8 +1561,8 @@ INTEGRATION_TESTS = INTEGRATION_TESTS + [ "Parameters" : {}, "TestSteps": [ # Setup switch,port and logs - ['vswitch', 'add_switch', 'br0'], - ['vswitch', 'add_vport', 'br0'], + ['vswitch', 'add_switch', '$VSWITCH_BRIDGE_NAME'], + ['vswitch', 'add_vport', '$VSWITCH_BRIDGE_NAME'], ['#LOG_MARK', 'tools', 'exec_shell', 'echo $((1+`wc -l $_OVSDPDK_VSWITCH_LOG | cut -d" " -f1`))', '(\d+)'], @@ -1616,7 +1574,7 @@ INTEGRATION_TESTS = INTEGRATION_TESTS + [ # Check the OVS logs ['tools', 'exec_shell', "sed -n '#STEP[LOG_MARK][0],$ p' $_OVSDPDK_VSWITCH_LOG", - 'Failed to set QoS type egress-policer on port #STEP[1][0]: No such file or directory'], + 'Failed to set QoS type egress-policer on port #STEP[1][0]: Invalid argument'], ['tools', 'assert', 'len(#STEP[-1])==1'], # Check the attributes for vhost0 @@ -1633,8 +1591,8 @@ INTEGRATION_TESTS = INTEGRATION_TESTS + [ "Parameters" : {}, "TestSteps": [ # Setup switch,port and logs - ['vswitch', 'add_switch', 'br0'], - ['vswitch', 'add_vport', 'br0'], + ['vswitch', 'add_switch', '$VSWITCH_BRIDGE_NAME'], + ['vswitch', 'add_vport', '$VSWITCH_BRIDGE_NAME'], ['#LOG_MARK', 'tools', 'exec_shell', 'echo $((1+`wc -l $_OVSDPDK_VSWITCH_LOG | cut -d" " -f1`))', '(\d+)'], @@ -1646,7 +1604,7 @@ INTEGRATION_TESTS = INTEGRATION_TESTS + [ # Check the OVS logs ['tools', 'exec_shell', "sed -n '#STEP[LOG_MARK][0],$ p' $_OVSDPDK_VSWITCH_LOG", - 'Failed to set QoS type egress-policer on port #STEP[1][0]: No such file or directory'], + 'Failed to set QoS type egress-policer on port #STEP[1][0]: Invalid argument'], ['tools', 'assert', 'len(#STEP[-1])==1'], # Check the attributes for vhost0 @@ -1686,4 +1644,72 @@ INTEGRATION_TESTS = INTEGRATION_TESTS + [ }, "TestSteps": _OVSDPDK_QOS_confirm_multiple_qos_setup }, + ############################################################ + # + # Custom statistics + # + ############################################################ + { + "Name": "ovsdpdk_custstat_check", + "Deployment": "clean", + "Description": "Test if custom statistics are supported.", + "vSwitch" : "OvsDpdkVhost", + "TestSteps": [ + # enable custom statistics + ['vswitch', 'add_switch', 'int_br0', [ + 'protocols=OpenFlow10,OpenFlow11,OpenFlow12,' + 'OpenFlow13,OpenFlow14,OpenFlow15']], + ['#port', 'vswitch', 'add_phy_port', 'int_br0'], + # check that custom statistics are available for given interface + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-ofctl"] -O OpenFlow14 ' + 'dump-ports int_br0 #STEP[port][1]', + '|CUSTOM Statistics'], + ['tools', 'assert', 'len(#STEP[-1])'], + ['vswitch', 'del_port', 'int_br0', '#STEP[port][0]'], + ['vswitch', 'del_switch', 'int_br0'], + ] + }, + { + "Name": "ovsdpdk_custstat_rx_error", + "Deployment": "clean", + "Description": "Test bad ethernet CRC counter 'rx_crc_errors' exposed by custom statistics.", + "vSwitch" : "OvsDpdkVhost", + "Parameters" : { + "OVS_OFCTL_ARGS" : [], + "TRAFFICGEN" : "IxNet", + "TRAFFIC" : { + "traffic_type" : "rfc2544_continuous", + "frame_rate" : 10, + }, + "TRAFFICGEN_DURATION" : 10, + "TRAFFICGEN_IXNET_TCL_SCRIPT" : "ixnetrfc2544_bad_l2_crc.tcl", + }, + "TestSteps": [ + # enable custom statistics + ['vswitch', 'add_switch', 'int_br0', [ + 'protocols=OpenFlow10,OpenFlow11,OpenFlow12,' + 'OpenFlow13,OpenFlow14,OpenFlow15']], + ['#port1', 'vswitch', 'add_phy_port', 'int_br0'], + ['#port2', 'vswitch', 'add_phy_port', 'int_br0'], + ['vswitch', 'add_flow', 'int_br0', {'in_port': '1', 'actions': ['output:2']}], + ['vswitch', 'add_flow', 'int_br0', {'in_port': '2', 'actions': ['output:1']}], + ['#crc_old', 'tools', 'exec_shell', 'sudo $TOOLS["ovs-ofctl"] -O OpenFlow14 ' + 'dump-ports int_br0 #STEP[port1][1]', + '|rx_crc_errors=(\d+)'], + # frames will be dropped by NIC, so we have to suppress send_traffic validation + # to avoid test failure + ['!trafficgen', 'send_traffic', {}], + # check that custom statistics are available for given interface + ['#crc_new', 'tools', 'exec_shell', 'sudo $TOOLS["ovs-ofctl"] -O OpenFlow14 ' + 'dump-ports int_br0 #STEP[port1][1]', + '|rx_crc_errors=(\d+)'], + ['tools', 'assert', '#STEP[crc_new] > #STEP[crc_old]'], + # tear down the environment + ['vswitch', 'dump_flows', 'int_br0'], + ['vswitch', 'del_flow', 'int_br0', {}], + ['vswitch', 'del_port', 'int_br0', '#STEP[port1][0]'], + ['vswitch', 'del_port', 'int_br0', '#STEP[port2][0]'], + ['vswitch', 'del_switch', 'int_br0'], + ] + }, ] diff --git a/conf/integration/01c_trex_vm_tests.conf b/conf/integration/01c_trex_vm_tests.conf new file mode 100644 index 00000000..1bec4efd --- /dev/null +++ b/conf/integration/01c_trex_vm_tests.conf @@ -0,0 +1,182 @@ +# Copyright 2018 Intel Corporation. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# +# Testcases in this files use T-Rex running in VM as a traffic generator. +# + +# A set of options passed to the T-Rex stateless server +_TREX_OPTIONS="--no-scapy-server --no-watchdog --nc" +_TREX_SERVER_IP="192.168.35.2" +_TREX_BRIDGE_IP="192.168.35.1" +_TREX_IP_MASK="24" + +# Macro for initialization of T-Rex VM and execution of T-Rex server +# NOTE: It is expected that T-Rex will run in the LAST VM! +TREX_VM_INIT = [ + # configure T-Rex ports, which will be used for traffic generation + ['#trex_p1', 'vswitch', 'add_vport', 'int_br0'], + ['#trex_p2', 'vswitch', 'add_vport', 'int_br0'], + # configure IP access to T-Rex VM + ['vswitch', 'add_switch', 'trex_br'], + ['vswitch', 'add_flow', 'trex_br', {'actions': ['NORMAL']}], # turn on MAC learning mode + ['#trex_admin', 'vswitch', 'add_vport', 'trex_br'], + ['#trex_spare', 'vswitch', 'add_vport', 'trex_br'], # spare to have even number of NICs + ['tools', 'exec_shell', 'sudo ip addr flush dev trex_br'], + ['tools', 'exec_shell', 'sudo ip addr add $_TREX_BRIDGE_IP/$_TREX_IP_MASK dev trex_br'], + ['tools', 'exec_shell', 'sudo ip link set dev trex_br up'], + ['vnf_trex', 'start'], + ['vnf_trex', 'execute_and_wait', 'sudo ip addr flush dev eth2'], + ['vnf_trex', 'execute_and_wait', 'sudo ip addr add $_TREX_SERVER_IP/$_TREX_IP_MASK dev eth2'], + ['vnf_trex', 'execute_and_wait', 'sudo ip link set dev eth2 up'], + # preapre system for T-Rex execution + ['vnf_trex', 'execute_and_wait', 'sysctl vm.nr_hugepages=$GUEST_HUGEPAGES_NR[-1]'], + ['vnf_trex', 'execute_and_wait', 'mkdir -p /dev/hugepages'], + ['vnf_trex', 'execute_and_wait', 'mount -t hugetlbfs hugetlbfs /dev/hugepages'], + ['vnf_trex', 'execute_and_wait', 'grep -i huge /proc/meminfo'], + ['vnf_trex', 'execute_and_wait', 'iptables -F'], + # configure passwordless ssh access to VM with T-Rex server + ['tools', 'exec_shell', 'sshpass -p $GUEST_PASSWORD[-1] ssh-copy-id -o StrictHostKeyChecking=no $GUEST_USERNAME[-1]@$_TREX_SERVER_IP'], + # prepare T-Rex configuration + ['vnf_trex', 'execute_and_wait', 'echo \'- port_limit: 2\' > /etc/trex_cfg.yaml'], + ['vnf_trex', 'execute_and_wait', 'echo \' version: 2\' >> /etc/trex_cfg.yaml'], + ['vnf_trex', 'execute_and_wait', "echo \" interfaces: [ '$GUEST_NICS[-1][0]['pci']', '$GUEST_NICS[-1][1]['pci']' ]\" >> /etc/trex_cfg.yaml"], + # execute T-Rex stateless server and wait until it is up and running + ['vnf_trex', 'execute_and_wait', 'cd $TRAFFICGEN_TREX_BASE_DIR'], + ['#trex_pid', 'vnf_trex', 'execute_and_wait', 'nohup sudo bash -c "./t-rex-64 -i $_TREX_OPTIONS" &', '|\[1\] (\d+)$'], + ['vnf_trex', 'execute_and_wait', 'echo -ne "Starting T-Rex " ; while ! netstat -nl | grep 4501 &> /dev/null ; do echo -ne "."; sleep 1 ; done; echo', 300], +] + +# T-Rex VM teardown macro +TREX_VM_FINIT = [ + ['vnf_trex', 'execute_and_wait', 'sudo kill #STEP[trex_pid][0]'], + ['vnf_trex', 'execute_and_wait', 'sudo pkill t-rex-64'], + ['vnf_trex', 'stop'], + ['vswitch', 'del_port', 'trex_br', '#STEP[trex_admin][0]'], + ['vswitch', 'del_port', 'trex_br', '#STEP[trex_spare][0]'], + ['tools', 'exec_shell', 'sudo ip link set dev trex_br down'], + ['tools', 'exec_shell', 'sudo ip addr flush dev trex_br'], + ['vswitch', 'del_switch', 'trex_br'], +] + +# Configure T-Rex loopback test, where traffic from T-Rex is forwarded back via OVS flows +TREX_VM_TEST = [ + ['vswitch', 'add_switch', 'int_br0'], + ] + TREX_VM_INIT + [ + ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[trex_p1][1]', 'actions': ['output:#STEP[trex_p2][1]'], 'idle_timeout': '0'}], + ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[trex_p2][1]', 'actions': ['output:#STEP[trex_p1][1]'], 'idle_timeout': '0'}], + ['trafficgen', 'send_traffic', {}], + ['trafficgen', 'get_results'], + # cleanup + ] + TREX_VM_FINIT + +# Configure VM2VM test, where traffic from T-Rex VM is forwarded to 2nd VM with loopback app. +TREX_VM2VM_TEST = [ + ['vswitch', 'add_switch', 'int_br0'], + ['#vm_p1', 'vswitch', 'add_vport', 'int_br0'], + ['#vm_p2', 'vswitch', 'add_vport', 'int_br0'], + ['vnf', 'start'], + ] + TREX_VM_INIT + [ + ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[trex_p1][1]', 'actions': ['output:#STEP[vm_p1][1]'], 'idle_timeout': '0'}], + ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[vm_p1][1]', 'actions': ['output:#STEP[trex_p1][1]'], 'idle_timeout': '0'}], + ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[trex_p2][1]', 'actions': ['output:#STEP[vm_p2][1]'], 'idle_timeout': '0'}], + ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[vm_p2][1]', 'actions': ['output:#STEP[trex_p2][1]'], 'idle_timeout': '0'}], + ['trafficgen', 'send_traffic', {}], + ['trafficgen', 'get_results'], + ['vnf', 'stop'], + ['vswitch', 'dump_flows', 'int_br0'], + # cleanup + ] + TREX_VM_FINIT + +# +# A set of tests with T-Rex VM as a traffic generator. +# +INTEGRATION_TESTS = INTEGRATION_TESTS + [ + { + "Name": "trex_vm_cont", + "Deployment": "clean", + "Description": "T-Rex VM - execute RFC2544 Continuous Stream from T-Rex VM and loop it back through Open vSwitch.", + "Parameters" : { + "TRAFFIC" : { + "traffic_type" : "rfc2544_continuous", + }, + 'GUEST_LOOPBACK' : ['clean',], + 'GUEST_NICS_NR' : [4], + 'GUEST_SMP' : ['sockets=1,cores=3'], + 'GUEST_CORE_BINDING' : [['6', '7', '8'],], + 'TRAFFICGEN' : 'Trex', + 'TRAFFICGEN_TREX_HOST_IP_ADDR' : _TREX_SERVER_IP, + 'TRAFFICGEN_TREX_BASE_DIR' : '/root/trex/scripts/', + 'TRAFFICGEN_TREX_USER' : 'root', + }, + "TestSteps": TREX_VM_TEST + }, + { + "Name": "trex_vm_tput", + "Deployment": "clean", + "Description": "T-Rex VM - execute RFC2544 Throughput from T-Rex VM and loop it back through Open vSwitch.", + "Parameters" : { + "TRAFFIC" : { + "traffic_type" : "rfc2544_throughput", + }, + 'GUEST_LOOPBACK' : ['clean',], + 'GUEST_NICS_NR' : [4], + 'GUEST_SMP' : ['sockets=1,cores=3'], + 'GUEST_CORE_BINDING' : [['6', '7', '8'],], + 'TRAFFICGEN' : 'Trex', + 'TRAFFICGEN_TREX_HOST_IP_ADDR' : _TREX_SERVER_IP, + 'TRAFFICGEN_TREX_BASE_DIR' : '/root/trex/scripts/', + 'TRAFFICGEN_TREX_USER' : 'root', + }, + "TestSteps": TREX_VM_TEST + }, + { + "Name": "trex_vm2vm_cont", + "Deployment": "clean", + "Description": "T-Rex VM2VM - execute RFC2544 Continuous Stream from T-Rex VM and loop it back through 2nd VM.", + "Parameters" : { + 'GUEST_LOOPBACK' : ['testpmd', 'clean'], + 'GUEST_NICS_NR' : [2, 4], + 'GUEST_SMP' : ['sockets=1,cores=2', 'sockets=1,cores=3'], + 'GUEST_CORE_BINDING' : [['9', '10'],['6', '7', '8'],], + 'TRAFFICGEN' : 'Trex', + 'TRAFFICGEN_TREX_HOST_IP_ADDR' : _TREX_SERVER_IP, + 'TRAFFICGEN_TREX_BASE_DIR' : '/root/trex/scripts/', + 'TRAFFICGEN_TREX_USER' : 'root', + "TRAFFIC" : { + "traffic_type" : "rfc2544_continuous", + }, + }, + "TestSteps": TREX_VM2VM_TEST, + }, + { + "Name": "trex_vm2vm_tput", + "Deployment": "clean", + "Description": "T-Rex VM2VM - execute RFC2544 Throughput from T-Rex VM and loop it back through 2nd VM.", + "Parameters" : { + 'GUEST_LOOPBACK' : ['testpmd', 'clean'], + 'GUEST_NICS_NR' : [2, 4], + 'GUEST_SMP' : ['sockets=1,cores=2', 'sockets=1,cores=3'], + 'GUEST_CORE_BINDING' : [['9', '10'],['6', '7', '8'],], + 'TRAFFICGEN' : 'Trex', + 'TRAFFICGEN_TREX_HOST_IP_ADDR' : _TREX_SERVER_IP, + 'TRAFFICGEN_TREX_BASE_DIR' : '/root/trex/scripts/', + 'TRAFFICGEN_TREX_USER' : 'root', + "TRAFFIC" : { + "traffic_type" : "rfc2544_throughput", + }, + }, + "TestSteps": TREX_VM2VM_TEST, + }, +] diff --git a/conf/integration/02_vswitch.conf b/conf/integration/02_vswitch.conf index 63ffe1bc..9477a1d0 100644 --- a/conf/integration/02_vswitch.conf +++ b/conf/integration/02_vswitch.conf @@ -1,4 +1,4 @@ -# Copyright 2015-2016 Intel Corporation. +# Copyright 2015-2018 Intel Corporation., Tieto # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -16,8 +16,8 @@ VTEP_IP1 = '192.168.0.1/24' VTEP_IP2 = '192.168.240.10' VTEP_IP2_SUBNET = '192.168.240.0/24' -TUNNEL_INTEGRATION_BRIDGE = 'br0' -TUNNEL_EXTERNAL_BRIDGE = 'br-ext' +TUNNEL_INTEGRATION_BRIDGE = 'vsperf-br0' +TUNNEL_EXTERNAL_BRIDGE = 'vsperf-br-ext' TUNNEL_EXTERNAL_BRIDGE_IP = '192.168.240.1/24' # vxlan|gre|geneve diff --git a/conf/kubernetes/01_testcases.conf b/conf/kubernetes/01_testcases.conf new file mode 100644 index 00000000..c5b3135c --- /dev/null +++ b/conf/kubernetes/01_testcases.conf @@ -0,0 +1,12 @@ +K8SPERFORMANCE_TESTS = [ + { + "Name": "pcp_tput", + "Deployment": "p2p", + "Description": "LTD.Throughput.RFC2544.Throughput", + "Parameters" : { + "TRAFFIC" : { + "traffic_type" : "rfc2544_throughput", + }, + }, + }, +] |