1 # Copyright 2017-2018 Intel Corporation and Tieto.
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
7 # http://www.apache.org/licenses/LICENSE-2.0
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
16 # This file introduces a series of scalability testcases prepared for OVS
17 # and VPP. Tests are unidirectional and they are focused on L3, L4 and VxLAN
18 # switching performance.
19 # Following test types are available:
20 # 1) unique rule for each IP stream (OVS only)
21 # 2) one rule for /8 netmask covering all streams
22 # 3) unique ARP entry for each IP stream (VPP only)
23 # 4) unique IP route for each IP stream (VPP only)
26 INTEGRATION_TESTS = INTEGRATION_TESTS + [
28 # L3 & L4 tests to compare OVS and VPP performance
30 # Example of execution:
31 # ./vsperf --test-params "TRAFFIC={'multistream':2000,'traffic_type':'rfc2544_continuous'}" \
32 # p2p_l3_multi_IP_ovs_mask p2p_l4_multi_PORT_ovs_mask
34 # ./vsperf --test-params "TRAFFIC={'multistream':8000,'traffic_type':'rfc2544_throughput'}" \
35 # p2p_l3_multi_IP_vpp p2p_l4_multi_PORT_vpp
37 "Name": "p2p_l3_multi_IP_ovs",
38 "Deployment": "clean",
39 "Description": "OVS: P2P L3 multistream with unique flow for each IP stream",
40 "vSwitch" : "OvsDpdkVhost",
53 STEP_VSWITCH_P2P_INIT +
55 ['vswitch', 'del_flow', 'int_br0'],
56 ['tools', 'exec_python',
58 'cmds=open("/tmp/ovsofctl_cmds.txt","w");'
59 '[print("add nw_dst={} idle_timeout=0,dl_type=0x800,'
60 'in_port=1,action=output:2".format('
61 'netaddr.IPAddress(netaddr.IPAddress("$TRAFFIC["l3"]["dstip"]").value+i)),file=cmds) '
62 'for i in range($TRAFFIC["multistream"])];'
64 ['tools', 'exec_shell', "sudo $TOOLS['ovs-ofctl'] -O OpenFlow13 --bundle add-flows int_br0 /tmp/ovsofctl_cmds.txt"],
65 ['trafficgen', 'send_traffic', {}],
67 STEP_VSWITCH_P2P_FINIT
70 "Name": "p2p_l3_multi_IP_mask_ovs",
71 "Deployment": "clean",
72 "Description": "OVS: P2P L3 multistream with 1 flow for /8 net mask",
73 "vSwitch" : "OvsDpdkVhost",
86 STEP_VSWITCH_P2P_INIT +
88 ['vswitch', 'del_flow', 'int_br0'],
89 ['vswitch', 'add_flow', 'int_br0',
90 {'in_port': '#STEP[1][1]', 'dl_type': '0x800',
91 'nw_dst': '$TRAFFIC["l3"]["dstip"]/8',
92 'actions': ['output:#STEP[2][1]'], 'idle_timeout': '0' }],
93 ['trafficgen', 'send_traffic', {}],
94 ['vswitch', 'dump_flows', 'int_br0'],
96 STEP_VSWITCH_P2P_FINIT
99 "Name": "pvp_l3_multi_IP_mask_ovs",
100 "Deployment": "clean",
101 "Description": "OVS: PVP L3 multistream with 1 flow for /8 net mask",
102 "vSwitch" : "OvsDpdkVhost",
104 "GUEST_TESTPMD_FWD_MODE" : ['io'],
107 "stream_type" : "L3",
116 STEP_VSWITCH_PVP_INIT +
118 ['vswitch', 'del_flow', 'int_br0'],
119 ['vswitch', 'add_flow', 'int_br0',
120 {'in_port': '#STEP[1][1]', 'dl_type': '0x800',
121 'nw_dst': '$TRAFFIC["l3"]["dstip"]/8',
122 'actions': ['output:#STEP[3][1]'], 'idle_timeout': '0'}],
123 ['vswitch', 'add_flow', 'int_br0',
124 {'in_port': '#STEP[4][1]', 'dl_type': '0x800',
125 'nw_dst': '$TRAFFIC["l3"]["dstip"]/8',
126 'actions': ['output:#STEP[2][1]'], 'idle_timeout': '0'}],
128 ['trafficgen', 'send_traffic', {}],
129 ['vswitch', 'dump_flows', 'int_br0'],
131 ] + STEP_VSWITCH_PVP_FINIT
134 "Name": "pvvp_l3_multi_IP_mask_ovs",
135 "Deployment": "clean",
136 "Description": "OVS: PVVP L3 multistream with 1 flow for /8 net mask",
137 "vSwitch" : "OvsDpdkVhost",
139 "GUEST_TESTPMD_FWD_MODE" : ['io', 'io'],
142 "stream_type" : "L3",
151 STEP_VSWITCH_PVVP_INIT +
153 ['vswitch', 'del_flow', 'int_br0'],
154 ['vswitch', 'add_flow', 'int_br0',
155 {'in_port': '#STEP[1][1]', 'dl_type': '0x800',
156 'nw_dst': '$TRAFFIC["l3"]["dstip"]/8',
157 'actions': ['output:#STEP[3][1]'], 'idle_timeout': '0'}],
158 ['vswitch', 'add_flow', 'int_br0',
159 {'in_port': '#STEP[4][1]', 'dl_type': '0x800',
160 'nw_dst': '$TRAFFIC["l3"]["dstip"]/8',
161 'actions': ['output:#STEP[5][1]'], 'idle_timeout': '0'}],
162 ['vswitch', 'add_flow', 'int_br0',
163 {'in_port': '#STEP[6][1]', 'dl_type': '0x800',
164 'nw_dst': '$TRAFFIC["l3"]["dstip"]/8',
165 'actions': ['output:#STEP[2][1]'], 'idle_timeout': '0'}],
168 ['trafficgen', 'send_traffic', {}],
169 ['vswitch', 'dump_flows', 'int_br0'],
173 STEP_VSWITCH_PVVP_FINIT
176 "Name": "p2p_l4_multi_PORT_ovs",
177 "Deployment": "clean",
178 "Description": "OVS: P2P L4 multistream with unique flow for each IP stream",
179 "vSwitch" : "OvsDpdkVhost",
183 "stream_type" : "L3",
197 STEP_VSWITCH_P2P_INIT +
199 ['vswitch', 'del_flow', 'int_br0'],
200 ['tools', 'exec_python',
202 'cmds=open("/tmp/ovsofctl_cmds.txt","w");'
203 '[print("add nw_dst={} idle_timeout=0,dl_type=0x800,nw_proto=17,tp_src={},'
204 'in_port=1,action=output:2".format('
205 'netaddr.IPAddress(netaddr.IPAddress("$TRAFFIC["l3"]["dstip"]").value+i),'
206 '$TRAFFIC["l4"]["srcport"]),file=cmds) '
207 'for i in range($TRAFFIC["multistream"])];'
209 ['tools', 'exec_shell', "sudo $TOOLS['ovs-ofctl'] -O OpenFlow13 --bundle "
210 "add-flows int_br0 /tmp/ovsofctl_cmds.txt"],
211 ['trafficgen', 'send_traffic', {}],
213 STEP_VSWITCH_P2P_FINIT
216 "Name": "p2p_l4_multi_PORT_mask_ovs",
217 "Deployment": "clean",
218 "Description": "OVS: P2P L4 multistream with 1 flow for /8 net and port mask",
219 "vSwitch" : "OvsDpdkVhost",
223 "stream_type" : "L3",
237 STEP_VSWITCH_P2P_INIT +
239 ['vswitch', 'del_flow', 'int_br0'],
240 ['vswitch', 'add_flow', 'int_br0',
241 {'in_port': '#STEP[1][1]', 'dl_type': '0x800',
242 'nw_proto': '17', 'nw_dst': '$TRAFFIC["l3"]["dstip"]/8',
243 'tp_src': '$TRAFFIC["l4"]["srcport"]',
244 'actions': ['output:#STEP[2][1]'], 'idle_timeout': '0'}],
245 ['trafficgen', 'send_traffic', {}],
246 ['vswitch', 'dump_flows', 'int_br0'],
248 STEP_VSWITCH_P2P_FINIT
251 "Name": "pvp_l4_multi_PORT_mask_ovs",
252 "Deployment": "clean",
253 "Description": "OVS: PVP L4 multistream flows for /8 net and port mask",
254 "vSwitch" : "OvsDpdkVhost",
256 "GUEST_TESTPMD_FWD_MODE" : ['io'],
259 "stream_type" : "L3",
273 STEP_VSWITCH_PVP_INIT +
275 ['vswitch', 'del_flow', 'int_br0'],
276 ['vswitch', 'add_flow', 'int_br0',
277 {'in_port': '#STEP[1][1]', 'dl_type': '0x800', 'nw_proto': '17',
278 'nw_dst': '$TRAFFIC["l3"]["dstip"]/8',
279 'tp_src': '$TRAFFIC["l4"]["srcport"]',
280 'actions': ['output:#STEP[3][1]'], 'idle_timeout': '0'}],
281 ['vswitch', 'add_flow', 'int_br0',
282 {'in_port': '#STEP[4][1]', 'dl_type': '0x800', 'nw_proto': '17',
283 'nw_dst': '$TRAFFIC["l3"]["dstip"]/8',
284 'tp_src': '$TRAFFIC["l4"]["srcport"]',
285 'actions': ['output:#STEP[2][1]'], 'idle_timeout': '0'}],
287 ['trafficgen', 'send_traffic', {}],
288 ['vswitch', 'dump_flows', 'int_br0'],
291 STEP_VSWITCH_PVP_FINIT
294 "Name": "pvvp_l4_multi_PORT_mask_ovs",
295 "Deployment": "clean",
296 "Description": "OVS: PVVP L4 multistream with flows for /8 net and port mask",
297 "vSwitch" : "OvsDpdkVhost",
299 "GUEST_TESTPMD_FWD_MODE" : ['io', 'io'],
302 "stream_type" : "L3",
316 STEP_VSWITCH_PVVP_INIT +
318 ['vswitch', 'del_flow', 'int_br0'],
319 ['vswitch', 'add_flow', 'int_br0',
320 {'in_port': '#STEP[1][1]', 'dl_type': '0x800',
321 'nw_proto': '17', 'nw_dst': '$TRAFFIC["l3"]["dstip"]/8',
322 'tp_src': '$TRAFFIC["l4"]["srcport"]',
323 'actions': ['output:#STEP[3][1]'], 'idle_timeout': '0'}],
324 ['vswitch', 'add_flow', 'int_br0',
325 {'in_port': '#STEP[4][1]', 'dl_type': '0x800', 'nw_proto': '17',
326 'nw_dst': '$TRAFFIC["l3"]["dstip"]/8',
327 'tp_src': '$TRAFFIC["l4"]["srcport"]',
328 'actions': ['output:#STEP[5][1]'], 'idle_timeout': '0'}],
329 ['vswitch', 'add_flow', 'int_br0',
330 {'in_port': '#STEP[6][1]', 'dl_type': '0x800',
331 'nw_proto': '17', 'nw_dst': '$TRAFFIC["l3"]["dstip"]/8',
332 'tp_src': '$TRAFFIC["l4"]["srcport"]',
333 'actions': ['output:#STEP[2][1]'], 'idle_timeout': '0'}],
336 ['trafficgen', 'send_traffic', {}],
337 ['vswitch', 'dump_flows', 'int_br0'],
341 STEP_VSWITCH_PVVP_FINIT
344 "Name": "p2p_l3_multi_IP_arp_vpp",
345 "Deployment": "clean",
346 "Description": "VPP: P2P L3 multistream with unique ARP entry for each IP stream",
347 "vSwitch" : "VppDpdkVhost",
351 "stream_type" : "L3",
353 'dstmac' : '#PARAM(NICS[0]["mac"])',
363 STEP_VSWITCH_P2P_INIT +
365 ['vswitch', 'run_vppctl', ['set int ip address #STEP[1][0] 5.0.2.1/24']],
366 ['vswitch', 'run_vppctl', ['set int ip address #STEP[2][0] 6.0.0.1/8']],
367 # count option of "set ip arp" command doesn't work reliably for huge
368 # count numbers, e.g. 100K
369 # it is both more reliale and faster to load batches of sigle
370 # ARP commands, although it also fails time to time
371 # NOTE: batch load of "set ip arp count" commands with lower
372 # count values (e.g. 1000) was also less reliable than using
373 # batches of signle arp entries
374 ['tools', 'exec_python',
376 'dst_mac_value = netaddr.EUI("00:00:00:00:00:0A").value;'
377 'cmds=open("/tmp/vppctl_cmds.txt","w");'
378 '[print("set ip arp #STEP[2][0] {} {}".format('
379 'netaddr.IPAddress(netaddr.IPAddress("$TRAFFIC["l3"]["dstip"]").value+i),'
380 'netaddr.EUI(dst_mac_value+i,dialect=netaddr.mac_unix_expanded)),file=cmds) '
381 'for i in range($TRAFFIC["multistream"])];'
383 ['tools', 'exec_shell', "rm -rf /tmp/vppctl_cmds_split*; split -l 1000 "
384 "/tmp/vppctl_cmds.txt /tmp/vppctl_cmds_split"],
385 ['tools', 'exec_shell', "for a in /tmp/vppctl_cmds_split* ; do echo $a ; "
386 "sudo $TOOLS['vppctl'] exec $a ; sleep 2 ; done"],
387 ['vswitch', 'run_vppctl', ['show ip fib summary']],
388 ['trafficgen', 'send_traffic', {}],
389 ['vswitch', 'run_vppctl', ['show interfaces']],
391 STEP_VSWITCH_P2P_FINIT
394 "Name": "p2p_l3_multi_IP_mask_vpp",
395 "Deployment": "clean",
396 "Description": "VPP: P2P L3 multistream with 1 route for /8 net mask",
397 "vSwitch" : "VppDpdkVhost",
401 "stream_type" : "L3",
403 'dstmac' : '#PARAM(NICS[0]["mac"])',
413 STEP_VSWITCH_P2P_INIT +
415 ['vswitch', 'run_vppctl', ['set int ip address #STEP[1][0] 6.0.2.1/24']],
416 ['vswitch', 'run_vppctl', ['set int ip address #STEP[2][0] 6.0.3.1/24']],
417 ['vswitch', 'run_vppctl', ['set ip arp #STEP[2][0] 6.0.3.2 00:00:00:00:00:0A']],
418 ['vswitch', 'run_vppctl', ['ip route add $TRAFFIC["l3"]["dstip"]/8 via 6.0.3.2']],
419 ['vswitch', 'run_vppctl', ['show ip fib']],
420 ['trafficgen', 'send_traffic', {}],
421 ['vswitch', 'run_vppctl', ['show interfaces']],
423 STEP_VSWITCH_P2P_FINIT
426 "Name": "p2p_l3_multi_IP_routes_vpp",
427 "Deployment": "clean",
428 "Description": "VPP: P2P L3 multistream with unique route for each IP stream",
429 "vSwitch" : "VppDpdkVhost",
433 "stream_type" : "L3",
435 'dstmac' : '#PARAM(NICS[0]["mac"])',
445 STEP_VSWITCH_P2P_INIT +
447 ['vswitch', 'run_vppctl', ['set int ip address #STEP[1][0] 6.0.2.1/24']],
448 ['vswitch', 'run_vppctl', ['set int ip address #STEP[2][0] 6.0.3.1/24']],
449 ['vswitch', 'run_vppctl', ['set ip arp #STEP[2][0] 6.0.3.2 00:00:00:00:00:0A']],
450 # insertion of huge number of IP routes doesn't cause issues
451 # seen with ARP entries at p2p_l3_multi_IP_vpp testcase
452 ['vswitch', 'run_vppctl', ['ip route add count $TRAFFIC["multistream"] '
453 '$TRAFFIC["l3"]["dstip"]/32 via 6.0.3.2']],
454 ['vswitch', 'run_vppctl', ['show ip fib summary']],
455 ['trafficgen', 'send_traffic', {}],
456 ['vswitch', 'run_vppctl', ['show interfaces']],
458 STEP_VSWITCH_P2P_FINIT
461 "Name": "pvp_l3_multi_IP_mask_vpp",
462 "Deployment": "clean",
463 "Description": "VPP: PVP L3 multistream with route for /8 netmask",
464 "vSwitch" : "VppDpdkVhost",
466 "GUEST_TESTPMD_FWD_MODE" : ['io'],
469 "stream_type" : "L3",
471 'dstmac' : '#PARAM(NICS[0]["mac"])',
481 STEP_VSWITCH_PVP_INIT +
483 ['vswitch', 'run_vppctl', ['set interface mac address #STEP[4][0] 00:00:00:00:00:11']],
484 # two separate tables are used, so the same IP network can be routed
485 # via different DST IPs to reach VM and trafficgen via 2nd phy NIC
486 ['vswitch', 'run_vppctl', ['set int ip table #STEP[1][0] 6']],
487 ['vswitch', 'run_vppctl', ['set int ip table #STEP[3][0] 6']],
488 ['vswitch', 'run_vppctl', ['set int ip address #STEP[1][0] 6.0.1.1/24']],
489 ['vswitch', 'run_vppctl', ['set int ip address #STEP[3][0] 6.0.3.1/24']],
490 # route traffic to VM; Set DST MAC to MAC of 2nd (output) vhost user interface
491 # of VM, so traffic is accepted by VPP in next table
492 ['vswitch', 'run_vppctl', ['set ip arp #STEP[3][0] 6.0.3.2 00:00:00:00:00:11 fib-id 6']],
493 ['vswitch', 'run_vppctl', ['ip route add $TRAFFIC["l3"]["dstip"]/8 table 6 via 6.0.3.2']],
495 ['vswitch', 'run_vppctl', ['set int ip table #STEP[2][0] 7']],
496 ['vswitch', 'run_vppctl', ['set int ip table #STEP[4][0] 7']],
497 ['vswitch', 'run_vppctl', ['set int ip address #STEP[2][0] 6.0.2.1/24']],
498 ['vswitch', 'run_vppctl', ['set int ip address #STEP[4][0] 6.0.4.1/24']],
499 # route traffic via 2nd phy NIC to reach trafficgen
500 ['vswitch', 'run_vppctl', ['set ip arp #STEP[2][0] 6.0.2.2 00:00:00:00:00:0A fib-id 7']],
501 ['vswitch', 'run_vppctl', ['ip route add $TRAFFIC["l3"]["dstip"]/8 table 7 via 6.0.2.2']],
503 ['vswitch', 'run_vppctl', ['show ip fib']],
505 ['trafficgen', 'send_traffic', {}],
506 ['vswitch', 'run_vppctl', ['show interfaces']],
509 STEP_VSWITCH_PVP_FINIT
512 "Name": "pvvp_l3_multi_IP_mask_vpp",
513 "Deployment": "clean",
514 "Description": "VPP: PVVP L3 multistream with route for /8 netmask",
515 "vSwitch" : "VppDpdkVhost",
517 "GUEST_TESTPMD_FWD_MODE" : ['io', 'io'],
520 "stream_type" : "L3",
522 'dstmac' : '#PARAM(NICS[0]["mac"])',
532 STEP_VSWITCH_PVVP_INIT +
534 ['vswitch', 'run_vppctl', ['set interface mac address #STEP[4][0] 00:00:00:00:00:11']],
535 ['vswitch', 'run_vppctl', ['set interface mac address #STEP[6][0] 00:00:00:00:00:12']],
536 # three separate tables are used, so the same IP network can be routed
537 # via different DST IPs to reach both VMs and trafficgen via 2nd phy NIC
539 ['vswitch', 'run_vppctl', ['set int ip table #STEP[1][0] 6']],
540 ['vswitch', 'run_vppctl', ['set int ip table #STEP[3][0] 6']],
541 ['vswitch', 'run_vppctl', ['set int ip address #STEP[1][0] 6.0.1.1/24']],
542 ['vswitch', 'run_vppctl', ['set int ip address #STEP[3][0] 6.0.3.1/24']],
543 # route traffic to 1st VM; Set DST MAC to MAC of 2nd (output) vhost user interface
544 # of VM1, so traffic is accepted by VPP in next table
545 ['vswitch', 'run_vppctl', ['set ip arp #STEP[3][0] 6.0.3.2 00:00:00:00:00:11 fib-id 6']],
546 ['vswitch', 'run_vppctl', ['ip route add $TRAFFIC["l3"]["dstip"]/8 table 6 via 6.0.3.2']],
548 ['vswitch', 'run_vppctl', ['set int ip table #STEP[4][0] 7']],
549 ['vswitch', 'run_vppctl', ['set int ip table #STEP[5][0] 7']],
550 ['vswitch', 'run_vppctl', ['set int ip address #STEP[4][0] 6.0.4.1/24']],
551 ['vswitch', 'run_vppctl', ['set int ip address #STEP[5][0] 6.0.5.1/24']],
552 # route traffic to 2nd VM; Set DST MAC to MAC of 2nd (output) vhost user interfacei
553 # of VM2, so traffic is accepted by VPP in next table
554 ['vswitch', 'run_vppctl', ['set ip arp #STEP[5][0] 6.0.5.2 00:00:00:00:00:12 fib-id 7']],
555 ['vswitch', 'run_vppctl', ['ip route add $TRAFFIC["l3"]["dstip"]/8 table 7 via 6.0.5.2']],
557 ['vswitch', 'run_vppctl', ['set int ip table #STEP[2][0] 8']],
558 ['vswitch', 'run_vppctl', ['set int ip table #STEP[6][0] 8']],
559 ['vswitch', 'run_vppctl', ['set int ip address #STEP[2][0] 6.0.2.1/24']],
560 ['vswitch', 'run_vppctl', ['set int ip address #STEP[6][0] 6.0.6.1/24']],
561 # route traffic via 2nd phy NIC to reach trafficgen
562 ['vswitch', 'run_vppctl', ['set ip arp #STEP[2][0] 6.0.2.2 00:00:00:00:00:0A fib-id 8']],
563 ['vswitch', 'run_vppctl', ['ip route add $TRAFFIC["l3"]["dstip"]/8 table 8 via 6.0.2.2']],
564 ['vswitch', 'run_vppctl', ['show ip fib']],
567 ['trafficgen', 'send_traffic', {}],
568 ['vswitch', 'run_vppctl', ['show interfaces']],
572 STEP_VSWITCH_PVVP_FINIT
575 "Name": "p2p_l4_multi_PORT_arp_vpp",
576 "Deployment": "clean",
577 "Description": "VPP: P2P L4 multistream with unique ARP entry for each IP stream and port check",
578 "vSwitch" : "VppDpdkVhost",
582 "stream_type" : "L3",
584 'dstmac' : '#PARAM(NICS[0]["mac"])',
600 STEP_VSWITCH_P2P_INIT +
602 ['vswitch', 'run_vppctl', ['set int ip address #STEP[1][0] 6.0.2.1/24']],
603 ['vswitch', 'run_vppctl', ['set int ip address #STEP[2][0] 5.0.0.1/8']],
604 ['tools', 'exec_python',
606 'dst_mac_value = netaddr.EUI("00:00:00:00:00:0A").value;'
607 'cmds=open("/tmp/vppctl_cmds.txt","w");'
608 '[print("set ip arp #STEP[2][0] {} {}".format('
609 'netaddr.IPAddress(netaddr.IPAddress("$TRAFFIC["l3"]["dstip"]").value+i),'
610 'netaddr.EUI(dst_mac_value+i,dialect=netaddr.mac_unix_expanded)),file=cmds) '
611 'for i in range($TRAFFIC["multistream"])];'
613 ['vswitch', 'run_vppctl',
614 ['set ip source-and-port-range-check vrf 7 $TRAFFIC["l3"]["srcip"]/24 '
615 'port $TRAFFIC["l4"]["dstport"]']],
616 ['vswitch', 'run_vppctl',
617 ['set interface ip source-and-port-range-check #STEP[1][0] udp-out-vrf 7']],
618 ['tools', 'exec_shell', "rm -rf /tmp/vppctl_cmds_split*; split -l 1000 "
619 "/tmp/vppctl_cmds.txt /tmp/vppctl_cmds_split"],
620 ['tools', 'exec_shell', "for a in /tmp/vppctl_cmds_split* ; do echo $a ; "
621 "sudo $TOOLS['vppctl'] exec $a ; sleep 2 ; done"],
622 ['vswitch', 'run_vppctl', ['show ip fib summary']],
623 ['trafficgen', 'send_traffic', {}],
624 ['vswitch', 'run_vppctl', ['show interfaces']],
626 STEP_VSWITCH_P2P_FINIT
629 "Name": "p2p_l4_multi_PORT_mask_vpp",
630 "Deployment": "clean",
631 "Description": "VPP: P2P L4 multistream with 1 route for /8 net mask and port check",
632 "vSwitch" : "VppDpdkVhost",
636 "stream_type" : "L3",
638 'dstmac' : '#PARAM(NICS[0]["mac"])',
654 STEP_VSWITCH_P2P_INIT +
656 ['vswitch', 'run_vppctl', ['set int ip address #STEP[1][0] 6.0.2.1/24']], # STEP 3
657 ['vswitch', 'run_vppctl', ['set int ip address #STEP[2][0] 6.0.3.1/24']], # STEP 4
658 ['vswitch', 'run_vppctl', ['set ip arp #STEP[2][0] 6.0.3.2 00:00:00:00:00:0A']], # STEP 5
659 ['vswitch', 'run_vppctl', ['ip route add $TRAFFIC["l3"]["dstip"]/8 via 6.0.3.2']],
660 ['vswitch', 'run_vppctl', ['show ip fib']],
661 ['vswitch', 'run_vppctl',
662 ['set ip source-and-port-range-check vrf 7 $TRAFFIC["l3"]["srcip"]/24 '
663 'port $TRAFFIC["l4"]["dstport"]']],
664 ['vswitch', 'run_vppctl',
665 ['set interface ip source-and-port-range-check #STEP[1][0] udp-out-vrf 7']],
666 ['vswitch', 'run_vppctl', ['show ip fib']],
667 ['trafficgen', 'send_traffic', {}],
668 ['vswitch', 'run_vppctl', ['show interfaces']],
670 STEP_VSWITCH_P2P_FINIT
673 "Name": "p2p_l4_multi_PORT_routes_vpp",
674 "Deployment": "clean",
675 "Description": "VPP: P2P L4 multistream with unique route for each IP stream and port check",
676 "vSwitch" : "VppDpdkVhost",
680 "stream_type" : "L3",
682 'dstmac' : '#PARAM(NICS[0]["mac"])',
698 STEP_VSWITCH_P2P_INIT +
700 ['vswitch', 'run_vppctl', ['set int ip address #STEP[1][0] 6.0.2.1/24']],
701 ['vswitch', 'run_vppctl', ['set int ip address #STEP[2][0] 6.0.3.1/24']],
702 ['vswitch', 'run_vppctl', ['set ip arp #STEP[2][0] 6.0.3.2 00:00:00:00:00:0A']],
703 # insertion of huge number of IP routes doesn't cause issues
704 # seen with ARP entries at p2p_l3_multi_IP_vpp testcase
705 ['vswitch', 'run_vppctl',
706 ['ip route add count $TRAFFIC["multistream"] $TRAFFIC["l3"]["dstip"]/32 via 6.0.3.2']],
707 ['vswitch', 'run_vppctl',
708 ['set ip source-and-port-range-check vrf 7 $TRAFFIC["l3"]["srcip"]/24 '
709 'port $TRAFFIC["l4"]["dstport"]']],
710 ['vswitch', 'run_vppctl',
711 ['set interface ip source-and-port-range-check #STEP[1][0] udp-out-vrf 7']],
712 ['vswitch', 'run_vppctl', ['show ip fib summary']],
713 ['trafficgen', 'send_traffic', {}],
714 ['vswitch', 'run_vppctl', ['show interfaces']],
716 STEP_VSWITCH_P2P_FINIT
719 "Name": "pvp_l4_multi_PORT_mask_vpp",
720 "Deployment": "clean",
721 "Description": "VPP: PVP L4 multistream with route for /8 net and port mask",
722 "vSwitch" : "VppDpdkVhost",
724 "GUEST_TESTPMD_FWD_MODE" : ['io'],
727 "stream_type" : "L3",
729 'dstmac' : '#PARAM(NICS[0]["mac"])',
745 STEP_VSWITCH_PVP_INIT +
747 ['vswitch', 'run_vppctl', ['set int mac address #STEP[4][0] 00:00:00:00:00:11']],
748 # create table for port check
749 ['vswitch', 'run_vppctl', ['set ip source-and-port-range-check vrf 5 '
750 '$TRAFFIC["l3"]["srcip"]/24 '
751 'port $TRAFFIC["l4"]["dstport"]']],
752 # two separate tables are used, so the same IP network can be routed
753 # via different DST IPs to reach VM and trafficgen via 2nd phy NIC
754 ['vswitch', 'run_vppctl', ['set int ip table #STEP[1][0] 6']],
755 ['vswitch', 'run_vppctl', ['set int ip table #STEP[3][0] 6']],
756 ['vswitch', 'run_vppctl', ['set int ip address #STEP[1][0] 6.0.1.1/24']],
757 ['vswitch', 'run_vppctl', ['set int ip address #STEP[3][0] 6.0.3.1/24']],
759 ['vswitch', 'run_vppctl', ['set int ip source-and-port-range-check #STEP[1][0] '
761 # route traffic to VM; Set DST MAC to MAC of 2nd (output) vhost user interface
762 # of VM, so traffic is accepted by VPP in next table
763 ['vswitch', 'run_vppctl', ['set ip arp #STEP[3][0] 6.0.3.2 00:00:00:00:00:11 fib-id 6']],
764 ['vswitch', 'run_vppctl', ['ip route add $TRAFFIC["l3"]["dstip"]/8 table 6 via 6.0.3.2']],
766 ['vswitch', 'run_vppctl', ['set int ip table #STEP[2][0] 7']],
767 ['vswitch', 'run_vppctl', ['set int ip table #STEP[4][0] 7']],
768 ['vswitch', 'run_vppctl', ['set int ip address #STEP[2][0] 6.0.2.1/24']],
769 ['vswitch', 'run_vppctl', ['set int ip address #STEP[4][0] 6.0.4.1/24']],
770 # route traffic via 2nd phy NIC to reach trafficgen
771 ['vswitch', 'run_vppctl', ['set ip arp #STEP[2][0] 6.0.2.2 00:00:00:00:00:0A fib-id 7']],
772 ['vswitch', 'run_vppctl', ['ip route add $TRAFFIC["l3"]["dstip"]/8 table 7 via 6.0.2.2']],
774 ['vswitch', 'run_vppctl', ['show ip fib']],
776 ['trafficgen', 'send_traffic', {}],
777 ['vswitch', 'run_vppctl', ['show interfaces']],
780 STEP_VSWITCH_PVP_FINIT
783 "Name": "pvvp_l4_multi_PORT_mask_vpp",
784 "Deployment": "clean",
785 "Description": "VPP: PVVP L4 multistream with route for /8 net and port mask",
786 "vSwitch" : "VppDpdkVhost",
788 "GUEST_TESTPMD_FWD_MODE" : ['io', 'io'],
791 "stream_type" : "L3",
793 'dstmac' : '#PARAM(NICS[0]["mac"])',
809 STEP_VSWITCH_PVVP_INIT +
811 ['vswitch', 'run_vppctl', ['set int mac address #STEP[4][0] 00:00:00:00:00:11']],
812 ['vswitch', 'run_vppctl', ['set int mac address #STEP[6][0] 00:00:00:00:00:12']],
813 # create table for port check
814 ['vswitch', 'run_vppctl', ['set ip source-and-port-range-check vrf 5 '
815 '$TRAFFIC["l3"]["srcip"]/24 port $TRAFFIC["l4"]["dstport"]']],
816 # three separate tables are used, so the same IP network can be routed
817 # via different DST IPs to reach both VMs and trafficgen via 2nd phy NIC
819 ['vswitch', 'run_vppctl', ['set int ip table #STEP[1][0] 6']],
820 ['vswitch', 'run_vppctl', ['set int ip table #STEP[3][0] 6']],
821 ['vswitch', 'run_vppctl', ['set int ip address #STEP[1][0] 6.0.1.1/24']],
822 ['vswitch', 'run_vppctl', ['set int ip address #STEP[3][0] 6.0.3.1/24']],
824 ['vswitch', 'run_vppctl', ['set int ip source-and-port-range-check #STEP[1][0] udp-out-vrf 5']],
825 # route traffic to 1st VM; Set DST MAC to MAC of 2nd (output) vhost user interface
826 # of VM1, so traffic is accepted by VPP in next table
827 ['vswitch', 'run_vppctl', ['set ip arp #STEP[3][0] 6.0.3.2 00:00:00:00:00:11 fib-id 6']],
828 ['vswitch', 'run_vppctl', ['ip route add $TRAFFIC["l3"]["dstip"]/8 table 6 via 6.0.3.2']],
830 ['vswitch', 'run_vppctl', ['set int ip table #STEP[4][0] 7']],
831 ['vswitch', 'run_vppctl', ['set int ip table #STEP[5][0] 7']],
832 ['vswitch', 'run_vppctl', ['set int ip address #STEP[4][0] 6.0.4.1/24']],
833 ['vswitch', 'run_vppctl', ['set int ip address #STEP[5][0] 6.0.5.1/24']],
834 # route traffic to 2nd VM; Set DST MAC to MAC of 2nd (output) vhost user interfacei
835 # of VM2, so traffic is accepted by VPP in next table
836 ['vswitch', 'run_vppctl', ['set ip arp #STEP[5][0] 6.0.5.2 00:00:00:00:00:12 fib-id 7']],
837 ['vswitch', 'run_vppctl', ['ip route add $TRAFFIC["l3"]["dstip"]/8 table 7 via 6.0.5.2']],
839 ['vswitch', 'run_vppctl', ['set int ip table #STEP[2][0] 8']],
840 ['vswitch', 'run_vppctl', ['set int ip table #STEP[6][0] 8']],
841 ['vswitch', 'run_vppctl', ['set int ip address #STEP[2][0] 6.0.2.1/24']],
842 ['vswitch', 'run_vppctl', ['set int ip address #STEP[6][0] 6.0.6.1/24']],
843 # route traffic via 2nd phy NIC to reach trafficgen
844 ['vswitch', 'run_vppctl', ['set ip arp #STEP[2][0] 6.0.2.2 00:00:00:00:00:0A fib-id 8']],
845 ['vswitch', 'run_vppctl', ['ip route add $TRAFFIC["l3"]["dstip"]/8 table 8 via 6.0.2.2']],
846 ['vswitch', 'run_vppctl', ['show ip fib']],
849 ['trafficgen', 'send_traffic', {}],
850 ['vswitch', 'run_vppctl', ['show interfaces']],
854 STEP_VSWITCH_PVVP_FINIT
857 # End of L3 & L4 tests to compare OVS and VPP performance
860 # VxLAN tests to compare OVS and VPP performance
862 # Example of execution:
863 # ./vsperf --test-params "TRAFFIC={'multistream':2000,'traffic_type':'rfc2544_continuous'}" \
866 "Name": "vxlan_multi_IP_mask_ovs",
867 "Deployment": "op2p",
868 "Tunnel Type": "vxlan",
869 "Tunnel Operation": "encapsulation",
870 "Description": "OVS: VxLAN L3 multistream",
872 "TRAFFICGEN_IXNET_TCL_SCRIPT" : "ixnetrfc2544v2.tcl",
873 "TRAFFICGEN_PORT1_MAC" : '00:00:00:00:00:01',
874 "TRAFFICGEN_PORT2_MAC" : '#PARAM(NICS[0]["mac"])',
875 "TRAFFICGEN_PORT1_IP" : '9.0.0.2',
876 "TRAFFICGEN_PORT2_IP" : '10.0.0.2',
879 "stream_type" : "L3",
883 ['vswitch', 'del_flow', '$TUNNEL_INTEGRATION_BRIDGE', {'in_port': '1'}],
884 ['vswitch', 'add_flow', '$TUNNEL_INTEGRATION_BRIDGE',
885 {'in_port': '1', 'dl_type': '0x800', 'nw_proto': '17',
886 'nw_dst': '$TRAFFICGEN_PORT2_IP/8', 'actions': ['output:2'],
887 'idle_timeout': '0'}],
888 ['vswitch', 'dump_flows', '$TUNNEL_INTEGRATION_BRIDGE'],
889 ['vswitch', 'dump_flows', '$TUNNEL_EXTERNAL_BRIDGE'],
893 "Name": "vxlan_multi_IP_arp_vpp",
894 "Deployment": "clean",
895 "Description": "VPP: VxLAN L3 multistream with unique ARP entry for each IP stream",
896 "vSwitch" : "VppDpdkVhost",
900 "stream_type" : "L3",
902 'dstmac' : '#PARAM(NICS[0]["mac"])',
915 STEP_VSWITCH_P2P_INIT +
917 ['vswitch', 'run_vppctl',
918 ['set int ip address #STEP[1][0] 9.0.0.1/16']],
919 ['vswitch', 'run_vppctl',
920 ['set int ip address #STEP[2][0] 11.0.0.1/16']],
921 ['vswitch', 'run_vppctl',
922 ['create vxlan tunnel src 11.0.0.1 dst 11.0.0.2 vni 1']],
923 ['vswitch', 'run_vppctl',
924 ['set int state vxlan_tunnel0 up']],
925 ['vswitch', 'run_vppctl',
926 ['set int ip address vxlan_tunnel0 10.0.0.1/8']],
927 ['vswitch', 'run_vppctl',
928 ['set ip arp #STEP[2][0] 11.0.0.2 00:00:00:00:00:00']],
929 ['tools', 'exec_python',
931 'dst_mac_value = netaddr.EUI("00:00:00:00:00:0A").value;'
932 'cmds=open("/tmp/vppctl_cmds.txt","w");'
933 '[print("set ip arp vxlan_tunnel0 {} {}".format('
934 'netaddr.IPAddress(netaddr.IPAddress("$TRAFFIC["l3"]["dstip"]").value+i),'
935 'netaddr.EUI(dst_mac_value+i,dialect=netaddr.mac_unix_expanded)),file=cmds) '
936 'for i in range($TRAFFIC["multistream"])];'
938 ['tools', 'exec_shell',
939 "rm -rf /tmp/vppctl_cmds_split*;"
940 "split -l 1000 /tmp/vppctl_cmds.txt /tmp/vppctl_cmds_split"],
941 ['tools', 'exec_shell',
942 "for a in /tmp/vppctl_cmds_split* ; do "
943 "echo $a ; sudo $TOOLS['vppctl'] exec $a ; sleep 2 ; done"],
944 ['vswitch', 'run_vppctl', ['show ip fib summary']],
945 ['trafficgen', 'send_traffic', {}],
946 ['vswitch', 'run_vppctl', ['show interfaces']],
948 STEP_VSWITCH_P2P_FINIT
951 "Name": "vxlan_multi_IP_mask_vpp",
952 "Deployment": "clean",
953 "Description": "VPP: VxLAN L3 multistream with 1 route for /8 netmask",
954 "vSwitch" : "VppDpdkVhost",
958 "stream_type" : "L3",
960 'dstmac' : '#PARAM(NICS[0]["mac"])',
973 STEP_VSWITCH_P2P_INIT +
975 ['vswitch', 'run_vppctl',
976 ['set int ip address #STEP[1][0] 9.0.0.1/16']],
977 ['vswitch', 'run_vppctl',
978 ['set int ip address #STEP[2][0] 11.0.0.1/16']],
979 ['vswitch', 'run_vppctl',
980 ['create vxlan tunnel src 11.0.0.1 dst 11.0.0.2 vni 1']],
981 ['vswitch', 'run_vppctl',
982 ['set int state vxlan_tunnel0 up']],
983 ['vswitch', 'run_vppctl',
984 ['set int ip address vxlan_tunnel0 10.0.0.1/24']],
985 ['vswitch', 'run_vppctl',
986 ['set ip arp #STEP[2][0] 11.0.0.2 00:00:00:00:00:00']],
987 ['vswitch', 'run_vppctl',
988 ['set ip arp vxlan_tunnel0 10.0.0.2 00:00:00:00:00:0A']],
989 ['vswitch', 'run_vppctl', ['ip route add $TRAFFIC["l3"]["dstip"]/8 via 10.0.0.2']],
990 ['vswitch', 'run_vppctl', ['show ip fib']],
991 ['trafficgen', 'send_traffic', {}],
992 ['vswitch', 'run_vppctl', ['show interfaces']],
994 STEP_VSWITCH_P2P_FINIT
997 # End of VxLAN tests to compare OVS and VPP performance