1 # Copyright 2017 Intel Corporation.
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', {}],
66 ['vswitch', 'del_flow', 'int_br0'],
68 STEP_VSWITCH_P2P_FINIT
71 "Name": "p2p_l3_multi_IP_mask_ovs",
72 "Deployment": "clean",
73 "Description": "OVS: P2P L3 multistream with 1 flow for /8 net mask",
74 "vSwitch" : "OvsDpdkVhost",
87 STEP_VSWITCH_P2P_INIT +
89 ['vswitch', 'del_flow', 'int_br0'],
90 ['vswitch', 'add_flow', 'int_br0',
91 {'in_port': '#STEP[1][1]', 'dl_type': '0x800',
92 'nw_dst': '$TRAFFIC["l3"]["dstip"]/8',
93 'actions': ['output:#STEP[2][1]'], 'idle_timeout': '0' }],
94 ['trafficgen', 'send_traffic', {}],
95 ['vswitch', 'dump_flows', 'int_br0'],
96 ['vswitch', 'del_flow', 'int_br0'],
98 STEP_VSWITCH_P2P_FINIT
101 "Name": "pvp_l3_multi_IP_mask_ovs",
102 "Deployment": "clean",
103 "Description": "OVS: PVP L3 multistream with 1 flow for /8 net mask",
104 "vSwitch" : "OvsDpdkVhost",
106 "GUEST_TESTPMD_FWD_MODE" : ['io'],
109 "stream_type" : "L3",
118 STEP_VSWITCH_PVP_INIT +
120 ['vswitch', 'del_flow', 'int_br0'],
121 ['vswitch', 'add_flow', 'int_br0',
122 {'in_port': '#STEP[1][1]', 'dl_type': '0x800',
123 'nw_dst': '$TRAFFIC["l3"]["dstip"]/8',
124 'actions': ['output:#STEP[3][1]'], 'idle_timeout': '0'}],
125 ['vswitch', 'add_flow', 'int_br0',
126 {'in_port': '#STEP[4][1]', 'dl_type': '0x800',
127 'nw_dst': '$TRAFFIC["l3"]["dstip"]/8',
128 'actions': ['output:#STEP[2][1]'], 'idle_timeout': '0'}],
130 ['trafficgen', 'send_traffic', {}],
131 ['vswitch', 'dump_flows', 'int_br0'],
133 ['vswitch', 'del_flow', 'int_br0'],
134 ] + STEP_VSWITCH_PVP_FINIT
137 "Name": "pvvp_l3_multi_IP_mask_ovs",
138 "Deployment": "clean",
139 "Description": "OVS: PVVP L3 multistream with 1 flow for /8 net mask",
140 "vSwitch" : "OvsDpdkVhost",
142 "GUEST_TESTPMD_FWD_MODE" : ['io', 'io'],
145 "stream_type" : "L3",
154 STEP_VSWITCH_PVVP_INIT +
156 ['vswitch', 'del_flow', 'int_br0'],
157 ['vswitch', 'add_flow', 'int_br0',
158 {'in_port': '#STEP[1][1]', 'dl_type': '0x800',
159 'nw_dst': '$TRAFFIC["l3"]["dstip"]/8',
160 'actions': ['output:#STEP[3][1]'], 'idle_timeout': '0'}],
161 ['vswitch', 'add_flow', 'int_br0',
162 {'in_port': '#STEP[4][1]', 'dl_type': '0x800',
163 'nw_dst': '$TRAFFIC["l3"]["dstip"]/8',
164 'actions': ['output:#STEP[5][1]'], 'idle_timeout': '0'}],
165 ['vswitch', 'add_flow', 'int_br0',
166 {'in_port': '#STEP[6][1]', 'dl_type': '0x800',
167 'nw_dst': '$TRAFFIC["l3"]["dstip"]/8',
168 'actions': ['output:#STEP[2][1]'], 'idle_timeout': '0'}],
171 ['trafficgen', 'send_traffic', {}],
172 ['vswitch', 'dump_flows', 'int_br0'],
175 ['vswitch', 'del_flow', 'int_br0'],
177 STEP_VSWITCH_PVVP_FINIT
180 "Name": "p2p_l4_multi_PORT_ovs",
181 "Deployment": "clean",
182 "Description": "OVS: P2P L4 multistream with unique flow for each IP stream",
183 "vSwitch" : "OvsDpdkVhost",
187 "stream_type" : "L3",
201 STEP_VSWITCH_P2P_INIT +
203 ['vswitch', 'del_flow', 'int_br0'],
204 ['tools', 'exec_python',
206 'cmds=open("/tmp/ovsofctl_cmds.txt","w");'
207 '[print("add nw_dst={} idle_timeout=0,dl_type=0x800,nw_proto=17,tp_src={},'
208 'in_port=1,action=output:2".format('
209 'netaddr.IPAddress(netaddr.IPAddress("$TRAFFIC["l3"]["dstip"]").value+i),'
210 '$TRAFFIC["l4"]["srcport"]),file=cmds) '
211 'for i in range($TRAFFIC["multistream"])];'
213 ['tools', 'exec_shell', "sudo $TOOLS['ovs-ofctl'] -O OpenFlow13 --bundle "
214 "add-flows int_br0 /tmp/ovsofctl_cmds.txt"],
215 ['trafficgen', 'send_traffic', {}],
216 ['vswitch', 'del_flow', 'int_br0'],
218 STEP_VSWITCH_P2P_FINIT
221 "Name": "p2p_l4_multi_PORT_mask_ovs",
222 "Deployment": "clean",
223 "Description": "OVS: P2P L4 multistream with 1 flow for /8 net and port mask",
224 "vSwitch" : "OvsDpdkVhost",
228 "stream_type" : "L3",
242 STEP_VSWITCH_P2P_INIT +
244 ['vswitch', 'del_flow', 'int_br0'],
245 ['vswitch', 'add_flow', 'int_br0',
246 {'in_port': '#STEP[1][1]', 'dl_type': '0x800',
247 'nw_proto': '17', 'nw_dst': '$TRAFFIC["l3"]["dstip"]/8',
248 'tp_src': '$TRAFFIC["l4"]["srcport"]',
249 'actions': ['output:#STEP[2][1]'], 'idle_timeout': '0'}],
250 ['trafficgen', 'send_traffic', {}],
251 ['vswitch', 'dump_flows', 'int_br0'],
252 ['vswitch', 'del_flow', 'int_br0'],
254 STEP_VSWITCH_P2P_FINIT
257 "Name": "pvp_l4_multi_PORT_mask_ovs",
258 "Deployment": "clean",
259 "Description": "OVS: PVP L4 multistream flows for /8 net and port mask",
260 "vSwitch" : "OvsDpdkVhost",
262 "GUEST_TESTPMD_FWD_MODE" : ['io'],
265 "stream_type" : "L3",
279 STEP_VSWITCH_PVP_INIT +
281 ['vswitch', 'del_flow', 'int_br0'],
282 ['vswitch', 'add_flow', 'int_br0',
283 {'in_port': '#STEP[1][1]', 'dl_type': '0x800', 'nw_proto': '17',
284 'nw_dst': '$TRAFFIC["l3"]["dstip"]/8',
285 'tp_src': '$TRAFFIC["l4"]["srcport"]',
286 'actions': ['output:#STEP[3][1]'], 'idle_timeout': '0'}],
287 ['vswitch', 'add_flow', 'int_br0',
288 {'in_port': '#STEP[4][1]', 'dl_type': '0x800', 'nw_proto': '17',
289 'nw_dst': '$TRAFFIC["l3"]["dstip"]/8',
290 'tp_src': '$TRAFFIC["l4"]["srcport"]',
291 'actions': ['output:#STEP[2][1]'], 'idle_timeout': '0'}],
293 ['trafficgen', 'send_traffic', {}],
294 ['vswitch', 'dump_flows', 'int_br0'],
296 ['vswitch', 'del_flow', 'int_br0'],
298 STEP_VSWITCH_PVP_FINIT
301 "Name": "pvvp_l4_multi_PORT_mask_ovs",
302 "Deployment": "clean",
303 "Description": "OVS: PVVP L4 multistream with flows for /8 net and port mask",
304 "vSwitch" : "OvsDpdkVhost",
306 "GUEST_TESTPMD_FWD_MODE" : ['io', 'io'],
309 "stream_type" : "L3",
323 STEP_VSWITCH_PVVP_INIT +
325 ['vswitch', 'del_flow', 'int_br0'],
326 ['vswitch', 'add_flow', 'int_br0',
327 {'in_port': '#STEP[1][1]', 'dl_type': '0x800',
328 'nw_proto': '17', 'nw_dst': '$TRAFFIC["l3"]["dstip"]/8',
329 'tp_src': '$TRAFFIC["l4"]["srcport"]',
330 'actions': ['output:#STEP[3][1]'], 'idle_timeout': '0'}],
331 ['vswitch', 'add_flow', 'int_br0',
332 {'in_port': '#STEP[4][1]', 'dl_type': '0x800', 'nw_proto': '17',
333 'nw_dst': '$TRAFFIC["l3"]["dstip"]/8',
334 'tp_src': '$TRAFFIC["l4"]["srcport"]',
335 'actions': ['output:#STEP[5][1]'], 'idle_timeout': '0'}],
336 ['vswitch', 'add_flow', 'int_br0',
337 {'in_port': '#STEP[6][1]', 'dl_type': '0x800',
338 'nw_proto': '17', 'nw_dst': '$TRAFFIC["l3"]["dstip"]/8',
339 'tp_src': '$TRAFFIC["l4"]["srcport"]',
340 'actions': ['output:#STEP[2][1]'], 'idle_timeout': '0'}],
343 ['trafficgen', 'send_traffic', {}],
344 ['vswitch', 'dump_flows', 'int_br0'],
347 ['vswitch', 'del_flow', 'int_br0'],
349 STEP_VSWITCH_PVVP_FINIT
352 "Name": "p2p_l3_multi_IP_arp_vpp",
353 "Deployment": "clean",
354 "Description": "VPP: P2P L3 multistream with unique ARP entry for each IP stream",
355 "vSwitch" : "VppDpdkVhost",
359 "stream_type" : "L3",
361 'dstmac' : '#PARAM(NICS[0]["mac"])',
371 STEP_VSWITCH_P2P_INIT +
373 ['vswitch', 'run_vppctl', ['set int ip address #STEP[1][0] 5.0.2.1/24']],
374 ['vswitch', 'run_vppctl', ['set int ip address #STEP[2][0] 6.0.0.1/8']],
375 # count option of "set ip arp" command doesn't work reliably for huge
376 # count numbers, e.g. 100K
377 # it is both more reliale and faster to load batches of sigle
378 # ARP commands, although it also fails time to time
379 # NOTE: batch load of "set ip arp count" commands with lower
380 # count values (e.g. 1000) was also less reliable than using
381 # batches of signle arp entries
382 ['tools', 'exec_python',
384 'dst_mac_value = netaddr.EUI("00:00:00:00:00:0A").value;'
385 'cmds=open("/tmp/vppctl_cmds.txt","w");'
386 '[print("set ip arp #STEP[2][0] {} {}".format('
387 'netaddr.IPAddress(netaddr.IPAddress("$TRAFFIC["l3"]["dstip"]").value+i),'
388 'netaddr.EUI(dst_mac_value+i,dialect=netaddr.mac_unix_expanded)),file=cmds) '
389 'for i in range($TRAFFIC["multistream"])];'
391 ['tools', 'exec_shell', "rm -rf /tmp/vppctl_cmds_split*; split -l 1000 "
392 "/tmp/vppctl_cmds.txt /tmp/vppctl_cmds_split"],
393 ['tools', 'exec_shell', "for a in /tmp/vppctl_cmds_split* ; do echo $a ; "
394 "sudo $TOOLS['vppctl'] exec $a ; sleep 2 ; done"],
395 ['vswitch', 'run_vppctl', ['show ip fib summary']],
396 ['trafficgen', 'send_traffic', {}],
397 ['vswitch', 'run_vppctl', ['show interfaces']],
399 STEP_VSWITCH_P2P_FINIT
402 "Name": "p2p_l3_multi_IP_mask_vpp",
403 "Deployment": "clean",
404 "Description": "VPP: P2P L3 multistream with 1 route for /8 net mask",
405 "vSwitch" : "VppDpdkVhost",
409 "stream_type" : "L3",
411 'dstmac' : '#PARAM(NICS[0]["mac"])',
421 STEP_VSWITCH_P2P_INIT +
423 ['vswitch', 'run_vppctl', ['set int ip address #STEP[1][0] 6.0.2.1/24']],
424 ['vswitch', 'run_vppctl', ['set int ip address #STEP[2][0] 6.0.3.1/24']],
425 ['vswitch', 'run_vppctl', ['set ip arp #STEP[2][0] 6.0.3.2 00:00:00:00:00:0A']],
426 ['vswitch', 'run_vppctl', ['ip route add $TRAFFIC["l3"]["dstip"]/8 via 6.0.3.2']],
427 ['vswitch', 'run_vppctl', ['show ip fib']],
428 ['trafficgen', 'send_traffic', {}],
429 ['vswitch', 'run_vppctl', ['show interfaces']],
431 STEP_VSWITCH_P2P_FINIT
434 "Name": "p2p_l3_multi_IP_routes_vpp",
435 "Deployment": "clean",
436 "Description": "VPP: P2P L3 multistream with unique route for each IP stream",
437 "vSwitch" : "VppDpdkVhost",
441 "stream_type" : "L3",
443 'dstmac' : '#PARAM(NICS[0]["mac"])',
453 STEP_VSWITCH_P2P_INIT +
455 ['vswitch', 'run_vppctl', ['set int ip address #STEP[1][0] 6.0.2.1/24']],
456 ['vswitch', 'run_vppctl', ['set int ip address #STEP[2][0] 6.0.3.1/24']],
457 ['vswitch', 'run_vppctl', ['set ip arp #STEP[2][0] 6.0.3.2 00:00:00:00:00:0A']],
458 # insertion of huge number of IP routes doesn't cause issues
459 # seen with ARP entries at p2p_l3_multi_IP_vpp testcase
460 ['vswitch', 'run_vppctl', ['ip route add count $TRAFFIC["multistream"] '
461 '$TRAFFIC["l3"]["dstip"]/32 via 6.0.3.2']],
462 ['vswitch', 'run_vppctl', ['show ip fib summary']],
463 ['trafficgen', 'send_traffic', {}],
464 ['vswitch', 'run_vppctl', ['show interfaces']],
466 STEP_VSWITCH_P2P_FINIT
469 "Name": "pvp_l3_multi_IP_mask_vpp",
470 "Deployment": "clean",
471 "Description": "VPP: PVP L3 multistream with route for /8 netmask",
472 "vSwitch" : "VppDpdkVhost",
474 "GUEST_TESTPMD_FWD_MODE" : ['io'],
477 "stream_type" : "L3",
479 'dstmac' : '#PARAM(NICS[0]["mac"])',
489 STEP_VSWITCH_PVP_INIT +
491 ['vswitch', 'run_vppctl', ['set interface mac address #STEP[4][0] 00:00:00:00:00:11']],
492 # two separate tables are used, so the same IP network can be routed
493 # via different DST IPs to reach VM and trafficgen via 2nd phy NIC
494 ['vswitch', 'run_vppctl', ['set int ip table #STEP[1][0] 6']],
495 ['vswitch', 'run_vppctl', ['set int ip table #STEP[3][0] 6']],
496 ['vswitch', 'run_vppctl', ['set int ip address #STEP[1][0] 6.0.1.1/24']],
497 ['vswitch', 'run_vppctl', ['set int ip address #STEP[3][0] 6.0.3.1/24']],
498 # route traffic to VM; Set DST MAC to MAC of 2nd (output) vhost user interface
499 # of VM, so traffic is accepted by VPP in next table
500 ['vswitch', 'run_vppctl', ['set ip arp #STEP[3][0] 6.0.3.2 00:00:00:00:00:11 fib-id 6']],
501 ['vswitch', 'run_vppctl', ['ip route add $TRAFFIC["l3"]["dstip"]/8 table 6 via 6.0.3.2']],
503 ['vswitch', 'run_vppctl', ['set int ip table #STEP[2][0] 7']],
504 ['vswitch', 'run_vppctl', ['set int ip table #STEP[4][0] 7']],
505 ['vswitch', 'run_vppctl', ['set int ip address #STEP[2][0] 6.0.2.1/24']],
506 ['vswitch', 'run_vppctl', ['set int ip address #STEP[4][0] 6.0.4.1/24']],
507 # route traffic via 2nd phy NIC to reach trafficgen
508 ['vswitch', 'run_vppctl', ['set ip arp #STEP[2][0] 6.0.2.2 00:00:00:00:00:0A fib-id 7']],
509 ['vswitch', 'run_vppctl', ['ip route add $TRAFFIC["l3"]["dstip"]/8 table 7 via 6.0.2.2']],
511 ['vswitch', 'run_vppctl', ['show ip fib']],
513 ['trafficgen', 'send_traffic', {}],
514 ['vswitch', 'run_vppctl', ['show interfaces']],
517 STEP_VSWITCH_PVP_FINIT
520 "Name": "pvvp_l3_multi_IP_mask_vpp",
521 "Deployment": "clean",
522 "Description": "VPP: PVVP L3 multistream with route for /8 netmask",
523 "vSwitch" : "VppDpdkVhost",
525 "GUEST_TESTPMD_FWD_MODE" : ['io', 'io'],
528 "stream_type" : "L3",
530 'dstmac' : '#PARAM(NICS[0]["mac"])',
540 STEP_VSWITCH_PVVP_INIT +
542 ['vswitch', 'run_vppctl', ['set interface mac address #STEP[4][0] 00:00:00:00:00:11']],
543 ['vswitch', 'run_vppctl', ['set interface mac address #STEP[6][0] 00:00:00:00:00:12']],
544 # three separate tables are used, so the same IP network can be routed
545 # via different DST IPs to reach both VMs and trafficgen via 2nd phy NIC
547 ['vswitch', 'run_vppctl', ['set int ip table #STEP[1][0] 6']],
548 ['vswitch', 'run_vppctl', ['set int ip table #STEP[3][0] 6']],
549 ['vswitch', 'run_vppctl', ['set int ip address #STEP[1][0] 6.0.1.1/24']],
550 ['vswitch', 'run_vppctl', ['set int ip address #STEP[3][0] 6.0.3.1/24']],
551 # route traffic to 1st VM; Set DST MAC to MAC of 2nd (output) vhost user interface
552 # of VM1, so traffic is accepted by VPP in next table
553 ['vswitch', 'run_vppctl', ['set ip arp #STEP[3][0] 6.0.3.2 00:00:00:00:00:11 fib-id 6']],
554 ['vswitch', 'run_vppctl', ['ip route add $TRAFFIC["l3"]["dstip"]/8 table 6 via 6.0.3.2']],
556 ['vswitch', 'run_vppctl', ['set int ip table #STEP[4][0] 7']],
557 ['vswitch', 'run_vppctl', ['set int ip table #STEP[5][0] 7']],
558 ['vswitch', 'run_vppctl', ['set int ip address #STEP[4][0] 6.0.4.1/24']],
559 ['vswitch', 'run_vppctl', ['set int ip address #STEP[5][0] 6.0.5.1/24']],
560 # route traffic to 2nd VM; Set DST MAC to MAC of 2nd (output) vhost user interfacei
561 # of VM2, so traffic is accepted by VPP in next table
562 ['vswitch', 'run_vppctl', ['set ip arp #STEP[5][0] 6.0.5.2 00:00:00:00:00:12 fib-id 7']],
563 ['vswitch', 'run_vppctl', ['ip route add $TRAFFIC["l3"]["dstip"]/8 table 7 via 6.0.5.2']],
565 ['vswitch', 'run_vppctl', ['set int ip table #STEP[2][0] 8']],
566 ['vswitch', 'run_vppctl', ['set int ip table #STEP[6][0] 8']],
567 ['vswitch', 'run_vppctl', ['set int ip address #STEP[2][0] 6.0.2.1/24']],
568 ['vswitch', 'run_vppctl', ['set int ip address #STEP[6][0] 6.0.6.1/24']],
569 # route traffic via 2nd phy NIC to reach trafficgen
570 ['vswitch', 'run_vppctl', ['set ip arp #STEP[2][0] 6.0.2.2 00:00:00:00:00:0A fib-id 8']],
571 ['vswitch', 'run_vppctl', ['ip route add $TRAFFIC["l3"]["dstip"]/8 table 8 via 6.0.2.2']],
572 ['vswitch', 'run_vppctl', ['show ip fib']],
575 ['trafficgen', 'send_traffic', {}],
576 ['vswitch', 'run_vppctl', ['show interfaces']],
580 STEP_VSWITCH_PVVP_FINIT
583 "Name": "p2p_l4_multi_PORT_arp_vpp",
584 "Deployment": "clean",
585 "Description": "VPP: P2P L4 multistream with unique ARP entry for each IP stream and port check",
586 "vSwitch" : "VppDpdkVhost",
590 "stream_type" : "L3",
592 'dstmac' : '#PARAM(NICS[0]["mac"])',
608 STEP_VSWITCH_P2P_INIT +
610 ['vswitch', 'run_vppctl', ['set int ip address #STEP[1][0] 6.0.2.1/24']],
611 ['vswitch', 'run_vppctl', ['set int ip address #STEP[2][0] 5.0.0.1/8']],
612 ['tools', 'exec_python',
614 'dst_mac_value = netaddr.EUI("00:00:00:00:00:0A").value;'
615 'cmds=open("/tmp/vppctl_cmds.txt","w");'
616 '[print("set ip arp #STEP[2][0] {} {}".format('
617 'netaddr.IPAddress(netaddr.IPAddress("$TRAFFIC["l3"]["dstip"]").value+i),'
618 'netaddr.EUI(dst_mac_value+i,dialect=netaddr.mac_unix_expanded)),file=cmds) '
619 'for i in range($TRAFFIC["multistream"])];'
621 ['vswitch', 'run_vppctl',
622 ['set ip source-and-port-range-check vrf 7 $TRAFFIC["l3"]["srcip"]/24 '
623 'port $TRAFFIC["l4"]["dstport"]']],
624 ['vswitch', 'run_vppctl',
625 ['set interface ip source-and-port-range-check #STEP[1][0] udp-out-vrf 7']],
626 ['tools', 'exec_shell', "rm -rf /tmp/vppctl_cmds_split*; split -l 1000 "
627 "/tmp/vppctl_cmds.txt /tmp/vppctl_cmds_split"],
628 ['tools', 'exec_shell', "for a in /tmp/vppctl_cmds_split* ; do echo $a ; "
629 "sudo $TOOLS['vppctl'] exec $a ; sleep 2 ; done"],
630 ['vswitch', 'run_vppctl', ['show ip fib summary']],
631 ['trafficgen', 'send_traffic', {}],
632 ['vswitch', 'run_vppctl', ['show interfaces']],
634 STEP_VSWITCH_P2P_FINIT
637 "Name": "p2p_l4_multi_PORT_mask_vpp",
638 "Deployment": "clean",
639 "Description": "VPP: P2P L4 multistream with 1 route for /8 net mask and port check",
640 "vSwitch" : "VppDpdkVhost",
644 "stream_type" : "L3",
646 'dstmac' : '#PARAM(NICS[0]["mac"])',
662 STEP_VSWITCH_P2P_INIT +
664 ['vswitch', 'run_vppctl', ['set int ip address #STEP[1][0] 6.0.2.1/24']], # STEP 3
665 ['vswitch', 'run_vppctl', ['set int ip address #STEP[2][0] 6.0.3.1/24']], # STEP 4
666 ['vswitch', 'run_vppctl', ['set ip arp #STEP[2][0] 6.0.3.2 00:00:00:00:00:0A']], # STEP 5
667 ['vswitch', 'run_vppctl', ['ip route add $TRAFFIC["l3"]["dstip"]/8 via 6.0.3.2']],
668 ['vswitch', 'run_vppctl', ['show ip fib']],
669 ['vswitch', 'run_vppctl',
670 ['set ip source-and-port-range-check vrf 7 $TRAFFIC["l3"]["srcip"]/24 '
671 'port $TRAFFIC["l4"]["dstport"]']],
672 ['vswitch', 'run_vppctl',
673 ['set interface ip source-and-port-range-check #STEP[1][0] udp-out-vrf 7']],
674 ['vswitch', 'run_vppctl', ['show ip fib']],
675 ['trafficgen', 'send_traffic', {}],
676 ['vswitch', 'run_vppctl', ['show interfaces']],
678 STEP_VSWITCH_P2P_FINIT
681 "Name": "p2p_l4_multi_PORT_routes_vpp",
682 "Deployment": "clean",
683 "Description": "VPP: P2P L4 multistream with unique route for each IP stream and port check",
684 "vSwitch" : "VppDpdkVhost",
688 "stream_type" : "L3",
690 'dstmac' : '#PARAM(NICS[0]["mac"])',
706 STEP_VSWITCH_P2P_INIT +
708 ['vswitch', 'run_vppctl', ['set int ip address #STEP[1][0] 6.0.2.1/24']],
709 ['vswitch', 'run_vppctl', ['set int ip address #STEP[2][0] 6.0.3.1/24']],
710 ['vswitch', 'run_vppctl', ['set ip arp #STEP[2][0] 6.0.3.2 00:00:00:00:00:0A']],
711 # insertion of huge number of IP routes doesn't cause issues
712 # seen with ARP entries at p2p_l3_multi_IP_vpp testcase
713 ['vswitch', 'run_vppctl',
714 ['ip route add count $TRAFFIC["multistream"] $TRAFFIC["l3"]["dstip"]/32 via 6.0.3.2']],
715 ['vswitch', 'run_vppctl',
716 ['set ip source-and-port-range-check vrf 7 $TRAFFIC["l3"]["srcip"]/24 '
717 'port $TRAFFIC["l4"]["dstport"]']],
718 ['vswitch', 'run_vppctl',
719 ['set interface ip source-and-port-range-check #STEP[1][0] udp-out-vrf 7']],
720 ['vswitch', 'run_vppctl', ['show ip fib summary']],
721 ['trafficgen', 'send_traffic', {}],
722 ['vswitch', 'run_vppctl', ['show interfaces']],
724 STEP_VSWITCH_P2P_FINIT
727 "Name": "pvp_l4_multi_PORT_mask_vpp",
728 "Deployment": "clean",
729 "Description": "VPP: PVP L4 multistream with route for /8 net and port mask",
730 "vSwitch" : "VppDpdkVhost",
732 "GUEST_TESTPMD_FWD_MODE" : ['io'],
735 "stream_type" : "L3",
737 'dstmac' : '#PARAM(NICS[0]["mac"])',
753 STEP_VSWITCH_PVP_INIT +
755 ['vswitch', 'run_vppctl', ['set int mac address #STEP[4][0] 00:00:00:00:00:11']],
756 # create table for port check
757 ['vswitch', 'run_vppctl', ['set ip source-and-port-range-check vrf 5 '
758 '$TRAFFIC["l3"]["srcip"]/24 '
759 'port $TRAFFIC["l4"]["dstport"]']],
760 # two separate tables are used, so the same IP network can be routed
761 # via different DST IPs to reach VM and trafficgen via 2nd phy NIC
762 ['vswitch', 'run_vppctl', ['set int ip table #STEP[1][0] 6']],
763 ['vswitch', 'run_vppctl', ['set int ip table #STEP[3][0] 6']],
764 ['vswitch', 'run_vppctl', ['set int ip address #STEP[1][0] 6.0.1.1/24']],
765 ['vswitch', 'run_vppctl', ['set int ip address #STEP[3][0] 6.0.3.1/24']],
767 ['vswitch', 'run_vppctl', ['set int ip source-and-port-range-check #STEP[1][0] '
769 # route traffic to VM; Set DST MAC to MAC of 2nd (output) vhost user interface
770 # of VM, so traffic is accepted by VPP in next table
771 ['vswitch', 'run_vppctl', ['set ip arp #STEP[3][0] 6.0.3.2 00:00:00:00:00:11 fib-id 6']],
772 ['vswitch', 'run_vppctl', ['ip route add $TRAFFIC["l3"]["dstip"]/8 table 6 via 6.0.3.2']],
774 ['vswitch', 'run_vppctl', ['set int ip table #STEP[2][0] 7']],
775 ['vswitch', 'run_vppctl', ['set int ip table #STEP[4][0] 7']],
776 ['vswitch', 'run_vppctl', ['set int ip address #STEP[2][0] 6.0.2.1/24']],
777 ['vswitch', 'run_vppctl', ['set int ip address #STEP[4][0] 6.0.4.1/24']],
778 # route traffic via 2nd phy NIC to reach trafficgen
779 ['vswitch', 'run_vppctl', ['set ip arp #STEP[2][0] 6.0.2.2 00:00:00:00:00:0A fib-id 7']],
780 ['vswitch', 'run_vppctl', ['ip route add $TRAFFIC["l3"]["dstip"]/8 table 7 via 6.0.2.2']],
782 ['vswitch', 'run_vppctl', ['show ip fib']],
784 ['trafficgen', 'send_traffic', {}],
785 ['vswitch', 'run_vppctl', ['show interfaces']],
788 STEP_VSWITCH_PVP_FINIT
791 "Name": "pvvp_l4_multi_PORT_mask_vpp",
792 "Deployment": "clean",
793 "Description": "VPP: PVVP L4 multistream with route for /8 net and port mask",
794 "vSwitch" : "VppDpdkVhost",
796 "GUEST_TESTPMD_FWD_MODE" : ['io', 'io'],
799 "stream_type" : "L3",
801 'dstmac' : '#PARAM(NICS[0]["mac"])',
817 STEP_VSWITCH_PVVP_INIT +
819 ['vswitch', 'run_vppctl', ['set int mac address #STEP[4][0] 00:00:00:00:00:11']],
820 ['vswitch', 'run_vppctl', ['set int mac address #STEP[6][0] 00:00:00:00:00:12']],
821 # create table for port check
822 ['vswitch', 'run_vppctl', ['set ip source-and-port-range-check vrf 5 '
823 '$TRAFFIC["l3"]["srcip"]/24 port $TRAFFIC["l4"]["dstport"]']],
824 # three separate tables are used, so the same IP network can be routed
825 # via different DST IPs to reach both VMs and trafficgen via 2nd phy NIC
827 ['vswitch', 'run_vppctl', ['set int ip table #STEP[1][0] 6']],
828 ['vswitch', 'run_vppctl', ['set int ip table #STEP[3][0] 6']],
829 ['vswitch', 'run_vppctl', ['set int ip address #STEP[1][0] 6.0.1.1/24']],
830 ['vswitch', 'run_vppctl', ['set int ip address #STEP[3][0] 6.0.3.1/24']],
832 ['vswitch', 'run_vppctl', ['set int ip source-and-port-range-check #STEP[1][0] udp-out-vrf 5']],
833 # route traffic to 1st VM; Set DST MAC to MAC of 2nd (output) vhost user interface
834 # of VM1, so traffic is accepted by VPP in next table
835 ['vswitch', 'run_vppctl', ['set ip arp #STEP[3][0] 6.0.3.2 00:00:00:00:00:11 fib-id 6']],
836 ['vswitch', 'run_vppctl', ['ip route add $TRAFFIC["l3"]["dstip"]/8 table 6 via 6.0.3.2']],
838 ['vswitch', 'run_vppctl', ['set int ip table #STEP[4][0] 7']],
839 ['vswitch', 'run_vppctl', ['set int ip table #STEP[5][0] 7']],
840 ['vswitch', 'run_vppctl', ['set int ip address #STEP[4][0] 6.0.4.1/24']],
841 ['vswitch', 'run_vppctl', ['set int ip address #STEP[5][0] 6.0.5.1/24']],
842 # route traffic to 2nd VM; Set DST MAC to MAC of 2nd (output) vhost user interfacei
843 # of VM2, so traffic is accepted by VPP in next table
844 ['vswitch', 'run_vppctl', ['set ip arp #STEP[5][0] 6.0.5.2 00:00:00:00:00:12 fib-id 7']],
845 ['vswitch', 'run_vppctl', ['ip route add $TRAFFIC["l3"]["dstip"]/8 table 7 via 6.0.5.2']],
847 ['vswitch', 'run_vppctl', ['set int ip table #STEP[2][0] 8']],
848 ['vswitch', 'run_vppctl', ['set int ip table #STEP[6][0] 8']],
849 ['vswitch', 'run_vppctl', ['set int ip address #STEP[2][0] 6.0.2.1/24']],
850 ['vswitch', 'run_vppctl', ['set int ip address #STEP[6][0] 6.0.6.1/24']],
851 # route traffic via 2nd phy NIC to reach trafficgen
852 ['vswitch', 'run_vppctl', ['set ip arp #STEP[2][0] 6.0.2.2 00:00:00:00:00:0A fib-id 8']],
853 ['vswitch', 'run_vppctl', ['ip route add $TRAFFIC["l3"]["dstip"]/8 table 8 via 6.0.2.2']],
854 ['vswitch', 'run_vppctl', ['show ip fib']],
857 ['trafficgen', 'send_traffic', {}],
858 ['vswitch', 'run_vppctl', ['show interfaces']],
862 STEP_VSWITCH_PVVP_FINIT
865 # End of L3 & L4 tests to compare OVS and VPP performance
868 # VxLAN tests to compare OVS and VPP performance
870 # Example of execution:
871 # ./vsperf --test-params "TRAFFIC={'multistream':2000,'traffic_type':'rfc2544_continuous'}" \
874 "Name": "vxlan_multi_IP_mask_ovs",
875 "Deployment": "op2p",
876 "Tunnel Type": "vxlan",
877 "Tunnel Operation": "encapsulation",
878 "Description": "OVS: VxLAN L3 multistream",
880 "TRAFFICGEN_IXNET_TCL_SCRIPT" : "ixnetrfc2544v2.tcl",
881 "TRAFFICGEN_PORT1_MAC" : '00:00:00:00:00:01',
882 "TRAFFICGEN_PORT2_MAC" : '#PARAM(NICS[0]["mac"])',
883 "TRAFFICGEN_PORT1_IP" : '9.0.0.2',
884 "TRAFFICGEN_PORT2_IP" : '10.0.0.2',
887 "stream_type" : "L3",
891 ['vswitch', 'del_flow', 'br0', {'in_port': '1'}],
892 ['vswitch', 'add_flow', 'br0',
893 {'in_port': '1', 'dl_type': '0x800', 'nw_proto': '17',
894 'nw_dst': '$TRAFFICGEN_PORT2_IP/8', 'actions': ['output:2'],
895 'idle_timeout': '0'}],
896 ['vswitch', 'dump_flows', 'br0'],
897 ['vswitch', 'dump_flows', 'br-ext'],
901 "Name": "vxlan_multi_IP_arp_vpp",
902 "Deployment": "clean",
903 "Description": "VPP: VxLAN L3 multistream with unique ARP entry for each IP stream",
904 "vSwitch" : "VppDpdkVhost",
908 "stream_type" : "L3",
910 'dstmac' : '#PARAM(NICS[0]["mac"])',
923 STEP_VSWITCH_P2P_INIT +
925 ['vswitch', 'run_vppctl',
926 ['set int ip address #STEP[1][0] 9.0.0.1/16']],
927 ['vswitch', 'run_vppctl',
928 ['set int ip address #STEP[2][0] 11.0.0.1/16']],
929 ['vswitch', 'run_vppctl',
930 ['create vxlan tunnel src 11.0.0.1 dst 11.0.0.2 vni 1']],
931 ['vswitch', 'run_vppctl',
932 ['set int state vxlan_tunnel0 up']],
933 ['vswitch', 'run_vppctl',
934 ['set int ip address vxlan_tunnel0 10.0.0.1/8']],
935 ['vswitch', 'run_vppctl',
936 ['set ip arp #STEP[2][0] 11.0.0.2 00:00:00:00:00:00']],
937 ['tools', 'exec_python',
939 'dst_mac_value = netaddr.EUI("00:00:00:00:00:0A").value;'
940 'cmds=open("/tmp/vppctl_cmds.txt","w");'
941 '[print("set ip arp vxlan_tunnel0 {} {}".format('
942 'netaddr.IPAddress(netaddr.IPAddress("$TRAFFIC["l3"]["dstip"]").value+i),'
943 'netaddr.EUI(dst_mac_value+i,dialect=netaddr.mac_unix_expanded)),file=cmds) '
944 'for i in range($TRAFFIC["multistream"])];'
946 ['tools', 'exec_shell',
947 "rm -rf /tmp/vppctl_cmds_split*;"
948 "split -l 1000 /tmp/vppctl_cmds.txt /tmp/vppctl_cmds_split"],
949 ['tools', 'exec_shell',
950 "for a in /tmp/vppctl_cmds_split* ; do "
951 "echo $a ; sudo $TOOLS['vppctl'] exec $a ; sleep 2 ; done"],
952 ['vswitch', 'run_vppctl', ['show ip fib summary']],
953 ['trafficgen', 'send_traffic', {}],
954 ['vswitch', 'run_vppctl', ['show interfaces']],
956 STEP_VSWITCH_P2P_FINIT
959 "Name": "vxlan_multi_IP_mask_vpp",
960 "Deployment": "clean",
961 "Description": "VPP: VxLAN L3 multistream with 1 route for /8 netmask",
962 "vSwitch" : "VppDpdkVhost",
966 "stream_type" : "L3",
968 'dstmac' : '#PARAM(NICS[0]["mac"])',
981 STEP_VSWITCH_P2P_INIT +
983 ['vswitch', 'run_vppctl',
984 ['set int ip address #STEP[1][0] 9.0.0.1/16']],
985 ['vswitch', 'run_vppctl',
986 ['set int ip address #STEP[2][0] 11.0.0.1/16']],
987 ['vswitch', 'run_vppctl',
988 ['create vxlan tunnel src 11.0.0.1 dst 11.0.0.2 vni 1']],
989 ['vswitch', 'run_vppctl',
990 ['set int state vxlan_tunnel0 up']],
991 ['vswitch', 'run_vppctl',
992 ['set int ip address vxlan_tunnel0 10.0.0.1/24']],
993 ['vswitch', 'run_vppctl',
994 ['set ip arp #STEP[2][0] 11.0.0.2 00:00:00:00:00:00']],
995 ['vswitch', 'run_vppctl',
996 ['set ip arp vxlan_tunnel0 10.0.0.2 00:00:00:00:00:0A']],
997 ['vswitch', 'run_vppctl', ['ip route add $TRAFFIC["l3"]["dstip"]/8 via 10.0.0.2']],
998 ['vswitch', 'run_vppctl', ['show ip fib']],
999 ['trafficgen', 'send_traffic', {}],
1000 ['vswitch', 'run_vppctl', ['show interfaces']],
1002 STEP_VSWITCH_P2P_FINIT
1005 # End of VxLAN tests to compare OVS and VPP performance