From 99e50b9aa86d3bd92d23a32ff34b5f80b9b3e4da Mon Sep 17 00:00:00 2001 From: Antonio Fischetti Date: Sat, 9 Jul 2016 13:48:33 +0100 Subject: Integration Test: Multi-VM with parallel PVP connections. Implementation of 3 testcases with multi-VMs in parallel. Flows are explicitly set on UDP destination ports so that each packet is sent to a specific VM. Topology is: Phy1-VM1-Phy2, Phy1-VM2-Phy2,.. This patch requires change #16855 "ovs/ofctl: Fix validation method for complex flows." JIRA: VSPERF-326 Change-Id: I59d23354bc9c6db470a59faba13bdcd6f2beb19d Signed-off-by: Antonio Fischetti Reviewed-by: Maryam Tahhan Reviewed-by: Martin Klozik --- conf/02_vswitch.conf | 4 + conf/04_vnf.conf | 50 ++++++--- conf/integration/01_testcases.conf | 224 ++++++++++++++++++++++++++++++++++++- 3 files changed, 259 insertions(+), 19 deletions(-) diff --git a/conf/02_vswitch.conf b/conf/02_vswitch.conf index 81632d56..260fb252 100644 --- a/conf/02_vswitch.conf +++ b/conf/02_vswitch.conf @@ -62,6 +62,10 @@ VHOST_DEV_FILE = 'ovs-vhost-net' # location of vhost-user sockets VHOST_USER_SOCKS = ['/tmp/dpdkvhostuser0', '/tmp/dpdkvhostuser1', '/tmp/dpdkvhostuser2', '/tmp/dpdkvhostuser3', + '/tmp/dpdkvhostuser4', '/tmp/dpdkvhostuser5', + '/tmp/dpdkvhostuser6', '/tmp/dpdkvhostuser7', + '/tmp/dpdkvhostuser8', '/tmp/dpdkvhostuser9', + '/tmp/dpdkvhostuser10', '/tmp/dpdkvhostuser11', '/tmp/myport0', '/tmp/helloworld123', '/tmp/abcstuff0'] # ############################ diff --git a/conf/04_vnf.conf b/conf/04_vnf.conf index ff110d93..ec242662 100644 --- a/conf/04_vnf.conf +++ b/conf/04_vnf.conf @@ -25,15 +25,17 @@ VNF = 'QemuDpdkVhostUser' # directory which is shared to QEMU guests. Useful for exchanging files # between host and guest, VNF specific share will be created # For 2 VNFs you may use ['/tmp/qemu0_share', '/tmp/qemu1_share'] -GUEST_SHARE_DIR = ['/tmp/qemu0_share', '/tmp/qemu1_share'] +GUEST_SHARE_DIR = ['/tmp/qemu0_share', '/tmp/qemu1_share', \ + '/tmp/qemu2_share', '/tmp/qemu3_share', \ + '/tmp/qemu4_share', '/tmp/qemu5_share'] # location of guest disk image # For 2 VNFs you may use ['guest1.img', 'guest2.img'] -GUEST_IMAGE = ['', ''] +GUEST_IMAGE = ['', '', '', '', '', ''] # guarding timer for VM start up # For 2 VNFs you may use [180, 180] -GUEST_TIMEOUT = [180, 180] +GUEST_TIMEOUT = [180, 180, 180, 180, 180, 180] # packet forwarding mode supported by testpmd; Please see DPDK documentation # for comprehensive list of modes supported by your version. @@ -50,7 +52,9 @@ GUEST_TESTPMD_FWD_MODE = 'csum' # This configuration option can be overridden by CLI SCALAR option # guest_loopback, e.g. --test-params "guest_loopback=l2fwd" # For 2 VNFs you may use ['testpmd', 'l2fwd'] -GUEST_LOOPBACK = ['testpmd', 'testpmd'] +GUEST_LOOPBACK = ['testpmd', 'testpmd', \ + 'testpmd', 'testpmd', \ + 'testpmd', 'testpmd'] # username for guest image GUEST_USERNAME = 'root' @@ -81,25 +85,33 @@ LOG_FILE_GUEST_CMDS = 'guest-cmds.log' QEMU_BIN = os.path.join(QEMU_DIR, 'x86_64-softmmu/qemu-system-x86_64') # For 2 VNFs you may use ['eth0', 'eth2'] -GUEST_NIC1_NAME = ['eth0', 'eth0'] -GUEST_NIC2_NAME = ['eth1', 'eth1'] +GUEST_NIC1_NAME = ['eth0', 'eth0', 'eth0', 'eth0', 'eth0', 'eth0'] +GUEST_NIC2_NAME = ['eth1', 'eth1', 'eth1', 'eth1', 'eth1', 'eth1'] # For 2 VNFs you may use ['00:00:00:00:00:01', '00:00:00:00:00:03'] -GUEST_NET1_MAC = ['00:00:00:00:00:01', '00:00:00:00:00:03'] -GUEST_NET2_MAC = ['00:00:00:00:00:02', '00:00:00:00:00:04'] +GUEST_NET1_MAC = ['00:00:00:00:00:01', '00:00:00:00:00:03', \ + '00:00:00:00:00:05', '00:00:00:00:00:07', \ + '00:00:00:00:00:09', '00:00:00:00:00:0b'] +GUEST_NET2_MAC = ['00:00:00:00:00:02', '00:00:00:00:00:04', \ + '00:00:00:00:00:06', '00:00:00:00:00:08', \ + '00:00:00:00:00:0a', '00:00:00:00:00:0c'] # For 2 VNFs you may use ['00:04.0', '00:04.0'] -GUEST_NET1_PCI_ADDRESS = ['00:04.0', '00:04.0'] -GUEST_NET2_PCI_ADDRESS = ['00:05.0', '00:05.0'] +GUEST_NET1_PCI_ADDRESS = ['00:04.0', '00:04.0', \ + '00:04.0', '00:04.0', \ + '00:04.0', '00:04.0'] +GUEST_NET2_PCI_ADDRESS = ['00:05.0', '00:05.0', \ + '00:05.0', '00:05.0', \ + '00:05.0', '00:05.0'] -GUEST_MEMORY = ['4096', '4096'] +GUEST_MEMORY = ['4096', '4096', '2048', '2048', '2048', '2048'] # test-pmd requires 2 VM cores -GUEST_SMP = ['2', '2'] +GUEST_SMP = ['2', '2', '2', '2', '2', '2'] # Host cores to use to affinitize the SMP cores of a QEMU instance # For 2 VNFs you may use [(4,5), (6, 7)] -GUEST_CORE_BINDING = [(6, 7), (9, 10)] +GUEST_CORE_BINDING = [(6, 7), (9, 10), (11, 12), (13, 14), (15, 16), (17, 18)] # Queues per NIC inside guest for multi-queue configuration, requires switch # multi-queue to be enabled. Set to 0 for disabled. @@ -137,9 +149,15 @@ VANILLA_TGEN_PORT1_MAC = 'AA:BB:CC:DD:EE:FF' VANILLA_TGEN_PORT2_IP = '1.1.2.10' VANILLA_TGEN_PORT2_MAC = 'AA:BB:CC:DD:EE:F0' -VANILLA_BRIDGE_IP = ['1.1.1.5/16', '1.1.1.6/16'] +VANILLA_BRIDGE_IP = ['1.1.1.5/16', '1.1.1.6/16', \ + '1.1.1.7/16', '1.1.1.8/16', \ + '1.1.1.9/16', '1.1.1.10/16'] -VANILLA_NIC1_IP_CIDR = ['192.168.1.2/24', '192.168.1.4/24'] -VANILLA_NIC2_IP_CIDR = ['192.168.1.3/24', '192.168.1.5/24'] +VANILLA_NIC1_IP_CIDR = ['192.168.1.2/24', '192.168.1.4/24', \ + '192.168.1.6/24', '192.168.1.8/24', \ + '192.168.1.10/24', '192.168.1.12/24'] +VANILLA_NIC2_IP_CIDR = ['192.168.1.3/24', '192.168.1.5/24', \ + '192.168.1.7/24', '192.168.1.9/24', \ + '192.168.1.11/24', '192.168.1.13/24'] VNF_AFFINITIZATION_ON = True diff --git a/conf/integration/01_testcases.conf b/conf/integration/01_testcases.conf index 46312637..a67702f8 100644 --- a/conf/integration/01_testcases.conf +++ b/conf/integration/01_testcases.conf @@ -72,7 +72,7 @@ STEP_VSWITCH_PVP_INIT = [ ['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 3 vm1 ports ['vswitch', 'add_vport', 'int_br0'], # STEP 4 ] @@ -100,12 +100,12 @@ STEP_VSWITCH_PVP_FLOWS_FINIT = [ ] + STEP_VSWITCH_PVP_FINIT STEP_VSWITCH_PVVP_INIT = STEP_VSWITCH_PVP_INIT + [ - ['vswitch', 'add_vport', 'int_br0'], # STEP 5 + ['vswitch', 'add_vport', 'int_br0'], # STEP 5 vm2 ports ['vswitch', 'add_vport', 'int_br0'], # STEP 6 ] STEP_VSWITCH_PVVP_FINIT = [ - ['vswitch', 'del_port', 'int_br0', '#STEP[5][0]'], + ['vswitch', 'del_port', 'int_br0', '#STEP[5][0]'], # vm2 ports ['vswitch', 'del_port', 'int_br0', '#STEP[6][0]'], ] + STEP_VSWITCH_PVP_FINIT @@ -128,6 +128,150 @@ STEP_VSWITCH_PVVP_FLOWS_FINIT = [ ['vswitch', 'del_flow', 'int_br0', {'in_port': '#STEP[3][1]'}], ] + STEP_VSWITCH_PVVP_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 # @@ -431,6 +575,80 @@ INTEGRATION_TESTS = [ ] + STEP_VSWITCH_PVVP_FLOWS_FINIT }, + { + # Topology: 2 Parallel PVP connections + # To run a Linux bridge as a loopback in the Guest use: + # --test-params "guest_loopback=linux_bridge" --integration 2pvp_udp_dest_flows + "Name": "2pvp_udp_dest_flows", + "Description": "Continuous TC with 2 Parallel VMs, flows on UDP Dest Port", + "Deployment": "clean", + "Stream Type": "L4", + "MultiStream": 2, + "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' : 'continuous', 'bidir' : 'False'}], + ['vnf1', 'stop'], + ['vnf2', 'stop'], + # Clean up + ] + STEP_VSWITCH_FLOWS_FINIT + + STEP_VSWITCH_2PHY_2VM_FINIT + }, + { + # Topology: 4 Parallel PVP connections + # To run a Linux bridge as a loopback in the Guest use: + # --test-params "guest_loopback=linux_bridge" --integration 4pvp_udp_dest_flows + "Name": "4pvp_udp_dest_flows", + "Description": "Continuous TC with 4 Parallel VMs, flows on UDP Dest Port", + "Deployment": "clean", + "Stream Type": "L4", + "MultiStream": 4, + "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' : '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 + # To run a Linux bridge as a loopback in the Guest use: + # --test-params "guest_loopback=linux_bridge" --integration 6pvp_udp_dest_flows + "Name": "6pvp_udp_dest_flows", + "Description": "Continuous TC with 6 Parallel VMs, flows on UDP Dest Port", + "Deployment": "clean", + "Stream Type": "L4", + "MultiStream": 6, + "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' : 'continuous', 'bidir' : 'False'}], + ['vnf1', 'stop'], + ['vnf2', 'stop'], + ['vnf3', 'stop'], + ['vnf4', 'stop'], + ['vnf5', 'stop'], + ['vnf6', 'stop'], + ] + STEP_VSWITCH_FLOWS_FINIT + + STEP_VSWITCH_2PHY_6VM_FINIT + }, ] # Example of TC definition with exact vSwitch, VNF and TRAFFICGEN values. -- cgit 1.2.3-korg