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
52 Test objects and their functions
53 --------------------------------
55 Every test step can call a function of one of the supported test objects. The list
56 of supported objects and their most common functions follows:
58 * ``vswitch`` - provides functions for vSwitch configuration
60 List of supported functions:
62 * ``add_switch br_name`` - creates a new switch (bridge) with given ``br_name``
63 * ``del_switch br_name`` - deletes switch (bridge) with given ``br_name``
64 * ``add_phy_port br_name`` - adds a physical port into bridge specified by ``br_name``
65 * ``add_vport br_name`` - adds a virtual port into bridge specified by ``br_name``
66 * ``del_port br_name port_name`` - removes physical or virtual port specified by
67 ``port_name`` from bridge ``br_name``
68 * ``add_flow br_name flow`` - adds flow specified by ``flow`` dictionary into
69 the bridge ``br_name``; Content of flow dictionary will be passed to the vSwitch.
70 In case of Open vSwitch it will be passed to the ``ovs-ofctl add-flow`` command.
71 Please see Open vSwitch documentation for the list of supported flow parameters.
72 * ``del_flow br_name [flow]`` - deletes flow specified by ``flow`` dictionary from
73 bridge ``br_name``; In case that optional parameter ``flow`` is not specified
74 or set to an empty dictionary ``{}``, then all flows from bridge ``br_name``
76 * ``dump_flows br_name`` - dumps all flows from bridge specified by ``br_name``
77 * ``enable_stp br_name`` - enables Spanning Tree Protocol for bridge ``br_name``
78 * ``disable_stp br_name`` - disables Spanning Tree Protocol for bridge ``br_name``
79 * ``enable_rstp br_name`` - enables Rapid Spanning Tree Protocol for bridge ``br_name``
80 * ``disable_rstp br_name`` - disables Rapid Spanning Tree Protocol for bridge ``br_name``
84 .. code-block:: python
86 ['vswitch', 'add_switch', 'int_br0']
88 ['vswitch', 'del_switch', 'int_br0']
90 ['vswitch', 'add_phy_port', 'int_br0']
92 ['vswitch', 'del_port', 'int_br0', '#STEP[2][0]']
94 ['vswitch', 'add_flow', 'int_br0', {'in_port': '1', 'actions': ['output:2'],
95 'idle_timeout': '0'}],
97 ['vswitch', 'enable_rstp', 'int_br0']
99 * ``vnf[ID]`` - provides functions for deployment and termination of VNFs; Optional
100 alfanumerical ``ID`` is used for VNF identification in case that testcase
101 deploys multiple VNFs.
103 List of supported functions:
105 * ``start`` - starts a VNF based on VSPERF configuration
106 * ``stop`` - gracefully terminates given VNF
110 .. code-block:: python
117 * ``trafficgen`` - triggers traffic generation
119 List of supported functions:
121 * ``send_traffic traffic`` - starts a traffic based on the vsperf configuration
122 and given ``traffic`` dictionary. More details about ``traffic`` dictionary
123 and its possible values are available at `Traffic Generator Integration Guide
124 <http://artifacts.opnfv.org/vswitchperf/docs/design/trafficgen_integration_guide.html#step-5-supported-traffic-types>`__
128 .. code-block:: python
130 ['trafficgen', 'send_traffic', {'traffic_type' : 'throughput'}]
132 ['trafficgen', 'send_traffic', {'traffic_type' : 'back2back', 'bidir' : 'True'}]
134 * ``settings`` - reads or modifies VSPERF configuration
136 List of supported functions:
138 * ``getValue param`` - returns value of given ``param``
139 * ``setValue param value`` - sets value of ``param`` to given ``value``
143 .. code-block:: python
145 ['settings', 'getValue', 'TOOLS']
147 ['settings', 'setValue', 'GUEST_USERNAME', ['root']]
149 * ``namespace`` - creates or modifies network namespaces
151 List of supported functions:
153 * ``create_namespace name`` - creates new namespace with given ``name``
154 * ``delete_namespace name`` - deletes namespace specified by its ``name``
155 * ``assign_port_to_namespace port name [port_up]`` - assigns NIC specified by ``port``
156 into given namespace ``name``; If optional parameter ``port_up`` is set to ``True``,
157 then port will be brought up.
158 * ``add_ip_to_namespace_eth port name addr cidr`` - assigns an IP address ``addr``/``cidr``
159 to the NIC specified by ``port`` within namespace ``name``
160 * ``reset_port_to_root port name`` - returns given ``port`` from namespace ``name`` back
161 to the root namespace
165 .. code-block:: python
167 ['namespace', 'create_namespace', 'testns']
169 ['namespace', 'assign_port_to_namespace', 'eth0', 'testns']
171 * ``veth`` - manipulates with eth and veth devices
173 List of supported functions:
175 * ``add_veth_port port peer_port`` - adds a pair of veth ports named ``port`` and
177 * ``del_veth_port port peer_port`` - deletes a veth port pair specified by ``port``
179 * ``bring_up_eth_port eth_port [namespace]`` - brings up ``eth_port`` in (optional)
184 .. code-block:: python
186 ['veth', 'add_veth_port', 'veth', 'veth1']
188 ['veth', 'bring_up_eth_port', 'eth1']
190 * ``tools`` - provides a set of helper functions
192 List of supported functions:
194 * ``Assert condition`` - evaluates given ``condition`` and raises ``AssertionError``
195 in case that condition is not ``True``
196 * ``Eval expression`` - evaluates given expression as a python code and returns
198 * ``Exec command [regex]`` - executes a shell command and filters its output by
199 (optional) regular expression
203 .. code-block:: python
205 ['tools', 'exec', 'numactl -H', 'available: ([0-9]+)']
206 ['tools', 'assert', '#STEP[-1][0]>1']
208 * ``wait`` - is used for test case interruption. This object doesn't have
209 any functions. Once reached, vsperf will pause test execution and waits
210 for press of ``Enter key``. It can be used during testcase design
211 for debugging purposes.
215 .. code-block:: python
222 Test profiles can include macros as part of the test step. Each step in the
223 profile may return a value such as a port name. Recall macros use #STEP to
224 indicate the recalled value inside the return structure. If the method the
225 test step calls returns a value it can be later recalled, for example:
227 .. code-block:: python
230 "Name": "vswitch_add_del_vport",
231 "Deployment": "clean",
232 "Description": "vSwitch - add and delete virtual port",
234 ['vswitch', 'add_switch', 'int_br0'], # STEP 0
235 ['vswitch', 'add_vport', 'int_br0'], # STEP 1
236 ['vswitch', 'del_port', 'int_br0', '#STEP[1][0]'], # STEP 2
237 ['vswitch', 'del_switch', 'int_br0'], # STEP 3
241 This test profile uses the vswitch add_vport method which returns a string
242 value of the port added. This is later called by the del_port method using the
245 It is also possible to use negative indexes in step macros. In that case
246 ``#STEP[-1]`` will refer to the result from previous step, ``#STEP[-2]``
247 will refer to result of step called before previous step, etc. It means,
248 that you could change ``STEP 2`` from previous example to achieve the same
251 .. code-block:: python
253 ['vswitch', 'del_port', 'int_br0', '#STEP[-1][0]'], # STEP 2
255 Also commonly used steps can be created as a separate profile.
257 .. code-block:: python
259 STEP_VSWITCH_PVP_INIT = [
260 ['vswitch', 'add_switch', 'int_br0'], # STEP 0
261 ['vswitch', 'add_phy_port', 'int_br0'], # STEP 1
262 ['vswitch', 'add_phy_port', 'int_br0'], # STEP 2
263 ['vswitch', 'add_vport', 'int_br0'], # STEP 3
264 ['vswitch', 'add_vport', 'int_br0'], # STEP 4
267 This profile can then be used inside other testcases
269 .. code-block:: python
272 "Name": "vswitch_pvp",
273 "Deployment": "clean",
274 "Description": "vSwitch - configure switch and one vnf",
275 "TestSteps": STEP_VSWITCH_PVP_INIT +
280 STEP_VSWITCH_PVP_FINIT
283 HelloWorld and other basic Testcases
284 ------------------------------------
286 The following examples are for demonstration purposes.
287 You can run them by copying and pasting into the
288 conf/integration/01_testcases.conf file.
289 A command-line instruction is shown at the end of each
295 The first example is a HelloWorld testcase.
296 It simply creates a bridge with 2 physical ports, then sets up a flow to drop
297 incoming packets from the port that was instantiated at the STEP #1.
298 There's no interaction with the traffic generator.
299 Then the flow, the 2 ports and the bridge are deleted.
300 'add_phy_port' method creates a 'dpdk' type interface that will manage the
301 physical port. The string value returned is the port name that will be referred
302 by 'del_port' later on.
304 .. code-block:: python
307 "Name": "HelloWorld",
308 "Description": "My first testcase",
309 "Deployment": "clean",
311 ['vswitch', 'add_switch', 'int_br0'], # STEP 0
312 ['vswitch', 'add_phy_port', 'int_br0'], # STEP 1
313 ['vswitch', 'add_phy_port', 'int_br0'], # STEP 2
314 ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[1][1]', \
315 'actions': ['drop'], 'idle_timeout': '0'}],
316 ['vswitch', 'del_flow', 'int_br0'],
317 ['vswitch', 'del_port', 'int_br0', '#STEP[1][0]'],
318 ['vswitch', 'del_port', 'int_br0', '#STEP[2][0]'],
319 ['vswitch', 'del_switch', 'int_br0'],
324 To run HelloWorld test:
326 .. code-block:: console
328 ./vsperf --conf-file user_settings.py --integration HelloWorld
330 Specify a Flow by the IP address
331 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
333 The next example shows how to explicitly set up a flow by specifying a
334 destination IP address.
335 All packets received from the port created at STEP #1 that have a destination
336 IP address = 90.90.90.90 will be forwarded to the port created at the STEP #2.
338 .. code-block:: python
341 "Name": "p2p_rule_l3da",
342 "Description": "Phy2Phy with rule on L3 Dest Addr",
343 "Deployment": "clean",
344 "biDirectional": "False",
346 ['vswitch', 'add_switch', 'int_br0'], # STEP 0
347 ['vswitch', 'add_phy_port', 'int_br0'], # STEP 1
348 ['vswitch', 'add_phy_port', 'int_br0'], # STEP 2
349 ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[1][1]', \
350 'dl_type': '0x0800', 'nw_dst': '90.90.90.90', \
351 'actions': ['output:#STEP[2][1]'], 'idle_timeout': '0'}],
352 ['trafficgen', 'send_traffic', {'traffic_type' : 'continuous'}],
353 ['vswitch', 'dump_flows', 'int_br0'], # STEP 5
354 ['vswitch', 'del_flow', 'int_br0'], # STEP 7 == del-flows
355 ['vswitch', 'del_port', 'int_br0', '#STEP[1][0]'],
356 ['vswitch', 'del_port', 'int_br0', '#STEP[2][0]'],
357 ['vswitch', 'del_switch', 'int_br0'],
363 .. code-block:: console
365 ./vsperf --conf-file user_settings.py --integration p2p_rule_l3da
370 The next testcase uses the multistream feature.
371 The traffic generator will send packets with different UDP ports.
372 That is accomplished by using "Stream Type" and "MultiStream" keywords.
373 4 different flows are set to forward all incoming packets.
375 .. code-block:: python
378 "Name": "multistream_l4",
379 "Description": "Multistream on UDP ports",
380 "Deployment": "clean",
384 ['vswitch', 'add_switch', 'int_br0'], # STEP 0
385 ['vswitch', 'add_phy_port', 'int_br0'], # STEP 1
386 ['vswitch', 'add_phy_port', 'int_br0'], # STEP 2
388 ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[1][1]', \
389 'dl_type': '0x0800', 'nw_proto': '17', 'udp_dst': '0', \
390 'actions': ['output:#STEP[2][1]'], 'idle_timeout': '0'}],
391 ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[1][1]', \
392 'dl_type': '0x0800', 'nw_proto': '17', 'udp_dst': '1', \
393 'actions': ['output:#STEP[2][1]'], 'idle_timeout': '0'}],
394 ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[1][1]', \
395 'dl_type': '0x0800', 'nw_proto': '17', 'udp_dst': '2', \
396 'actions': ['output:#STEP[2][1]'], 'idle_timeout': '0'}],
397 ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[1][1]', \
398 'dl_type': '0x0800', 'nw_proto': '17', 'udp_dst': '3', \
399 'actions': ['output:#STEP[2][1]'], 'idle_timeout': '0'}],
400 # Send mono-dir traffic
401 ['trafficgen', 'send_traffic', {'traffic_type' : 'continuous', \
404 ['vswitch', 'del_flow', 'int_br0'],
405 ['vswitch', 'del_port', 'int_br0', '#STEP[1][0]'],
406 ['vswitch', 'del_port', 'int_br0', '#STEP[2][0]'],
407 ['vswitch', 'del_switch', 'int_br0'],
413 .. code-block:: console
415 ./vsperf --conf-file user_settings.py --integration multistream_l4
417 PVP with a VM Replacement
418 ^^^^^^^^^^^^^^^^^^^^^^^^^
420 This example launches a 1st VM in a PVP topology, then the VM is replaced
422 When VNF setup parameter in ./conf/04_vnf.conf is "QemuDpdkVhostUser"
423 'add_vport' method creates a 'dpdkvhostuser' type port to connect a VM.
425 .. code-block:: python
428 "Name": "ex_replace_vm",
429 "Description": "PVP with VM replacement",
430 "Deployment": "clean",
432 ['vswitch', 'add_switch', 'int_br0'], # STEP 0
433 ['vswitch', 'add_phy_port', 'int_br0'], # STEP 1
434 ['vswitch', 'add_phy_port', 'int_br0'], # STEP 2
435 ['vswitch', 'add_vport', 'int_br0'], # STEP 3 vm1
436 ['vswitch', 'add_vport', 'int_br0'], # STEP 4
439 ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[1][1]', \
440 'actions': ['output:#STEP[3][1]'], 'idle_timeout': '0'}],
441 ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[4][1]', \
442 'actions': ['output:#STEP[2][1]'], 'idle_timeout': '0'}],
443 ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[2][1]', \
444 'actions': ['output:#STEP[4][1]'], 'idle_timeout': '0'}],
445 ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[3][1]', \
446 'actions': ['output:#STEP[1][1]'], 'idle_timeout': '0'}],
450 # Now we want to replace VM 1 with another VM
453 ['vswitch', 'add_vport', 'int_br0'], # STEP 11 vm2
454 ['vswitch', 'add_vport', 'int_br0'], # STEP 12
455 ['vswitch', 'del_flow', 'int_br0'],
456 ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[1][1]', \
457 'actions': ['output:#STEP[11][1]'], 'idle_timeout': '0'}],
458 ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[12][1]', \
459 'actions': ['output:#STEP[2][1]'], 'idle_timeout': '0'}],
464 ['vswitch', 'dump_flows', 'int_br0'],
467 ['vswitch', 'del_flow', 'int_br0'],
468 ['vswitch', 'del_port', 'int_br0', '#STEP[1][0]'],
469 ['vswitch', 'del_port', 'int_br0', '#STEP[2][0]'],
470 ['vswitch', 'del_port', 'int_br0', '#STEP[3][0]'], # vm1
471 ['vswitch', 'del_port', 'int_br0', '#STEP[4][0]'],
472 ['vswitch', 'del_port', 'int_br0', '#STEP[11][0]'], # vm2
473 ['vswitch', 'del_port', 'int_br0', '#STEP[12][0]'],
474 ['vswitch', 'del_switch', 'int_br0'],
480 .. code-block:: console
482 ./vsperf --conf-file user_settings.py --integration ex_replace_vm
484 VM with a Linux bridge
485 ^^^^^^^^^^^^^^^^^^^^^^
487 In this example a command-line parameter allows to set up a Linux bridge into
489 That's one of the available ways to specify the guest application.
490 Packets matching the flow will be forwarded to the VM.
492 .. code-block:: python
495 "Name": "ex_pvp_rule_l3da",
496 "Description": "PVP with flow on L3 Dest Addr",
497 "Deployment": "clean",
499 ['vswitch', 'add_switch', 'int_br0'], # STEP 0
500 ['vswitch', 'add_phy_port', 'int_br0'], # STEP 1
501 ['vswitch', 'add_phy_port', 'int_br0'], # STEP 2
502 ['vswitch', 'add_vport', 'int_br0'], # STEP 3 vm1
503 ['vswitch', 'add_vport', 'int_br0'], # STEP 4
505 ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[1][1]', \
506 'dl_type': '0x0800', 'nw_dst': '90.90.90.90', \
507 'actions': ['output:#STEP[3][1]'], 'idle_timeout': '0'}],
508 # Each pkt from the VM is forwarded to the 2nd dpdk port
509 ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[4][1]', \
510 'actions': ['output:#STEP[2][1]'], 'idle_timeout': '0'}],
513 ['trafficgen', 'send_traffic', {'traffic_type' : 'continuous', \
517 ['vswitch', 'dump_flows', 'int_br0'], # STEP 10
518 ['vswitch', 'del_flow', 'int_br0'], # STEP 11
519 ['vswitch', 'del_port', 'int_br0', '#STEP[1][0]'],
520 ['vswitch', 'del_port', 'int_br0', '#STEP[2][0]'],
521 ['vswitch', 'del_port', 'int_br0', '#STEP[3][0]'], # vm1 ports
522 ['vswitch', 'del_port', 'int_br0', '#STEP[4][0]'],
523 ['vswitch', 'del_switch', 'int_br0'],
529 .. code-block:: console
531 ./vsperf --conf-file user_settings.py --test-params
532 "guest_loopback=linux_bridge" --integration ex_pvp_rule_l3da
534 Forward packets based on UDP port
535 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
537 This examples launches 2 VMs connected in parallel.
538 Incoming packets will be forwarded to one specific VM depending on the
539 destination UDP port.
541 .. code-block:: python
544 "Name": "ex_2pvp_rule_l4dp",
545 "Description": "2 PVP with flows on L4 Dest Port",
546 "Deployment": "clean",
547 "Stream Type": "L4", # loop UDP ports
550 ['vswitch', 'add_switch', 'int_br0'], # STEP 0
551 ['vswitch', 'add_phy_port', 'int_br0'], # STEP 1
552 ['vswitch', 'add_phy_port', 'int_br0'], # STEP 2
553 ['vswitch', 'add_vport', 'int_br0'], # STEP 3 vm1
554 ['vswitch', 'add_vport', 'int_br0'], # STEP 4
555 ['vswitch', 'add_vport', 'int_br0'], # STEP 5 vm2
556 ['vswitch', 'add_vport', 'int_br0'], # STEP 6
557 # Setup Flows to reply ICMPv6 and similar packets, so to
558 # avoid flooding internal port with their re-transmissions
559 ['vswitch', 'add_flow', 'int_br0', \
560 {'priority': '1', 'dl_src': '00:00:00:00:00:01', \
561 'actions': ['output:#STEP[3][1]'], 'idle_timeout': '0'}],
562 ['vswitch', 'add_flow', 'int_br0', \
563 {'priority': '1', 'dl_src': '00:00:00:00:00:02', \
564 'actions': ['output:#STEP[4][1]'], 'idle_timeout': '0'}],
565 ['vswitch', 'add_flow', 'int_br0', \
566 {'priority': '1', 'dl_src': '00:00:00:00:00:03', \
567 'actions': ['output:#STEP[5][1]'], 'idle_timeout': '0'}],
568 ['vswitch', 'add_flow', 'int_br0', \
569 {'priority': '1', 'dl_src': '00:00:00:00:00:04', \
570 'actions': ['output:#STEP[6][1]'], 'idle_timeout': '0'}],
571 # Forward UDP packets depending on dest port
572 ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[1][1]', \
573 'dl_type': '0x0800', 'nw_proto': '17', 'udp_dst': '0', \
574 'actions': ['output:#STEP[3][1]'], 'idle_timeout': '0'}],
575 ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[1][1]', \
576 'dl_type': '0x0800', 'nw_proto': '17', 'udp_dst': '1', \
577 'actions': ['output:#STEP[5][1]'], 'idle_timeout': '0'}],
578 # Send VM output to phy port #2
579 ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[4][1]', \
580 'actions': ['output:#STEP[2][1]'], 'idle_timeout': '0'}],
581 ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[6][1]', \
582 'actions': ['output:#STEP[2][1]'], 'idle_timeout': '0'}],
584 ['vnf1', 'start'], # STEP 16
585 ['vnf2', 'start'], # STEP 17
586 ['trafficgen', 'send_traffic', {'traffic_type' : 'continuous', \
590 ['vswitch', 'dump_flows', 'int_br0'],
592 ['vswitch', 'del_flow', 'int_br0'],
593 ['vswitch', 'del_port', 'int_br0', '#STEP[1][0]'],
594 ['vswitch', 'del_port', 'int_br0', '#STEP[2][0]'],
595 ['vswitch', 'del_port', 'int_br0', '#STEP[3][0]'], # vm1 ports
596 ['vswitch', 'del_port', 'int_br0', '#STEP[4][0]'],
597 ['vswitch', 'del_port', 'int_br0', '#STEP[5][0]'], # vm2 ports
598 ['vswitch', 'del_port', 'int_br0', '#STEP[6][0]'],
599 ['vswitch', 'del_switch', 'int_br0'],
605 .. code-block:: console
607 ./vsperf --conf-file user_settings.py --integration ex_2pvp_rule_l4dp
609 Executing Tunnel encapsulation tests
610 ------------------------------------
612 The VXLAN OVS DPDK encapsulation tests requires IPs, MAC addresses,
613 bridge names and WHITELIST_NICS for DPDK.
615 NOTE: Only Ixia traffic generators currently support the execution of the tunnel
616 encapsulation tests. Support for other traffic generators may come in a future
619 Default values are already provided. To customize for your environment, override
620 the following variables in you user_settings.py file:
622 .. code-block:: python
624 # Variables defined in conf/integration/02_vswitch.conf
625 # Tunnel endpoint for Overlay P2P deployment scenario
627 VTEP_IP1 = '192.168.0.1/24'
629 # Used as remote_ip in adding OVS tunnel port and
630 # to set ARP entry in OVS (e.g. tnl/arp/set br-ext 192.168.240.10 02:00:00:00:00:02
631 VTEP_IP2 = '192.168.240.10'
633 # Network to use when adding a route for inner frame data
634 VTEP_IP2_SUBNET = '192.168.240.0/24'
637 TUNNEL_INTEGRATION_BRIDGE = 'br0'
638 TUNNEL_EXTERNAL_BRIDGE = 'br-ext'
641 TUNNEL_EXTERNAL_BRIDGE_IP = '192.168.240.1/24'
644 TUNNEL_TYPE = 'vxlan'
646 # Variables defined conf/integration/03_traffic.conf
647 # For OP2P deployment scenario
648 TRAFFICGEN_PORT1_MAC = '02:00:00:00:00:01'
649 TRAFFICGEN_PORT2_MAC = '02:00:00:00:00:02'
650 TRAFFICGEN_PORT1_IP = '1.1.1.1'
651 TRAFFICGEN_PORT2_IP = '192.168.240.10'
653 To run VXLAN encapsulation tests:
655 .. code-block:: console
657 ./vsperf --conf-file user_settings.py --integration
658 --test-params 'tunnel_type=vxlan' overlay_p2p_tput
660 To run GRE encapsulation tests:
662 .. code-block:: console
664 ./vsperf --conf-file user_settings.py --integration
665 --test-params 'tunnel_type=gre' overlay_p2p_tput
667 To run GENEVE encapsulation tests:
669 .. code-block:: console
671 ./vsperf --conf-file user_settings.py --integration
672 --test-params 'tunnel_type=geneve' overlay_p2p_tput
674 To run OVS NATIVE tunnel tests (VXLAN/GRE/GENEVE):
676 1. Install the OVS kernel modules
681 sudo -E make modules_install
683 2. Set the following variables:
685 .. code-block:: python
687 VSWITCH = 'OvsVanilla'
688 # Specify vport_* kernel module to test.
689 PATHS['vswitch']['OvsVanilla']['src']['modules'] = [
693 'datapath/linux/openvswitch.ko',
696 **NOTE:** In case, that Vanilla OVS is installed from binary package, then
697 please set ``PATHS['vswitch']['OvsVanilla']['bin']['modules']`` instead.
701 .. code-block:: console
703 ./vsperf --conf-file user_settings.py --integration
704 --test-params 'tunnel_type=vxlan' overlay_p2p_tput
707 Executing VXLAN decapsulation tests
708 ------------------------------------
710 To run VXLAN decapsulation tests:
712 1. Set the variables used in "Executing Tunnel encapsulation tests"
714 2. Set dstmac of DUT_NIC2_MAC to the MAC adddress of the 2nd NIC of your DUT
716 .. code-block:: python
718 DUT_NIC2_MAC = '<DUT NIC2 MAC>'
722 .. code-block:: console
724 ./vsperf --conf-file user_settings.py --integration overlay_p2p_decap_cont
726 If you want to use different values for your VXLAN frame, you may set:
728 .. code-block:: python
730 VXLAN_FRAME_L3 = {'proto': 'udp',
732 'srcip': TRAFFICGEN_PORT1_IP,
733 'dstip': '192.168.240.1',
735 VXLAN_FRAME_L4 = {'srcport': 4789,
738 'inner_srcmac': '01:02:03:04:05:06',
739 'inner_dstmac': '06:05:04:03:02:01',
740 'inner_srcip': '192.168.0.10',
741 'inner_dstip': '192.168.240.9',
742 'inner_proto': 'udp',
743 'inner_srcport': 3000,
744 'inner_dstport': 3001,
748 Executing GRE decapsulation tests
749 ---------------------------------
751 To run GRE decapsulation tests:
753 1. Set the variables used in "Executing Tunnel encapsulation tests"
755 2. Set dstmac of DUT_NIC2_MAC to the MAC adddress of the 2nd NIC of your DUT
757 .. code-block:: python
759 DUT_NIC2_MAC = '<DUT NIC2 MAC>'
763 .. code-block:: console
765 ./vsperf --conf-file user_settings.py --test-params 'tunnel_type=gre'
766 --integration overlay_p2p_decap_cont
769 If you want to use different values for your GRE frame, you may set:
771 .. code-block:: python
773 GRE_FRAME_L3 = {'proto': 'gre',
775 'srcip': TRAFFICGEN_PORT1_IP,
776 'dstip': '192.168.240.1',
779 GRE_FRAME_L4 = {'srcport': 0,
781 'inner_srcmac': '01:02:03:04:05:06',
782 'inner_dstmac': '06:05:04:03:02:01',
783 'inner_srcip': '192.168.0.10',
784 'inner_dstip': '192.168.240.9',
785 'inner_proto': 'udp',
786 'inner_srcport': 3000,
787 'inner_dstport': 3001,
791 Executing GENEVE decapsulation tests
792 ------------------------------------
794 IxNet 7.3X does not have native support of GENEVE protocol. The
795 template, GeneveIxNetTemplate.xml_ClearText.xml, should be imported
796 into IxNET for this testcase to work.
798 To import the template do:
800 1. Run the IxNetwork TCL Server
801 2. Click on the Traffic menu
802 3. Click on the Traffic actions and click Edit Packet Templates
803 4. On the Template editor window, click Import. Select the template
804 tools/pkt_gen/ixnet/GeneveIxNetTemplate.xml_ClearText.xml
806 5. Restart the TCL Server.
808 To run GENEVE decapsulation tests:
810 1. Set the variables used in "Executing Tunnel encapsulation tests"
812 2. Set dstmac of DUT_NIC2_MAC to the MAC adddress of the 2nd NIC of your DUT
814 .. code-block:: python
816 DUT_NIC2_MAC = '<DUT NIC2 MAC>'
820 .. code-block:: console
822 ./vsperf --conf-file user_settings.py --test-params 'tunnel_type=geneve'
823 --integration overlay_p2p_decap_cont
826 If you want to use different values for your GENEVE frame, you may set:
828 .. code-block:: python
830 GENEVE_FRAME_L3 = {'proto': 'udp',
832 'srcip': TRAFFICGEN_PORT1_IP,
833 'dstip': '192.168.240.1',
836 GENEVE_FRAME_L4 = {'srcport': 6081,
839 'inner_srcmac': '01:02:03:04:05:06',
840 'inner_dstmac': '06:05:04:03:02:01',
841 'inner_srcip': '192.168.0.10',
842 'inner_dstip': '192.168.240.9',
843 'inner_proto': 'udp',
844 'inner_srcport': 3000,
845 'inner_dstport': 3001,
849 Executing Native/Vanilla OVS VXLAN decapsulation tests
850 ------------------------------------------------------
852 To run VXLAN decapsulation tests:
854 1. Set the following variables in your user_settings.py file:
856 .. code-block:: python
858 PATHS['vswitch']['OvsVanilla']['src']['modules'] = [
860 'datapath/linux/openvswitch.ko',
863 DUT_NIC1_MAC = '<DUT NIC1 MAC ADDRESS>'
865 TRAFFICGEN_PORT1_IP = '172.16.1.2'
866 TRAFFICGEN_PORT2_IP = '192.168.1.11'
868 VTEP_IP1 = '172.16.1.2/24'
869 VTEP_IP2 = '192.168.1.1'
870 VTEP_IP2_SUBNET = '192.168.1.0/24'
871 TUNNEL_EXTERNAL_BRIDGE_IP = '172.16.1.1/24'
872 TUNNEL_INT_BRIDGE_IP = '192.168.1.1'
874 VXLAN_FRAME_L2 = {'srcmac':
876 'dstmac': DUT_NIC1_MAC
879 VXLAN_FRAME_L3 = {'proto': 'udp',
881 'srcip': TRAFFICGEN_PORT1_IP,
882 'dstip': '172.16.1.1',
888 'protocolpad': 'true',
890 'inner_srcmac': '01:02:03:04:05:06',
891 'inner_dstmac': '06:05:04:03:02:01',
892 'inner_srcip': '192.168.1.2',
893 'inner_dstip': TRAFFICGEN_PORT2_IP,
894 'inner_proto': 'udp',
895 'inner_srcport': 3000,
896 'inner_dstport': 3001,
899 **NOTE:** In case, that Vanilla OVS is installed from binary package, then
900 please set ``PATHS['vswitch']['OvsVanilla']['bin']['modules']`` instead.
904 .. code-block:: console
906 ./vsperf --conf-file user_settings.py --integration
907 --test-params 'tunnel_type=vxlan' overlay_p2p_decap_cont
909 Executing Native/Vanilla OVS GRE decapsulation tests
910 ----------------------------------------------------
912 To run GRE decapsulation tests:
914 1. Set the following variables in your user_settings.py file:
916 .. code-block:: python
918 PATHS['vswitch']['OvsVanilla']['src']['modules'] = [
920 'datapath/linux/openvswitch.ko',
923 DUT_NIC1_MAC = '<DUT NIC1 MAC ADDRESS>'
925 TRAFFICGEN_PORT1_IP = '172.16.1.2'
926 TRAFFICGEN_PORT2_IP = '192.168.1.11'
928 VTEP_IP1 = '172.16.1.2/24'
929 VTEP_IP2 = '192.168.1.1'
930 VTEP_IP2_SUBNET = '192.168.1.0/24'
931 TUNNEL_EXTERNAL_BRIDGE_IP = '172.16.1.1/24'
932 TUNNEL_INT_BRIDGE_IP = '192.168.1.1'
934 GRE_FRAME_L2 = {'srcmac':
936 'dstmac': DUT_NIC1_MAC
939 GRE_FRAME_L3 = {'proto': 'udp',
941 'srcip': TRAFFICGEN_PORT1_IP,
942 'dstip': '172.16.1.1',
948 'protocolpad': 'true',
949 'inner_srcmac': '01:02:03:04:05:06',
950 'inner_dstmac': '06:05:04:03:02:01',
951 'inner_srcip': '192.168.1.2',
952 'inner_dstip': TRAFFICGEN_PORT2_IP,
953 'inner_proto': 'udp',
954 'inner_srcport': 3000,
955 'inner_dstport': 3001,
958 **NOTE:** In case, that Vanilla OVS is installed from binary package, then
959 please set ``PATHS['vswitch']['OvsVanilla']['bin']['modules']`` instead.
963 .. code-block:: console
965 ./vsperf --conf-file user_settings.py --integration
966 --test-params 'tunnel_type=gre' overlay_p2p_decap_cont
968 Executing Native/Vanilla OVS GENEVE decapsulation tests
969 -------------------------------------------------------
971 To run GENEVE decapsulation tests:
973 1. Set the following variables in your user_settings.py file:
975 .. code-block:: python
977 PATHS['vswitch']['OvsVanilla']['src']['modules'] = [
979 'datapath/linux/openvswitch.ko',
982 DUT_NIC1_MAC = '<DUT NIC1 MAC ADDRESS>'
984 TRAFFICGEN_PORT1_IP = '172.16.1.2'
985 TRAFFICGEN_PORT2_IP = '192.168.1.11'
987 VTEP_IP1 = '172.16.1.2/24'
988 VTEP_IP2 = '192.168.1.1'
989 VTEP_IP2_SUBNET = '192.168.1.0/24'
990 TUNNEL_EXTERNAL_BRIDGE_IP = '172.16.1.1/24'
991 TUNNEL_INT_BRIDGE_IP = '192.168.1.1'
993 GENEVE_FRAME_L2 = {'srcmac':
995 'dstmac': DUT_NIC1_MAC
998 GENEVE_FRAME_L3 = {'proto': 'udp',
1000 'srcip': TRAFFICGEN_PORT1_IP,
1001 'dstip': '172.16.1.1',
1004 GENEVE_FRAME_L4 = {'srcport': 6081,
1006 'protocolpad': 'true',
1008 'inner_srcmac': '01:02:03:04:05:06',
1009 'inner_dstmac': '06:05:04:03:02:01',
1010 'inner_srcip': '192.168.1.2',
1011 'inner_dstip': TRAFFICGEN_PORT2_IP,
1012 'inner_proto': 'udp',
1013 'inner_srcport': 3000,
1014 'inner_dstport': 3001,
1017 **NOTE:** In case, that Vanilla OVS is installed from binary package, then
1018 please set ``PATHS['vswitch']['OvsVanilla']['bin']['modules']`` instead.
1022 .. code-block:: console
1024 ./vsperf --conf-file user_settings.py --integration
1025 --test-params 'tunnel_type=geneve' overlay_p2p_decap_cont
1028 Executing Tunnel encapsulation+decapsulation tests
1029 --------------------------------------------------
1031 The OVS DPDK encapsulation_decapsulation tests requires IPs, MAC addresses,
1032 bridge names and WHITELIST_NICS for DPDK.
1034 The test cases can test the tunneling encap and decap without using any ingress
1035 overlay traffic as compared to above test cases. To achieve this the OVS is
1036 configured to perform encap and decap in a series on the same traffic stream as
1039 TRAFFIC-IN --> [ENCAP] --> [MOD-PKT] --> [DECAP] --> TRAFFIC-OUT
1042 Default values are already provided. To customize for your environment, override
1043 the following variables in you user_settings.py file:
1045 .. code-block:: python
1047 # Variables defined in conf/integration/02_vswitch.conf
1050 TUNNEL_EXTERNAL_BRIDGE1 = 'br-phy1'
1051 TUNNEL_EXTERNAL_BRIDGE2 = 'br-phy2'
1052 TUNNEL_MODIFY_BRIDGE1 = 'br-mod1'
1053 TUNNEL_MODIFY_BRIDGE2 = 'br-mod2'
1056 TUNNEL_MODIFY_BRIDGE_IP1 = '10.0.0.1/24'
1059 TUNNEL_MODIFY_BRIDGE_MAC1 = '00:00:10:00:00:01'
1062 TUNNEL_MODIFY_BRIDGE_IP2 = '20.0.0.1/24'
1065 TUNNEL_MODIFY_BRIDGE_MAC2 = '00:00:20:00:00:01'
1067 # vxlan|gre|geneve, Only VXLAN is supported for now.
1068 TUNNEL_TYPE = 'vxlan'
1070 To run VXLAN encapsulation+decapsulation tests:
1072 .. code-block:: console
1074 ./vsperf --conf-file user_settings.py --integration
1075 overlay_p2p_mod_tput