277
326
for i in 1 2 3 ; do
278
327
ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=30:33:33:33:33:33,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=10)'
329
OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
330
ovs-appctl -t ovs-ofctl exit
332
AT_CHECK([cat ofctl_monitor.log], [0], [dnl
333
OFPT_PACKET_IN (xid=0x0): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
334
tcp,metadata=0,in_port=0,dl_vlan=15,dl_vlan_pcp=0,dl_src=30:33:33:33:33:33,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10 tcp_csum:0
336
OFPT_PACKET_IN (xid=0x0): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
337
tcp,metadata=0,in_port=0,dl_vlan=15,dl_vlan_pcp=0,dl_src=30:33:33:33:33:33,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10 tcp_csum:0
339
OFPT_PACKET_IN (xid=0x0): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
340
tcp,metadata=0,in_port=0,dl_vlan=15,dl_vlan_pcp=0,dl_src=30:33:33:33:33:33,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10 tcp_csum:0
343
dnl Modified VLAN controller action.
344
AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
347
ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:44:41,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no)'
349
OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
350
ovs-appctl -t ovs-ofctl exit
352
AT_CHECK([cat ofctl_monitor.log], [0], [dnl
353
NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
354
tcp,metadata=0,in_port=0,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:44:41,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64 tcp_csum:0
356
NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
357
tcp,metadata=0,in_port=0,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:44:41,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64 tcp_csum:0
359
NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
360
tcp,metadata=0,in_port=0,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:44:41,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64 tcp_csum:0
363
dnl Modified MPLS controller action.
364
AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
367
ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:44:42,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no)'
369
OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
370
ovs-appctl -t ovs-ofctl exit
372
AT_CHECK([cat ofctl_monitor.log], [0], [dnl
373
NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
374
mpls,metadata=0,in_port=0,vlan_tci=0x0000,dl_src=40:44:44:44:44:42,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=64,mpls_bos=1
376
NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
377
mpls,metadata=0,in_port=0,vlan_tci=0x0000,dl_src=40:44:44:44:44:42,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=64,mpls_bos=1
379
NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
380
mpls,metadata=0,in_port=0,vlan_tci=0x0000,dl_src=40:44:44:44:44:42,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=64,mpls_bos=1
383
dnl Modified MPLS controller action.
384
AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
386
dnl in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15),eth_type(0x8847),mpls(label=100,tc=3,ttl=64,bos=1)
389
ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:44:43,dst=50:54:00:00:00:07),eth_type(0x8847),mpls(label=11,tc=3,ttl=64,bos=1)'
281
392
OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
282
393
AT_CHECK([cat ofctl_monitor.log], [0], [dnl
283
OFPT_PACKET_IN (xid=0x0): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
284
tcp,metadata=0,in_port=0,dl_vlan=15,dl_vlan_pcp=0,dl_src=30:33:33:33:33:33,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10 tcp_csum:0
286
OFPT_PACKET_IN (xid=0x0): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
287
tcp,metadata=0,in_port=0,dl_vlan=15,dl_vlan_pcp=0,dl_src=30:33:33:33:33:33,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10 tcp_csum:0
289
OFPT_PACKET_IN (xid=0x0): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
290
tcp,metadata=0,in_port=0,dl_vlan=15,dl_vlan_pcp=0,dl_src=30:33:33:33:33:33,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10 tcp_csum:0
394
NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
395
mpls,metadata=0,in_port=0,vlan_tci=0x0000,dl_src=40:44:44:44:44:43,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=64,mpls_bos=0
397
NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
398
mpls,metadata=0,in_port=0,vlan_tci=0x0000,dl_src=40:44:44:44:44:43,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=64,mpls_bos=0
400
NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
401
mpls,metadata=0,in_port=0,vlan_tci=0x0000,dl_src=40:44:44:44:44:43,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=64,mpls_bos=0
404
dnl Modified MPLS controller action.
405
AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
408
ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:44:44,dst=50:54:00:00:00:07),eth_type(0x8100),vlan(vid=99,pcp=7),encap(eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no))'
410
OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
411
ovs-appctl -t ovs-ofctl exit
413
AT_CHECK([cat ofctl_monitor.log], [0], [dnl
414
NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
415
mpls,metadata=0,in_port=0,dl_vlan=99,dl_vlan_pcp=7,dl_src=40:44:44:44:44:44,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=64,mpls_bos=1
417
NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
418
mpls,metadata=0,in_port=0,dl_vlan=99,dl_vlan_pcp=7,dl_src=40:44:44:44:44:44,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=64,mpls_bos=1
420
NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
421
mpls,metadata=0,in_port=0,dl_vlan=99,dl_vlan_pcp=7,dl_src=40:44:44:44:44:44,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=64,mpls_bos=1
424
dnl Modified MPLS controller action.
425
AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
428
ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:44:45,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no)'
430
OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
431
ovs-appctl -t ovs-ofctl exit
433
AT_CHECK([cat ofctl_monitor.log], [0], [dnl
434
NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
435
mpls,metadata=0,in_port=0,vlan_tci=0x0000,dl_src=40:44:44:44:44:45,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=63,mpls_bos=1
437
NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
438
mpls,metadata=0,in_port=0,vlan_tci=0x0000,dl_src=40:44:44:44:44:45,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=63,mpls_bos=1
440
NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
441
mpls,metadata=0,in_port=0,vlan_tci=0x0000,dl_src=40:44:44:44:44:45,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=63,mpls_bos=1
444
dnl Modified MPLS controller action.
445
AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
448
ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:44:46,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no)'
450
OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
451
ovs-appctl -t ovs-ofctl exit
453
AT_CHECK([cat ofctl_monitor.log], [0], [dnl
454
NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
455
mpls,metadata=0,in_port=0,vlan_tci=0x0000,dl_src=40:44:44:44:44:46,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=10,mpls_bos=1
457
NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
458
mpls,metadata=0,in_port=0,vlan_tci=0x0000,dl_src=40:44:44:44:44:46,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=10,mpls_bos=1
460
NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
461
mpls,metadata=0,in_port=0,vlan_tci=0x0000,dl_src=40:44:44:44:44:46,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=10,mpls_bos=1
464
dnl Modified MPLS controller action.
465
AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
468
ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:44:47,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no)'
470
OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
471
ovs-appctl -t ovs-ofctl exit
473
AT_CHECK([cat ofctl_monitor.log], [0], [dnl
474
NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
475
mpls,metadata=0,in_port=0,vlan_tci=0x0000,dl_src=40:44:44:44:44:47,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=10,mpls_bos=1
477
NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
478
mpls,metadata=0,in_port=0,vlan_tci=0x0000,dl_src=40:44:44:44:44:47,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=10,mpls_bos=1
480
NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
481
mpls,metadata=0,in_port=0,vlan_tci=0x0000,dl_src=40:44:44:44:44:47,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=10,mpls_bos=1
484
dnl Modified MPLS controller action.
485
AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
488
ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:44:48,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no)'
490
OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
491
ovs-appctl -t ovs-ofctl exit
493
AT_CHECK([cat ofctl_monitor.log], [0], [dnl
494
NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
495
mpls,metadata=0,in_port=0,vlan_tci=0x0000,dl_src=40:44:44:44:44:48,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=9,mpls_bos=1
497
NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
498
mpls,metadata=0,in_port=0,vlan_tci=0x0000,dl_src=40:44:44:44:44:48,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=9,mpls_bos=1
500
NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
501
mpls,metadata=0,in_port=0,vlan_tci=0x0000,dl_src=40:44:44:44:44:48,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=9,mpls_bos=1
504
dnl Modified MPLS actions.
505
AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
508
ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:55:55:55:55:55,dst=50:54:00:00:00:07),eth_type(0x8847),mpls(label=100,tc=7,ttl=64,bos=1)'
510
OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
511
ovs-appctl -t ovs-ofctl exit
513
AT_CHECK([cat ofctl_monitor.log], [0], [dnl
514
NXT_PACKET_IN (xid=0x0): cookie=0xb total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
515
mpls,metadata=0,in_port=0,vlan_tci=0x0000,dl_src=50:55:55:55:55:55,dl_dst=50:54:00:00:00:07,mpls_label=1000,mpls_tc=7,mpls_ttl=64,mpls_bos=1
517
NXT_PACKET_IN (xid=0x0): cookie=0xb total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
518
mpls,metadata=0,in_port=0,vlan_tci=0x0000,dl_src=50:55:55:55:55:55,dl_dst=50:54:00:00:00:07,mpls_label=1000,mpls_tc=7,mpls_ttl=64,mpls_bos=1
520
NXT_PACKET_IN (xid=0x0): cookie=0xb total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
521
mpls,metadata=0,in_port=0,vlan_tci=0x0000,dl_src=50:55:55:55:55:55,dl_dst=50:54:00:00:00:07,mpls_label=1000,mpls_tc=7,mpls_ttl=64,mpls_bos=1
524
dnl Modified MPLS ipv6 controller action.
525
AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
528
ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=70:77:77:77:77:77,dst=50:54:00:00:00:07),eth_type(0x86dd),ipv6(src=::1,dst=::2,label=0,proto=10,tclass=0x70,hlimit=128,frag=no)'
530
OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
531
ovs-appctl -t ovs-ofctl exit
533
AT_CHECK([cat ofctl_monitor.log], [0], [dnl
534
NXT_PACKET_IN (xid=0x0): cookie=0xc total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
535
mplsm,metadata=0,in_port=0,vlan_tci=0x0000,dl_src=70:77:77:77:77:77,dl_dst=50:54:00:00:00:07,mpls_label=1000,mpls_tc=7,mpls_ttl=64,mpls_bos=1
537
NXT_PACKET_IN (xid=0x0): cookie=0xc total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
538
mplsm,metadata=0,in_port=0,vlan_tci=0x0000,dl_src=70:77:77:77:77:77,dl_dst=50:54:00:00:00:07,mpls_label=1000,mpls_tc=7,mpls_ttl=64,mpls_bos=1
540
NXT_PACKET_IN (xid=0x0): cookie=0xc total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
541
mplsm,metadata=0,in_port=0,vlan_tci=0x0000,dl_src=70:77:77:77:77:77,dl_dst=50:54:00:00:00:07,mpls_label=1000,mpls_tc=7,mpls_ttl=64,mpls_bos=1
545
dnl Modified MPLS pop action.
546
dnl The input is a frame with two MPLS headers which tcpdump -vve shows as:
547
dnl 60:66:66:66:66:66 > 50:54:00:00:00:07, ethertype MPLS multicast (0x8847), length 66: MPLS (label 20, exp 0, ttl 32)
548
dnl (tos 0x0, ttl 64, id 0, offset 0, flags [none], proto TCP (6), length 44)
550
AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
553
ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 66 66 88 47 00 01 41 20 45 00 00 2c 00 00 00 00 40 06 3b 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
556
# ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=60:66:66:66:66:66,dst=50:54:00:00:00:07),eth_type(0x8847),mpls(label=10,tc=3,ttl=100,bos=1)'
558
OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
559
ovs-appctl -t ovs-ofctl exit
561
AT_CHECK([cat ofctl_monitor.log], [0], [dnl
562
NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
563
tcp,metadata=0,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:66:66,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=80,tp_dst=0 tcp_csum:7744
565
NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
566
tcp,metadata=0,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:66:66,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=80,tp_dst=0 tcp_csum:7744
568
NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
569
tcp,metadata=0,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:66:66,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=80,tp_dst=0 tcp_csum:7744
293
572
dnl Checksum TCP.
794
1086
OVS_VSWITCHD_STOP
1089
# Two testcases below are for the ofproto/trace command
1090
# The first one tests all correct syntax:
1091
# ofproto/trace [dp_name] odp_flow [-generate|packet]
1092
# ofproto/trace br_name br_flow [-generate|packet]
1093
AT_SETUP([ofproto-dpif - ofproto/trace command 1])
1094
OVS_VSWITCHD_START([set bridge br0 fail-mode=standalone])
1095
ADD_OF_PORTS([br0], 1, 2, 3)
1097
AT_DATA([flows.txt], [dnl
1098
in_port=1 actions=output:2
1099
in_port=2 actions=output:1
1101
AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
1103
odp_flow="in_port(1)"
1105
# Test command: ofproto/trace odp_flow
1106
AT_CHECK([ovs-appctl ofproto/trace "$odp_flow"], [0], [stdout])
1107
AT_CHECK([tail -1 stdout], [0], [dnl
1111
# Test command: ofproto/trace dp_name odp_flow
1112
AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$odp_flow"], [0], [stdout])
1113
AT_CHECK([tail -1 stdout], [0], [dnl
1116
# Test commmand: ofproto/trace br_name br_flow
1117
AT_CHECK([ovs-appctl ofproto/trace br0 "$br_flow"], [0], [stdout])
1118
AT_CHECK([tail -1 stdout], [0], [dnl
1122
# Delete the inserted flows
1123
AT_CHECK([ovs-ofctl del-flows br0 "in_port=1"], [0], [stdout])
1124
AT_CHECK([ovs-ofctl del-flows br0 "in_port=2"], [0], [stdout])
1126
# This section beflow tests the [-generate] option
1127
odp_flow="in_port(3),eth(src=50:54:00:00:00:05,dst=ff:ff:ff:ff:ff:ff)"
1128
br_flow="arp,metadata=0,in_port=3,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=ff:ff:ff:ff:ff:ff"
1130
# Test command: ofproto/trace odp_flow
1131
AT_CHECK([ovs-appctl ofproto/trace "$odp_flow"], [0], [stdout])
1132
# Check for no MAC learning entry
1133
AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
1137
# Test command: ofproto/trace br_name br_flow
1138
AT_CHECK([ovs-appctl ofproto/trace br0 "$br_flow"], [0], [stdout])
1139
# Check for no MAC learning entry
1140
AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
1144
# Test command: ofproto/trace odp_flow -generate
1145
AT_CHECK([ovs-appctl ofproto/trace "$odp_flow" -generate], [0], [stdout])
1146
# Check for the MAC learning entry
1147
AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
1149
3 0 50:54:00:00:00:05 ?
1152
# Test command: ofproto/trace dp_name odp_flow -generate
1153
AT_CHECK([ovs-appctl ofproto/trace ovs-dummy \
1154
"in_port(1),eth(src=50:54:00:00:00:06,dst=50:54:00:00:00:05)" \
1155
-generate], [0], [stdout])
1156
# Check for both MAC learning entries
1157
AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
1159
3 0 50:54:00:00:00:05 ?
1160
1 0 50:54:00:00:00:06 ?
1163
# Test command: ofproto/trace br_name br_flow -generate
1164
AT_CHECK([ovs-appctl ofproto/trace br0 \
1165
"in_port=2,dl_src=50:54:00:00:00:07,dl_dst=50:54:00:00:00:06" \
1166
-generate], [0], [stdout])
1167
# Check for both MAC learning entries.
1168
AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
1170
3 0 50:54:00:00:00:05 ?
1171
1 0 50:54:00:00:00:06 ?
1172
2 0 50:54:00:00:00:07 ?
1175
# This section beflow tests the [packet] option
1176
# The ovs-tcpundump of packets between port1 and port2
1177
pkt1to2="50540000000250540000000108064500001C000100004001F98CC0A80001C0A800020800F7FF00000000"
1178
pkt2to1="50540000000150540000000208064500001C000100004001F98CC0A80002C0A800010800F7FF00000000"
1180
# Construct the MAC learning table
1181
AT_CHECK([ovs-appctl ofproto/trace ovs-dummy \
1182
"in_port(1),eth(src=50:54:00:00:00:01,dst=ff:ff:ff:ff:ff:ff)" \
1183
-generate], [0], [stdout])
1185
# Construct the MAC learning table
1186
AT_CHECK([ovs-appctl ofproto/trace ovs-dummy \
1187
"in_port(2),eth(src=50:54:00:00:00:02,dst=ff:ff:ff:ff:ff:ff)" \
1188
-generate], [0], [stdout])
1190
# Test command: ofproto/trace odp_flow packet
1191
AT_CHECK([ovs-appctl ofproto/trace \
1192
"in_port(1),skb_priority(1),skb_mark(2)" "$pkt1to2"], [0], [stdout])
1193
AT_CHECK([tail -1 stdout], [0], [dnl
1196
AT_CHECK([head -n 3 stdout], [0], [dnl
1198
Packet: arp,metadata=0,in_port=0,vlan_tci=0x0000,dl_src=50:54:00:00:00:01,dl_dst=50:54:00:00:00:02,arp_spa=0.0.0.0,arp_tpa=0.0.0.0,arp_sha=00:00:00:00:00:00,arp_tha=00:00:00:00:00:00
1199
Flow: skb_mark=0x2,skb_priority=0x1,arp,metadata=0,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:01,dl_dst=50:54:00:00:00:02,arp_spa=0.0.0.0,arp_tpa=0.0.0.0,arp_sha=00:00:00:00:00:00,arp_tha=00:00:00:00:00:00
1202
# Test command: ofproto/trace dp_name odp_flow packet
1203
AT_CHECK([ovs-appctl ofproto/trace ovs-dummy \
1204
"in_port(1),skb_priority(1),skb_mark(2)" "$pkt1to2"], [0], [stdout])
1205
AT_CHECK([tail -1 stdout], [0], [dnl
1208
AT_CHECK([head -n 3 stdout], [0], [dnl
1210
Packet: arp,metadata=0,in_port=0,vlan_tci=0x0000,dl_src=50:54:00:00:00:01,dl_dst=50:54:00:00:00:02,arp_spa=0.0.0.0,arp_tpa=0.0.0.0,arp_sha=00:00:00:00:00:00,arp_tha=00:00:00:00:00:00
1211
Flow: skb_mark=0x2,skb_priority=0x1,arp,metadata=0,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:01,dl_dst=50:54:00:00:00:02,arp_spa=0.0.0.0,arp_tpa=0.0.0.0,arp_sha=00:00:00:00:00:00,arp_tha=00:00:00:00:00:00
1214
# Test command: ofproto/trace br_name br_flow packet
1215
AT_CHECK([ovs-appctl ofproto/trace br0 \
1216
"in_port=2,skb_priority=2,skb_mark=1" "$pkt2to1"], [0], [stdout],[stderr])
1217
AT_CHECK([tail -1 stdout], [0], [dnl
1218
Datapath actions: set(skb_mark(0)),1
1220
AT_CHECK([head -n 2 stdout], [0], [dnl
1221
Packet: arp,metadata=0,in_port=0,vlan_tci=0x0000,dl_src=50:54:00:00:00:02,dl_dst=50:54:00:00:00:01,arp_spa=0.0.0.0,arp_tpa=0.0.0.0,arp_sha=00:00:00:00:00:00,arp_tha=00:00:00:00:00:00
1222
Flow: skb_mark=0x1,skb_priority=0x2,arp,metadata=0,in_port=2,vlan_tci=0x0000,dl_src=50:54:00:00:00:02,dl_dst=50:54:00:00:00:01,arp_spa=0.0.0.0,arp_tpa=0.0.0.0,arp_sha=00:00:00:00:00:00,arp_tha=00:00:00:00:00:00
1228
# The second test tests the corner cases
1229
AT_SETUP([ofproto-dpif - ofproto/trace command 2])
1231
ADD_OF_PORTS([br0], 1, 2)
1234
odp_flow="in_port(1),eth(src=50:54:00:00:00:01,dst=50:54:00:00:00:02)"
1235
br_flow="in_port=1,dl_src=50:54:00:00:00:01,dl_dst=50:54:00:00:00:02"
1237
generate="-generate"
1238
pkt="50540000000250540000000108064500001C000100004001F98CC0A80001C0A800020800F7FF00000000"
1240
# Test incorrect command: ofproto/trace wrong_name odp_flow [-generate|packet]
1246
[AT_CHECK([ovs-appctl ofproto/trace wrong_name "$odp_flow" option],
1248
AT_CHECK([tail -2 stderr], [0], [dnl
1249
Cannot find datapath of this name
1250
ovs-appctl: ovs-vswitchd: server returned an error
1253
# Test incorrect command: ofproto/trace empty_string odp_flow [-generate|packet]
1259
[AT_CHECK([ovs-appctl ofproto/trace "" "$odp_flow" option],
1261
AT_CHECK([tail -2 stderr], [0], [dnl
1262
Cannot find datapath of this name
1263
ovs-appctl: ovs-vswitchd: server returned an error
1266
# Test incorrect command: ofproto/trace nonexist_dp_name odp_flow [-generate|packet]
1272
[AT_CHECK([ovs-appctl ofproto/trace ovs-system "$odp_flow" option],
1274
AT_CHECK([tail -2 stderr], [0], [dnl
1275
Cannot find datapath of this name
1276
ovs-appctl: ovs-vswitchd: server returned an error
1279
# Test incorrect command: ofproto/trace br_name odp_flow [-generate|packet]
1285
[AT_CHECK([ovs-appctl ofproto/trace br0 "$odp_flow" option],
1287
AT_CHECK([tail -2 stderr], [0], [dnl
1288
Cannot find datapath of this name
1289
ovs-appctl: ovs-vswitchd: server returned an error
1292
# Test incorrect command: ofproto/trace dp_name br_flow [-generate|packet]
1298
[AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$br_flow" option],
1300
AT_CHECK([tail -2 stderr], [0], [dnl
1302
ovs-appctl: ovs-vswitchd: server returned an error
1305
# Test incorrect command: ofproto/trace br_flow [-generate|packet]
1311
[AT_CHECK([ovs-appctl ofproto/trace "$br_flow" option],
1313
AT_CHECK([tail -2 stderr], [0], [dnl
1314
Must specify bridge name
1315
ovs-appctl: ovs-vswitchd: server returned an error
1318
# Test incorrect command: ofproto/trace dp_name odp_flow garbage_option
1319
AT_CHECK([ovs-appctl ofproto/trace \
1320
ovs-dummy "$odp_flow" garbage_option],
1321
[2], [stdout],[stderr])
1322
AT_CHECK([tail -2 stderr], [0], [dnl
1323
Trailing garbage in packet data
1324
ovs-appctl: ovs-vswitchd: server returned an error
1327
# Test incorrect command: ofproto/trace with 4 arguments
1328
AT_CHECK([ovs-appctl ofproto/trace \
1329
arg1, arg2, arg3, arg4], [2], [stdout],[stderr])
1330
AT_CHECK([tail -2 stderr], [0], [dnl
1331
"ofproto/trace" command takes at most 3 arguments
1332
ovs-appctl: ovs-vswitchd: server returned an error
1335
# Test incorrect command: ofproto/trace with 0 argument
1336
AT_CHECK([ovs-appctl ofproto/trace ], [2], [stdout],[stderr])
1337
AT_CHECK([tail -2 stderr], [0], [dnl
1338
"ofproto/trace" command requires at least 1 arguments
1339
ovs-appctl: ovs-vswitchd: server returned an error
797
1345
m4_define([OFPROTO_TRACE],
799
1347
AT_CHECK([ovs-appctl ofproto/trace $1 "$flow" $3], [0], [stdout])
1396
2210
AT_CHECK([ovs-appctl dpif/show | sed 's/ 10[[0-9]]\{3\}(ms)$/ 10000(ms)/'], [0], [dnl
1397
br0 (dummy@ovs-dummy):
1398
lookups: hit:0 missed:61
1399
flows: cur: 0, avg: 1.000, max: 1, life span: 10000(ms)
1400
hourly avg: add rate: 0.641/min, del rate: 0.641/min
1401
overall avg: add rate: 1.000/min, del rate: 1.000/min
1402
br0 65534/100: (dummy)
2211
dummy@ovs-dummy: hit:0 missed:61
2212
flows: cur: 0, avg: 0, max: 1, life span: 1666ms
2213
hourly avg: add rate: 0.641/min, del rate: 0.641/min
2214
overall avg: add rate: 1.000/min, del rate: 1.000/min
2215
br0: hit:0 missed:61
2216
br0 65534/100: (dummy)
2224
AT_SETUP([ofproto-dpif - port duration])
2225
OVS_VSWITCHD_START([set Bridge br0 protocols=OpenFlow13])
2226
ADD_OF_PORTS([br0], 1, 2)
2228
ovs-appctl time/warp 10000
2230
AT_CHECK([ovs-ofctl -O openflow13 dump-ports br0], [0], [stdout])
2231
AT_CHECK([sed 's/=[[0-9]][[0-9]]\(\.[[0-9]][[0-9]]*\)\{0,1\}s/=?s/' stdout], [0],
2233
OFPST_PORT reply (OF1.3) (xid=0x2): 3 ports
2234
port 1: rx pkts=0, bytes=0, drop=0, errs=0, frame=0, over=0, crc=0
2235
tx pkts=0, bytes=0, drop=0, errs=0, coll=0
2237
port 2: rx pkts=0, bytes=0, drop=0, errs=0, frame=0, over=0, crc=0
2238
tx pkts=0, bytes=0, drop=0, errs=0, coll=0
2240
port LOCAL: rx pkts=0, bytes=0, drop=0, errs=0, frame=0, over=0, crc=0
2241
tx pkts=0, bytes=0, drop=0, errs=0, coll=0
2247
dnl ----------------------------------------------------------------------
2248
AT_BANNER([ofproto-dpif -- megaflows])
2250
# Strips out uninteresting parts of megaflow output, as well as parts
2251
# that vary from one run to another (e.g., timing and bond actions).
2252
m4_define([STRIP_USED], [[sed '
2253
s/used:[0-9]*\.[0-9]*/used:0.0/
2255
m4_define([STRIP_XOUT], [[sed '
2256
s/used:[0-9]*\.[0-9]*/used:0.0/
2257
s/Datapath actions:.*/Datapath actions: <del>/
2260
AT_SETUP([ofproto-dpif megaflow - port classification])
2262
ADD_OF_PORTS([br0], [1], [2])
2263
AT_DATA([flows.txt], [dnl
2264
table=0 in_port=1 actions=output(2)
2266
AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
2267
AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
2268
AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
2269
AT_CHECK([ovs-appctl dpif/dump-megaflows br0 | STRIP_XOUT], [0], [dnl
2270
skb_priority=0,ip,in_port=1,nw_frag=no, n_subfacets:2, used:0.0s, Datapath actions: <del>
2275
AT_SETUP([ofproto-dpif megaflow - L2 classification])
2277
ADD_OF_PORTS([br0], [1], [2])
2278
AT_DATA([flows.txt], [dnl
2279
table=0 in_port=1,dl_src=50:54:00:00:00:09 actions=output(2)
2281
AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
2282
AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
2283
AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
2284
AT_CHECK([ovs-appctl dpif/dump-megaflows br0 | STRIP_XOUT], [0], [dnl
2285
skb_priority=0,ip,in_port=1,dl_src=50:54:00:00:00:09,nw_frag=no, n_subfacets:1, used:0.0s, Datapath actions: <del>
2286
skb_priority=0,ip,in_port=1,dl_src=50:54:00:00:00:0b,nw_frag=no, n_subfacets:1, used:0.0s, Datapath actions: <del>
2291
AT_SETUP([ofproto-dpif megaflow - L3 classification])
2293
ADD_OF_PORTS([br0], [1], [2])
2294
AT_DATA([flows.txt], [dnl
2295
table=0 in_port=1,icmp,nw_src=10.0.0.4 actions=output(2)
2297
AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
2298
AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
2299
AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
2300
AT_CHECK([ovs-appctl dpif/dump-megaflows br0 | STRIP_XOUT], [0], [dnl
2301
skb_priority=0,icmp,in_port=1,nw_src=10.0.0.2,nw_frag=no, n_subfacets:1, used:0.0s, Datapath actions: <del>
2302
skb_priority=0,icmp,in_port=1,nw_src=10.0.0.4,nw_frag=no, n_subfacets:1, used:0.0s, Datapath actions: <del>
2307
AT_SETUP([ofproto-dpif megaflow - L4 classification])
2309
ADD_OF_PORTS([br0], [1], [2])
2310
AT_DATA([flows.txt], [dnl
2311
table=0 in_port=1,icmp,icmp_type=8 actions=output(2)
2313
AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
2314
AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
2315
AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
2316
AT_CHECK([ovs-appctl dpif/dump-megaflows br0 | STRIP_XOUT], [0], [dnl
2317
skb_priority=0,icmp,in_port=1,nw_frag=no,icmp_type=8, n_subfacets:2, used:0.0s, Datapath actions: <del>
2322
AT_SETUP([ofproto-dpif megaflow - normal])
2324
ADD_OF_PORTS([br0], [1], [2])
2325
AT_CHECK([ovs-ofctl add-flow br0 action=normal])
2326
AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
2327
AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
2328
AT_CHECK([ovs-appctl dpif/dump-megaflows br0 | STRIP_XOUT], [0], [dnl
2329
skb_priority=0,ip,in_port=1,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,nw_frag=no, n_subfacets:1, used:0.0s, Datapath actions: <del>
2330
skb_priority=0,ip,in_port=1,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:0b,dl_dst=50:54:00:00:00:0c,nw_frag=no, n_subfacets:1, used:0.0s, Datapath actions: <del>
2335
AT_SETUP([ofproto-dpif megaflow - mpls])
2337
ADD_OF_PORTS([br0], [1], [2])
2338
AT_DATA([flows.txt], [dnl
2339
table=0 dl_src=50:54:00:00:00:09 actions=push_mpls:0x8847,2
2340
table=0 dl_src=50:54:00:00:00:0b actions=pop_mpls:0x0800,2
2342
AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
2343
AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x8847),mpls(label=11,tc=3,ttl=64,bos=1)'])
2344
AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0a),eth_type(0x8847),mpls(label=11,tc=3,ttl=64,bos=1)'])
2345
AT_CHECK([ovs-appctl dpif/dump-megaflows br0 | STRIP_XOUT], [0], [dnl
2346
skb_priority=0,mpls,in_port=1,dl_src=50:54:00:00:00:09,mpls_label=11,mpls_tc=3,mpls_ttl=64,mpls_bos=1,nw_frag=no, n_subfacets:1, used:0.0s, Datapath actions: <del>
2347
skb_priority=0,mpls,in_port=1,dl_src=50:54:00:00:00:0b,mpls_label=11,mpls_tc=3,mpls_ttl=64,mpls_bos=1,nw_frag=no, n_subfacets:1, used:0.0s, Datapath actions: <del>
2352
AT_SETUP([ofproto-dpif megaflow - netflow])
2354
ADD_OF_PORTS([br0], [1], [2])
2356
dnl NetFlow configuration disables wildcarding relevant fields
2357
ON_EXIT([kill `cat test-netflow.pid`])
2358
AT_CHECK([test-netflow --log-file --detach --no-chdir --pidfile 0:127.0.0.1 > netflow.log], [0], [], [ignore])
2359
AT_CAPTURE_FILE([netflow.log])
2360
NETFLOW_PORT=`parse_listening_port < test-netflow.log`
2362
set Bridge br0 netflow=@nf -- \
2363
--id=@nf create NetFlow targets=\"127.0.0.1:$NETFLOW_PORT\" \
2364
engine_id=1 engine_type=2 active_timeout=30 add-id-to-interface=false
2366
AT_CHECK([ovs-ofctl add-flow br0 action=normal])
2367
AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
2368
AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
2369
AT_CHECK([ovs-appctl dpif/dump-megaflows br0 | STRIP_XOUT], [0], [dnl
2370
skb_priority=0,icmp,in_port=1,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,nw_src=10.0.0.2,nw_dst=10.0.0.1,nw_tos=0,nw_frag=no,icmp_type=8,icmp_code=0, n_subfacets:1, used:0.0s, Datapath actions: <del>
2371
skb_priority=0,icmp,in_port=1,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:0b,dl_dst=50:54:00:00:00:0c,nw_src=10.0.0.4,nw_dst=10.0.0.3,nw_tos=0,nw_frag=no,icmp_type=8,icmp_code=0, n_subfacets:1, used:0.0s, Datapath actions: <del>
2376
AT_SETUP([ofproto-dpif megaflow - normal, active-backup bonding])
2378
[add-port br0 p1 -- set Interface p1 type=dummy ofport_request=1 -- \
2379
add-bond br0 bond0 p2 p3 bond_mode=active-backup -- \
2380
set interface p2 type=dummy ofport_request=2 -- \
2381
set interface p3 type=dummy ofport_request=3])
2382
AT_CHECK([ovs-appctl netdev-dummy/set-admin-state up], 0, [OK
2385
AT_CHECK([ovs-ofctl add-flow br0 action=normal])
2386
AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
2387
AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
2388
AT_CHECK([ovs-appctl dpif/dump-megaflows br0 | STRIP_XOUT], [0], [dnl
2389
skb_priority=0,ip,in_port=1,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,nw_frag=no, n_subfacets:1, used:0.0s, Datapath actions: <del>
2390
skb_priority=0,ip,in_port=1,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:0b,dl_dst=50:54:00:00:00:0c,nw_frag=no, n_subfacets:1, used:0.0s, Datapath actions: <del>
2395
AT_SETUP([ofproto-dpif megaflow - normal, balance-slb bonding])
2397
[add-port br0 p1 -- set Interface p1 type=dummy ofport_request=1 -- \
2398
add-bond br0 bond0 p2 p3 bond_mode=balance-slb -- \
2399
set interface p2 type=dummy ofport_request=2 -- \
2400
set interface p3 type=dummy ofport_request=3])
2401
AT_CHECK([ovs-appctl netdev-dummy/set-admin-state up], 0, [OK
2404
AT_CHECK([ovs-ofctl add-flow br0 action=normal])
2405
AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
2406
AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
2407
AT_CHECK([ovs-appctl dpif/dump-megaflows br0 | STRIP_XOUT], [0], [dnl
2408
skb_priority=0,ip,in_port=1,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,nw_frag=no, n_subfacets:1, used:0.0s, Datapath actions: <del>
2409
skb_priority=0,ip,in_port=1,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:0b,dl_dst=50:54:00:00:00:0c,nw_frag=no, n_subfacets:1, used:0.0s, Datapath actions: <del>
2414
AT_SETUP([ofproto-dpif megaflow - normal, balance-tcp bonding])
2415
# Create bond0 on br0 with interfaces p0 and p1
2416
# and bond1 on br1 with interfaces p2 and p3
2417
# with p0 patched to p2 and p1 patched to p3.
2419
[add-bond br0 bond0 p0 p1 bond_mode=balance-tcp lacp=active \
2420
other-config:lacp-time=fast \
2421
other-config:bond-rebalance-interval=0 -- \
2422
set interface p0 type=patch options:peer=p2 ofport_request=1 -- \
2423
set interface p1 type=patch options:peer=p3 ofport_request=2 -- \
2425
set bridge br1 other-config:hwaddr=aa:66:aa:66:00:00 -- \
2426
set bridge br1 datapath-type=dummy other-config:datapath-id=1234 \
2427
fail-mode=secure -- \
2428
add-bond br1 bond1 p2 p3 bond_mode=balance-tcp lacp=active \
2429
other-config:lacp-time=fast \
2430
other-config:bond-rebalance-interval=0 -- \
2431
set interface p2 type=patch options:peer=p0 ofport_request=3 -- \
2432
set interface p3 type=patch options:peer=p1 ofport_request=4 --])
2434
AT_CHECK([ovs-appctl netdev-dummy/set-admin-state up], 0, [OK
2436
ADD_OF_PORTS([br0], [7])
2437
AT_CHECK([ovs-ofctl add-flow br0 action=normal])
2438
AT_CHECK([ovs-ofctl add-flow br1 action=normal])
2439
ovs-appctl time/warp 5000
2440
AT_CHECK([ovs-appctl netdev-dummy/receive p7 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
2441
AT_CHECK([ovs-appctl netdev-dummy/receive p7 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
2443
AT_CHECK([ovs-appctl dpif/dump-megaflows br0 | STRIP_XOUT], [0], [dnl
2444
skb_priority=0,icmp,in_port=7,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,nw_src=10.0.0.2,nw_dst=10.0.0.1,nw_frag=no,icmp_type=8,icmp_code=0, n_subfacets:1, used:0.0s, Datapath actions: <del>
2445
skb_priority=0,icmp,in_port=7,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:0b,dl_dst=50:54:00:00:00:0c,nw_src=10.0.0.4,nw_dst=10.0.0.3,nw_frag=no,icmp_type=8,icmp_code=0, n_subfacets:1, used:0.0s, Datapath actions: <del>
2450
AT_SETUP([ofproto-dpif megaflow - resubmit port action])
2452
ADD_OF_PORTS([br0], [1], [2])
2453
AT_DATA([flows.txt], [dnl
2454
table=0 in_port=1,ip actions=resubmit(90)
2455
table=0 in_port=90,dl_src=50:54:00:00:00:09 actions=output(2)
2457
AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
2458
AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
2459
AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
2460
AT_CHECK([ovs-appctl dpif/dump-megaflows br0 | STRIP_XOUT], [0], [dnl
2461
skb_priority=0,ip,in_port=1,dl_src=50:54:00:00:00:09,nw_frag=no, n_subfacets:1, used:0.0s, Datapath actions: <del>
2462
skb_priority=0,ip,in_port=1,dl_src=50:54:00:00:00:0b,nw_frag=no, n_subfacets:1, used:0.0s, Datapath actions: <del>
2467
AT_SETUP([ofproto-dpif megaflow - resubmit table action])
2469
ADD_OF_PORTS([br0], [1], [2])
2470
AT_DATA([flows.txt], [dnl
2471
table=0 in_port=1,ip actions=resubmit(,1)
2472
table=1 dl_src=50:54:00:00:00:09 actions=output(2)
2474
AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
2475
AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
2476
AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=
2477
1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
2478
AT_CHECK([ovs-appctl dpif/dump-megaflows br0 | STRIP_XOUT], [0], [dnl
2479
skb_priority=0,ip,in_port=1,dl_src=50:54:00:00:00:09,nw_frag=no, n_subfacets:1, used:0.0s, Datapath actions: <del>
2480
skb_priority=0,ip,in_port=1,dl_src=50:54:00:00:00:0b,nw_frag=no, n_subfacets:1, used:0.0s, Datapath actions: <del>
2485
AT_SETUP([ofproto-dpif megaflow - goto_table action])
2487
ADD_OF_PORTS([br0], [1], [2])
2488
AT_DATA([flows.txt], [dnl
2489
table=0 in_port=1,ip actions=goto_table(1)
2490
table=1 dl_src=50:54:00:00:00:09 actions=output(2)
2492
AT_CHECK([ovs-ofctl -O OpenFlow12 add-flows br0 flows.txt])
2493
AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
2494
AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
2495
AT_CHECK([ovs-appctl dpif/dump-megaflows br0 | STRIP_XOUT], [0], [dnl
2496
skb_priority=0,ip,in_port=1,dl_src=50:54:00:00:00:09,nw_frag=no, n_subfacets:1, used:0.0s, Datapath actions: <del>
2497
skb_priority=0,ip,in_port=1,dl_src=50:54:00:00:00:0b,nw_frag=no, n_subfacets:1, used:0.0s, Datapath actions: <del>
2502
AT_SETUP([ofproto-dpif megaflow - mirroring, select_all])
2504
ADD_OF_PORTS([br0], [1], [2], [3])
2506
set Bridge br0 mirrors=@m --\
2507
--id=@p3 get Port p3 --\
2508
--id=@m create Mirror name=mymirror select_all=true output_port=@p3
2510
AT_DATA([flows.txt], [dnl
2511
in_port=1 actions=output:2
2513
AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
2514
AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
2515
AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
2516
AT_CHECK([ovs-appctl dpif/dump-megaflows br0 | STRIP_XOUT], [0], [dnl
2517
skb_priority=0,ip,in_port=1,nw_frag=no, n_subfacets:2, used:0.0s, Datapath actions: <del>
2522
AT_SETUP([ofproto-dpif megaflow - mirroring, select_vlan])
2524
ADD_OF_PORTS([br0], [1], [2], [3])
2526
set Bridge br0 mirrors=@m --\
2527
--id=@p2 get Port p2 -- --id=@p3 get Port p3 --\
2528
--id=@m create Mirror name=mymirror select_all=true select_vlan=11 output_port=@p3
2530
AT_DATA([flows.txt], [dnl
2531
in_port=1 actions=output:2
2533
AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
2534
AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x8100),vlan(vid=11,pcp=7),encap(eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0))'])
2535
AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
2536
AT_CHECK([ovs-appctl dpif/dump-megaflows br0 | STRIP_XOUT], [0], [dnl
2537
skb_priority=0,ip,in_port=1,dl_vlan=11,nw_frag=no, n_subfacets:1, used:0.0s, Datapath actions: <del>
2538
skb_priority=0,ip,in_port=1,vlan_tci=0x0000/0x1fff,nw_frag=no, n_subfacets:1, used:0.0s, Datapath actions: <del>
2543
AT_SETUP([ofproto-dpif megaflow - move action])
2545
ADD_OF_PORTS([br0], [1], [2])
2546
AT_DATA([flows.txt], [dnl
2547
table=0 in_port=1 ip,actions=move:NXM_OF_IP_SRC[[]]->NXM_NX_REG0[[]],resubmit(90)
2548
table=0 in_port=90 ip,actions=move:NXM_NX_REG0[[]]->NXM_NX_REG1[[]],resubmit(91)
2549
table=0 in_port=91 reg0=0x0a000002,actions=output(2)
2551
AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
2552
AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
2553
AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
2554
AT_CHECK([ovs-appctl dpif/dump-megaflows br0 | STRIP_XOUT], [0], [dnl
2555
skb_priority=0,ip,in_port=1,nw_src=10.0.0.2,nw_frag=no, n_subfacets:1, used:0.0s, Datapath actions: <del>
2556
skb_priority=0,ip,in_port=1,nw_src=10.0.0.4,nw_frag=no, n_subfacets:1, used:0.0s, Datapath actions: <del>
2561
AT_SETUP([ofproto-dpif megaflow - push action])
2563
ADD_OF_PORTS([br0], [1], [2])
2564
AT_DATA([flows.txt], [dnl
2565
table=0 in_port=1 ip,actions=push:NXM_OF_IP_SRC[[]],output(2)
2567
AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
2568
AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
2569
AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
2570
AT_CHECK([ovs-appctl dpif/dump-megaflows br0 | STRIP_XOUT], [0], [dnl
2571
skb_priority=0,ip,in_port=1,nw_src=10.0.0.2,nw_frag=no, n_subfacets:1, used:0.0s, Datapath actions: <del>
2572
skb_priority=0,ip,in_port=1,nw_src=10.0.0.4,nw_frag=no, n_subfacets:1, used:0.0s, Datapath actions: <del>
2577
AT_SETUP([ofproto-dpif megaflow - learning])
2579
ADD_OF_PORTS([br0], [1], [2])
2580
AT_DATA([flows.txt], [dnl
2581
table=0 in_port=1 actions=load:2->NXM_NX_REG0[[0..15]],learn(table=1,priority=65535,NXM_OF_ETH_SRC[[]],NXM_OF_VLAN_TCI[[0..11]],output:NXM_NX_REG0[[0..15]]),output:2
2583
AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
2584
AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
2585
AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
2586
dnl The original flow is missing due to a revalidation.
2587
AT_CHECK([ovs-appctl dpif/dump-megaflows br0 | STRIP_XOUT], [0], [dnl
2588
skb_priority=0,ip,in_port=1,vlan_tci=0x0000/0x0fff,dl_src=50:54:00:00:00:09,nw_frag=no, n_subfacets:1, used:0.0s, Datapath actions: <del>
2589
skb_priority=0,ip,in_port=1,vlan_tci=0x0000/0x0fff,dl_src=50:54:00:00:00:0b,nw_frag=no, n_subfacets:1, used:0.0s, Datapath actions: <del>
2594
AT_SETUP([ofproto-dpif megaflow - tunnels])
2596
[add-port br0 p1 -- set Interface p1 type=dummy ofport_request=1 \
2597
ofport_request=1 -- \
2598
add-port br0 p2 -- set Interface p2 type=gre options:remote_ip=1.1.1.1 \
2599
ofport_request=2 options:key=flow -- \
2600
add-port br0 p3 -- set Interface p3 type=dummy ofport_request=3 \
2601
ofport_request=3 -- \
2602
add-port br0 p4 -- set Interface p4 type=gre options:remote_ip=1.1.1.2 \
2603
options:tos=inherit options:ttl=inherit ofport_request=4 options:key=flow])
2604
AT_DATA([flows.txt], [dnl
2605
in_port=1,actions=output(2)
2606
in_port=3,actions=output(4)
2608
AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
2609
dnl ECN bits are always copied out, but don't use 0x3 (CE), since that
2610
dnl will cause the packet to be dropped.
2611
AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0xfd,ttl=128,frag=no),icmp(type=8,code=0)'])
2612
AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0x1,ttl=64,frag=no),icmp(type=8,code=0)'])
2613
AT_CHECK([ovs-appctl netdev-dummy/receive p3 'in_port(3),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0xfd,ttl=128,frag=no),icmp(type=8,code=0)'])
2614
AT_CHECK([ovs-appctl netdev-dummy/receive p3 'in_port(3),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0x1,ttl=64,frag=no),icmp(type=8,code=0)'])
2615
AT_CHECK([ovs-appctl dpif/dump-megaflows br0 | STRIP_XOUT], [0], [dnl
2616
skb_priority=0,ip,in_port=1,nw_ecn=1,nw_frag=no, n_subfacets:2, used:0.0s, Datapath actions: <del>
2617
skb_priority=0,ip,in_port=3,nw_tos=0,nw_ecn=1,nw_ttl=64,nw_frag=no, n_subfacets:1, used:0.0s, Datapath actions: <del>
2618
skb_priority=0,ip,in_port=3,nw_tos=252,nw_ecn=1,nw_ttl=128,nw_frag=no, n_subfacets:1, used:0.0s, Datapath actions: <del>
2623
AT_SETUP([ofproto-dpif megaflow - dec_ttl])
2625
ADD_OF_PORTS([br0], [1], [2])
2626
AT_DATA([flows.txt], [dnl
2627
table=0 in_port=1,icmp,nw_src=10.0.0.4 actions=dec_ttl,output(2)
2629
AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
2630
AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
2631
AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
2632
AT_CHECK([ovs-appctl dpif/dump-megaflows br0 | STRIP_XOUT], [0], [dnl
2633
skb_priority=0,icmp,in_port=1,nw_src=10.0.0.2,nw_frag=no, n_subfacets:1, used:0.0s, Datapath actions: <del>
2634
skb_priority=0,icmp,in_port=1,nw_src=10.0.0.4,nw_dst=10.0.0.3,nw_tos=0,nw_ecn=0,nw_ttl=64, n_subfacets:1, used:0.0s, Datapath actions: <del>
2639
AT_SETUP([ofproto-dpif - datapath port number change])
2640
OVS_VSWITCHD_START([set Bridge br0 fail-mode=standalone])
2641
ADD_OF_PORTS([br0], 1)
2643
# Trace a flow that should output to p1.
2644
AT_CHECK([ovs-appctl ofproto/trace br0 in_port=LOCAL,dl_src=10:20:30:40:50:60],
2646
AT_CHECK([tail -1 stdout], [0], [Datapath actions: 1
2649
# Change p1's port number to 5.
2650
AT_CHECK([ovs-appctl dpif-dummy/change-port-number ovs-dummy p1 5])
2652
# Trace a flow that should output to p1 in its new location.
2653
AT_CHECK([ovs-appctl ofproto/trace br0 in_port=LOCAL,dl_src=10:20:30:40:50:60],
2655
AT_CHECK([tail -1 stdout], [0], [Datapath actions: 5
2660
AT_SETUP([ofproto-dpif megaflow - set dl_dst])
2662
ADD_OF_PORTS([br0], [1], [2])
2663
AT_DATA([flows.txt], [dnl
2664
table=0 in_port=1 actions=mod_dl_dst(50:54:00:00:00:0a),output(2)
2666
AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
2667
AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
2668
AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
2669
dnl The megaflows do not match the same fields, since the first packet
2670
dnl is essentially a no-op. (The new destination MAC is the same as the
2671
dnl original.) The ofproto-dpif library un-wildcards the destination MAC
2672
dnl so that a packet that doesn't need its MAC address changed doesn't
2673
dnl hide one that does. Since the first entry doesn't need to change,
2674
dnl only the destination MAC address is matched (as decided by
2675
dnl ofproto-dpif). The second entry actually updates the destination
2676
dnl MAC, so both the source and destination MAC addresses are
2677
dnl un-wildcarded, since the ODP commit functions update both the source
2678
dnl and destination MAC addresses.
2679
AT_CHECK([ovs-appctl dpif/dump-megaflows br0 | STRIP_USED], [0], [dnl
2680
skb_priority=0,ip,in_port=1,dl_dst=50:54:00:00:00:0a,nw_frag=no, n_subfacets:1, used:0.0s, Datapath actions: 2
2681
skb_priority=0,ip,in_port=1,dl_src=50:54:00:00:00:0b,dl_dst=50:54:00:00:00:0c,nw_frag=no, n_subfacets:1, used:0.0s, Datapath actions: set(eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0a)),2
2686
AT_SETUP([ofproto-dpif - datapath port number change])
2687
OVS_VSWITCHD_START([set Bridge br0 fail-mode=standalone])
2688
ADD_OF_PORTS([br0], 1)
2690
# Trace a flow that should output to p1.
2691
AT_CHECK([ovs-appctl ofproto/trace br0 in_port=LOCAL,dl_src=10:20:30:40:50:60],
2693
AT_CHECK([tail -1 stdout], [0], [Datapath actions: 1
2696
# Change p1's port number to 5.
2697
AT_CHECK([ovs-appctl dpif-dummy/change-port-number ovs-dummy p1 5])
2699
# Trace a flow that should output to p1 in its new location.
2700
AT_CHECK([ovs-appctl ofproto/trace br0 in_port=LOCAL,dl_src=10:20:30:40:50:60],
2702
AT_CHECK([tail -1 stdout], [0], [Datapath actions: 5
1407
2704
OVS_VSWITCHD_STOP