1 .. This work is licensed under a Creative Commons Attribution 4.0 International License.
2 .. http://creativecommons.org/licenses/by/4.0
3 .. (c) OPNFV, Intel Corporation, AT&T and others.
8 VSPERF includes a set of integration tests defined in conf/integration.
9 These tests can be run by specifying --integration as a parameter to vsperf.
10 Current tests in conf/integration include switch functionality and Overlay
13 Tests in the conf/integration can be used to test scaling of different switch
14 configurations by adding steps into the test case.
16 For the overlay tests VSPERF supports VXLAN, GRE and GENEVE tunneling protocols.
17 Testing of these protocols is limited to unidirectional traffic and
18 P2P (Physical to Physical scenarios).
20 NOTE: The configuration for overlay tests provided in this guide is for
21 unidirectional traffic only.
23 Executing Integration Tests
24 ---------------------------
26 To execute integration tests VSPERF is run with the integration parameter. To
27 view the current test list simply execute the following command:
29 .. code-block:: console
31 ./vsperf --integration --list
33 The standard tests included are defined inside the
34 ``conf/integration/01_testcases.conf`` file.
39 Execution of integration tests are done on a step by step work flow starting
40 with step 0 as defined inside the test case. Each step of the test increments
41 the step number by one which is indicated in the log.
43 .. code-block:: console
45 (testcases.integration) - Step 1 - 'vswitch add_switch ['int_br1']' ... OK
47 Each step in the test case is validated. If a step does not pass validation the
48 test will fail and terminate. The test will continue until a failure is detected
49 or all steps pass. A csv report file is generated after a test completes with an
55 Test profiles can include macros as part of the test step. Each step in the
56 profile may return a value such as a port name. Recall macros use #STEP to
57 indicate the recalled value inside the return structure. If the method the
58 test step calls returns a value it can be later recalled, for example:
60 .. code-block:: python
63 "Name": "vswitch_add_del_vport",
64 "Deployment": "clean",
65 "Description": "vSwitch - add and delete virtual port",
67 ['vswitch', 'add_switch', 'int_br0'], # STEP 0
68 ['vswitch', 'add_vport', 'int_br0'], # STEP 1
69 ['vswitch', 'del_port', 'int_br0', '#STEP[1][0]'], # STEP 2
70 ['vswitch', 'del_switch', 'int_br0'], # STEP 3
74 This test profile uses the the vswitch add_vport method which returns a string
75 value of the port added. This is later called by the del_port method using the
78 Also commonly used steps can be created as a separate profile.
80 .. code-block:: python
82 STEP_VSWITCH_PVP_INIT = [
83 ['vswitch', 'add_switch', 'int_br0'], # STEP 0
84 ['vswitch', 'add_phy_port', 'int_br0'], # STEP 1
85 ['vswitch', 'add_phy_port', 'int_br0'], # STEP 2
86 ['vswitch', 'add_vport', 'int_br0'], # STEP 3
87 ['vswitch', 'add_vport', 'int_br0'], # STEP 4
90 This profile can then be used inside other testcases
92 .. code-block:: python
95 "Name": "vswitch_pvp",
96 "Deployment": "clean",
97 "Description": "vSwitch - configure switch and one vnf",
98 "TestSteps": STEP_VSWITCH_PVP_INIT +
103 STEP_VSWITCH_PVP_FINIT
106 Executing Tunnel encapsulation tests
107 ------------------------------------
109 The VXLAN OVS DPDK encapsulation tests requires IPs, MAC addresses,
110 bridge names and WHITELIST_NICS for DPDK.
112 Default values are already provided. To customize for your environment, override
113 the following variables in you user_settings.py file:
115 .. code-block:: python
117 # Variables defined in conf/integration/02_vswitch.conf
118 # Tunnel endpoint for Overlay P2P deployment scenario
120 VTEP_IP1 = '192.168.0.1/24'
122 # Used as remote_ip in adding OVS tunnel port and
123 # to set ARP entry in OVS (e.g. tnl/arp/set br-ext 192.168.240.10 02:00:00:00:00:02
124 VTEP_IP2 = '192.168.240.10'
126 # Network to use when adding a route for inner frame data
127 VTEP_IP2_SUBNET = '192.168.240.0/24'
130 TUNNEL_INTEGRATION_BRIDGE = 'br0'
131 TUNNEL_EXTERNAL_BRIDGE = 'br-ext'
134 TUNNEL_EXTERNAL_BRIDGE_IP = '192.168.240.1/24'
137 TUNNEL_TYPE = 'vxlan'
139 # Variables defined conf/integration/03_traffic.conf
140 # For OP2P deployment scenario
141 TRAFFICGEN_PORT1_MAC = '02:00:00:00:00:01'
142 TRAFFICGEN_PORT2_MAC = '02:00:00:00:00:02'
143 TRAFFICGEN_PORT1_IP = '1.1.1.1'
144 TRAFFICGEN_PORT2_IP = '192.168.240.10'
146 To run VXLAN encapsulation tests:
148 .. code-block:: console
150 ./vsperf --conf-file user_settings.py --integration
151 --test-params 'tunnel_type=vxlan' overlay_p2p_tput
153 To run GRE encapsulation tests:
155 .. code-block:: console
157 ./vsperf --conf-file user_settings.py --integration
158 --test-params 'tunnel_type=gre' overlay_p2p_tput
160 To run GENEVE encapsulation tests:
162 .. code-block:: console
164 ./vsperf --conf-file user_settings.py --integration
165 --test-params 'tunnel_type=geneve' overlay_p2p_tput
167 To run OVS NATIVE tunnel tests (VXLAN/GRE/GENEVE):
169 1. Install the OVS kernel modules
174 sudo -E make modules_install
176 2. Set the following variables:
178 .. code-block:: python
180 VSWITCH = 'OvsVanilla'
181 # Specify vport_* kernel module to test.
182 VSWITCH_VANILLA_KERNEL_MODULES = ['vport_vxlan',
185 os.path.join(OVS_DIR_VANILLA,
186 'datapath/linux/openvswitch.ko')]
190 .. code-block:: console
192 ./vsperf --conf-file user_settings.py --integration
193 --test-params 'tunnel_type=vxlan' overlay_p2p_tput
196 Executing VXLAN decapsulation tests
197 ------------------------------------
199 To run VXLAN decapsulation tests:
201 1. Set the variables used in "Executing Tunnel encapsulation tests"
203 2. Set dstmac of DUT_NIC2_MAC to the MAC adddress of the 2nd NIC of your DUT
205 .. code-block:: python
207 DUT_NIC2_MAC = '<DUT NIC2 MAC>'
211 .. code-block:: console
213 ./vsperf --conf-file user_settings.py --integration overlay_p2p_decap_cont
215 If you want to use different values for your VXLAN frame, you may set:
217 .. code-block:: python
219 VXLAN_FRAME_L3 = {'proto': 'udp',
221 'srcip': TRAFFICGEN_PORT1_IP,
222 'dstip': '192.168.240.1',
224 VXLAN_FRAME_L4 = {'srcport': 4789,
227 'inner_srcmac': '01:02:03:04:05:06',
228 'inner_dstmac': '06:05:04:03:02:01',
229 'inner_srcip': '192.168.0.10',
230 'inner_dstip': '192.168.240.9',
231 'inner_proto': 'udp',
232 'inner_srcport': 3000,
233 'inner_dstport': 3001,
237 Executing GRE decapsulation tests
238 ---------------------------------
240 To run GRE decapsulation tests:
242 1. Set the variables used in "Executing Tunnel encapsulation tests"
244 2. Set dstmac of DUT_NIC2_MAC to the MAC adddress of the 2nd NIC of your DUT
246 .. code-block:: python
248 DUT_NIC2_MAC = '<DUT NIC2 MAC>'
252 .. code-block:: console
254 ./vsperf --conf-file user_settings.py --test-params 'tunnel_type=gre'
255 --integration overlay_p2p_decap_cont
258 If you want to use different values for your GRE frame, you may set:
260 .. code-block:: python
262 GRE_FRAME_L3 = {'proto': 'gre',
264 'srcip': TRAFFICGEN_PORT1_IP,
265 'dstip': '192.168.240.1',
268 GRE_FRAME_L4 = {'srcport': 0,
270 'inner_srcmac': '01:02:03:04:05:06',
271 'inner_dstmac': '06:05:04:03:02:01',
272 'inner_srcip': '192.168.0.10',
273 'inner_dstip': '192.168.240.9',
274 'inner_proto': 'udp',
275 'inner_srcport': 3000,
276 'inner_dstport': 3001,
280 Executing GENEVE decapsulation tests
281 ------------------------------------
283 IxNet 7.3X does not have native support of GENEVE protocol. The
284 template, GeneveIxNetTemplate.xml_ClearText.xml, should be imported
285 into IxNET for this testcase to work.
287 To import the template do:
289 1. Run the IxNetwork TCL Server
290 2. Click on the Traffic menu
291 3. Click on the Traffic actions and click Edit Packet Templates
292 4. On the Template editor window, click Import. Select the template
293 tools/pkt_gen/ixnet/GeneveIxNetTemplate.xml_ClearText.xml
295 5. Restart the TCL Server.
297 To run GENEVE decapsulation tests:
299 1. Set the variables used in "Executing Tunnel encapsulation tests"
301 2. Set dstmac of DUT_NIC2_MAC to the MAC adddress of the 2nd NIC of your DUT
303 .. code-block:: python
305 DUT_NIC2_MAC = '<DUT NIC2 MAC>'
309 .. code-block:: console
311 ./vsperf --conf-file user_settings.py --test-params 'tunnel_type=geneve'
312 --integration overlay_p2p_decap_cont
315 If you want to use different values for your GENEVE frame, you may set:
317 .. code-block:: python
319 GENEVE_FRAME_L3 = {'proto': 'udp',
321 'srcip': TRAFFICGEN_PORT1_IP,
322 'dstip': '192.168.240.1',
325 GENEVE_FRAME_L4 = {'srcport': 6081,
328 'inner_srcmac': '01:02:03:04:05:06',
329 'inner_dstmac': '06:05:04:03:02:01',
330 'inner_srcip': '192.168.0.10',
331 'inner_dstip': '192.168.240.9',
332 'inner_proto': 'udp',
333 'inner_srcport': 3000,
334 'inner_dstport': 3001,
338 Executing Native/Vanilla OVS VXLAN decapsulation tests
339 ------------------------------------------------------
341 To run VXLAN decapsulation tests:
343 1. Set the following variables in your user_settings.py file:
345 .. code-block:: python
347 VSWITCH_VANILLA_KERNEL_MODULES = ['vport_vxlan',
348 os.path.join(OVS_DIR_VANILLA,
349 'datapath/linux/openvswitch.ko')]
351 DUT_NIC1_MAC = '<DUT NIC1 MAC ADDRESS>'
353 TRAFFICGEN_PORT1_IP = '172.16.1.2'
354 TRAFFICGEN_PORT2_IP = '192.168.1.11'
356 VTEP_IP1 = '172.16.1.2/24'
357 VTEP_IP2 = '192.168.1.1'
358 VTEP_IP2_SUBNET = '192.168.1.0/24'
359 TUNNEL_EXTERNAL_BRIDGE_IP = '172.16.1.1/24'
360 TUNNEL_INT_BRIDGE_IP = '192.168.1.1'
362 VXLAN_FRAME_L2 = {'srcmac':
364 'dstmac': DUT_NIC1_MAC
367 VXLAN_FRAME_L3 = {'proto': 'udp',
369 'srcip': TRAFFICGEN_PORT1_IP,
370 'dstip': '172.16.1.1',
376 'protocolpad': 'true',
378 'inner_srcmac': '01:02:03:04:05:06',
379 'inner_dstmac': '06:05:04:03:02:01',
380 'inner_srcip': '192.168.1.2',
381 'inner_dstip': TRAFFICGEN_PORT2_IP,
382 'inner_proto': 'udp',
383 'inner_srcport': 3000,
384 'inner_dstport': 3001,
389 .. code-block:: console
391 ./vsperf --conf-file user_settings.py --integration
392 --test-params 'tunnel_type=vxlan' overlay_p2p_decap_cont
394 Executing Native/Vanilla OVS GRE decapsulation tests
395 ----------------------------------------------------
397 To run GRE decapsulation tests:
399 1. Set the following variables in your user_settings.py file:
401 .. code-block:: python
403 VSWITCH_VANILLA_KERNEL_MODULES = ['vport_gre',
404 os.path.join(OVS_DIR_VANILLA,
405 'datapath/linux/openvswitch.ko')]
407 DUT_NIC1_MAC = '<DUT NIC1 MAC ADDRESS>'
409 TRAFFICGEN_PORT1_IP = '172.16.1.2'
410 TRAFFICGEN_PORT2_IP = '192.168.1.11'
412 VTEP_IP1 = '172.16.1.2/24'
413 VTEP_IP2 = '192.168.1.1'
414 VTEP_IP2_SUBNET = '192.168.1.0/24'
415 TUNNEL_EXTERNAL_BRIDGE_IP = '172.16.1.1/24'
416 TUNNEL_INT_BRIDGE_IP = '192.168.1.1'
418 GRE_FRAME_L2 = {'srcmac':
420 'dstmac': DUT_NIC1_MAC
423 GRE_FRAME_L3 = {'proto': 'udp',
425 'srcip': TRAFFICGEN_PORT1_IP,
426 'dstip': '172.16.1.1',
432 'protocolpad': 'true',
433 'inner_srcmac': '01:02:03:04:05:06',
434 'inner_dstmac': '06:05:04:03:02:01',
435 'inner_srcip': '192.168.1.2',
436 'inner_dstip': TRAFFICGEN_PORT2_IP,
437 'inner_proto': 'udp',
438 'inner_srcport': 3000,
439 'inner_dstport': 3001,
444 .. code-block:: console
446 ./vsperf --conf-file user_settings.py --integration
447 --test-params 'tunnel_type=gre' overlay_p2p_decap_cont
449 Executing Native/Vanilla OVS GENEVE decapsulation tests
450 -------------------------------------------------------
452 To run GENEVE decapsulation tests:
454 1. Set the following variables in your user_settings.py file:
456 .. code-block:: python
458 VSWITCH_VANILLA_KERNEL_MODULES = ['vport_geneve',
459 os.path.join(OVS_DIR_VANILLA,
460 'datapath/linux/openvswitch.ko')]
462 DUT_NIC1_MAC = '<DUT NIC1 MAC ADDRESS>'
464 TRAFFICGEN_PORT1_IP = '172.16.1.2'
465 TRAFFICGEN_PORT2_IP = '192.168.1.11'
467 VTEP_IP1 = '172.16.1.2/24'
468 VTEP_IP2 = '192.168.1.1'
469 VTEP_IP2_SUBNET = '192.168.1.0/24'
470 TUNNEL_EXTERNAL_BRIDGE_IP = '172.16.1.1/24'
471 TUNNEL_INT_BRIDGE_IP = '192.168.1.1'
473 GENEVE_FRAME_L2 = {'srcmac':
475 'dstmac': DUT_NIC1_MAC
478 GENEVE_FRAME_L3 = {'proto': 'udp',
480 'srcip': TRAFFICGEN_PORT1_IP,
481 'dstip': '172.16.1.1',
484 GENEVE_FRAME_L4 = {'srcport': 6081,
486 'protocolpad': 'true',
488 'inner_srcmac': '01:02:03:04:05:06',
489 'inner_dstmac': '06:05:04:03:02:01',
490 'inner_srcip': '192.168.1.2',
491 'inner_dstip': TRAFFICGEN_PORT2_IP,
492 'inner_proto': 'udp',
493 'inner_srcport': 3000,
494 'inner_dstport': 3001,
499 .. code-block:: console
501 ./vsperf --conf-file user_settings.py --integration
502 --test-params 'tunnel_type=geneve' overlay_p2p_decap_cont