3 # Strips out Reciulation ID information since it may change over time.
4 m4_define([STRIP_RECIRC_ID], [[sed '
8 # Strips out active member mac address since it may change over time.
9 m4_define([STRIP_ACTIVE_MEMBER_MAC], [[sed '
10 s/active member mac.*$/<active member mac del>/
13 AT_SETUP([lacp - config])
16 set Port p1 lacp=active --\
17 set Interface p1 type=dummy ])
20 ovs-appctl time/warp 300 100
22 AT_CHECK([ovs-appctl lacp/show], [0], [dnl
24 status: active negotiated
25 sys_id: aa:55:aa:55:00:00
30 member: p1: expired attached
35 actor sys_id: aa:55:aa:55:00:00
36 actor sys_priority: 65535
38 actor port_priority: 65535
40 actor state: activity synchronized collecting distributing expired
42 partner sys_id: 00:00:00:00:00:00
43 partner sys_priority: 0
45 partner port_priority: 0
47 partner state: timeout
49 AT_CHECK([ovs-appctl bond/show])
53 AT_SETUP([lacp - multi port config])
54 OVS_VSWITCHD_START([dnl
55 add-bond br0 bond p1 p2 --\
56 set Port bond lacp=active bond-mode=active-backup \
57 other_config:lacp-time="fast" \
58 other_config:lacp-system-id=11:22:33:44:55:66 \
59 other_config:lacp-system-priority=54321 --\
60 set Interface p1 type=dummy \
61 other_config:lacp-port-id=11 \
62 other_config:lacp-port-priority=111 \
63 other_config:lacp-aggregation-key=3333 --\
64 set Interface p2 type=dummy \
65 other_config:lacp-port-id=22 \
66 other_config:lacp-port-priority=222 \
67 other_config:lacp-aggregation-key=3333 ])
70 ovs-appctl time/warp 300 100
72 AT_CHECK([ovs-appctl lacp/show], [0], [stdout])
73 AT_CHECK([sed -e 's/aggregation key:.*/aggregation key: <omitted>/' < stdout], [0], [dnl
75 status: active negotiated
76 sys_id: 11:22:33:44:55:66
78 aggregation key: <omitted>
81 member: p1: expired attached
86 actor sys_id: 11:22:33:44:55:66
87 actor sys_priority: 54321
89 actor port_priority: 111
91 actor state: activity timeout aggregation synchronized collecting distributing expired
93 partner sys_id: 00:00:00:00:00:00
94 partner sys_priority: 0
96 partner port_priority: 0
98 partner state: timeout
100 member: p2: expired attached
105 actor sys_id: 11:22:33:44:55:66
106 actor sys_priority: 54321
108 actor port_priority: 222
110 actor state: activity timeout aggregation synchronized collecting distributing expired
112 partner sys_id: 00:00:00:00:00:00
113 partner sys_priority: 0
115 partner port_priority: 0
117 partner state: timeout
119 AT_CHECK([ovs-appctl bond/show], [0], [dnl
121 bond_mode: active-backup
122 bond may use recirculation: no, Recirc-ID : -1
124 lb_output action: disabled, bond-id: -1
127 lacp_status: negotiated
128 lacp_fallback_ab: false
129 active-backup primary: <none>
130 active member mac: 00:00:00:00:00:00(none)
142 AT_SETUP([lacp - negotiation])
143 # Create bond0 on br0 with members p0 and p1
144 # and bond1 on br1 with members p2 and p3
145 # with p0 patched to p2 and p1 patched to p3.
147 [add-bond br0 bond0 p0 p1 bond_mode=balance-tcp lacp=active \
148 other-config:lacp-time=fast \
149 other-config:bond-rebalance-interval=0 -- \
150 set interface p0 type=patch options:peer=p2 ofport_request=1 \
151 other-config:lacp-aggregation-key=2 -- \
152 set interface p1 type=patch options:peer=p3 ofport_request=2 \
153 other-config:lacp-aggregation-key=2 -- \
155 set bridge br1 other-config:hwaddr=aa:66:aa:66:00:00 -- \
156 set bridge br1 datapath-type=dummy other-config:datapath-id=1234 \
157 fail-mode=secure -- \
158 add-bond br1 bond1 p2 p3 bond_mode=balance-tcp lacp=active \
159 other-config:lacp-time=fast \
160 other-config:bond-rebalance-interval=0 -- \
161 set interface p2 type=patch options:peer=p0 ofport_request=3 \
162 other-config:lacp-aggregation-key=4 -- \
163 set interface p3 type=patch options:peer=p1 ofport_request=4 \
164 other-config:lacp-aggregation-key=4 --])
166 AT_CHECK([ovs-appctl netdev-dummy/set-admin-state up], 0, [OK
171 # Wait for up to 5 (simulated) seconds, until LACP negotiation finishes.
174 ovs-appctl lacp/show bond0 > bond0
175 AT_CAPTURE_FILE([bond0])
176 ovs-appctl lacp/show bond1 > bond1
177 AT_CAPTURE_FILE([bond1])
178 if grep negotiated bond0 && grep negotiated bond1; then
179 if grep expired bond0 || grep expired bond1; then
186 if test $i = 50; then
189 ovs-appctl time/warp 100
192 # Now check the correctly negotiated configuration.
194 [ovs-appctl lacp/show bond0
195 ovs-appctl lacp/show bond1
196 ovs-appctl bond/show bond0 | STRIP_RECIRC_ID | STRIP_ACTIVE_MEMBER_MAC
197 ovs-appctl bond/show bond1 | STRIP_RECIRC_ID | STRIP_ACTIVE_MEMBER_MAC ], [0], [stdout])
198 AT_CHECK([sed '/active member/d' stdout], [0], [dnl
200 status: active negotiated
201 sys_id: aa:55:aa:55:00:00
206 member: p0: current attached
211 actor sys_id: aa:55:aa:55:00:00
212 actor sys_priority: 65534
214 actor port_priority: 65535
216 actor state: activity timeout aggregation synchronized collecting distributing
218 partner sys_id: aa:66:aa:66:00:00
219 partner sys_priority: 65534
221 partner port_priority: 65535
223 partner state: activity timeout aggregation synchronized collecting distributing
225 member: p1: current attached
230 actor sys_id: aa:55:aa:55:00:00
231 actor sys_priority: 65534
233 actor port_priority: 65535
235 actor state: activity timeout aggregation synchronized collecting distributing
237 partner sys_id: aa:66:aa:66:00:00
238 partner sys_priority: 65534
240 partner port_priority: 65535
242 partner state: activity timeout aggregation synchronized collecting distributing
244 status: active negotiated
245 sys_id: aa:66:aa:66:00:00
250 member: p2: current attached
255 actor sys_id: aa:66:aa:66:00:00
256 actor sys_priority: 65534
258 actor port_priority: 65535
260 actor state: activity timeout aggregation synchronized collecting distributing
262 partner sys_id: aa:55:aa:55:00:00
263 partner sys_priority: 65534
265 partner port_priority: 65535
267 partner state: activity timeout aggregation synchronized collecting distributing
269 member: p3: current attached
274 actor sys_id: aa:66:aa:66:00:00
275 actor sys_priority: 65534
277 actor port_priority: 65535
279 actor state: activity timeout aggregation synchronized collecting distributing
281 partner sys_id: aa:55:aa:55:00:00
282 partner sys_priority: 65534
284 partner port_priority: 65535
286 partner state: activity timeout aggregation synchronized collecting distributing
288 bond_mode: balance-tcp
289 bond may use recirculation: yes, <del>
291 lb_output action: disabled, bond-id: -1
294 lacp_status: negotiated
295 lacp_fallback_ab: false
296 active-backup primary: <none>
305 bond_mode: balance-tcp
306 bond may use recirculation: yes, <del>
308 lb_output action: disabled, bond-id: -1
311 lacp_status: negotiated
312 lacp_fallback_ab: false
313 active-backup primary: <none>
322 AT_CHECK([grep 'active member$' stdout], [0], [dnl
327 # Redirect the patch link between p0 and p2 so that no packets get
328 # back and forth across them anymore. Then wait 4 simulated
329 # seconds. The LACP state should become "expired" for p0 and p2.
330 AT_CHECK([ovs-vsctl \
331 -- add-port br0 null0 -- set int null0 type=patch options:peer=p2 -- set int p2 options:peer=null0 \
332 -- add-port br1 null1 -- set int null1 type=patch options:peer=p0 -- set int p0 options:peer=null1])
334 ovs-appctl time/warp 4100 100
336 [ovs-appctl lacp/show bond0
337 ovs-appctl lacp/show bond1
338 ovs-appctl bond/show bond0 | STRIP_RECIRC_ID | STRIP_ACTIVE_MEMBER_MAC
339 ovs-appctl bond/show bond1 | STRIP_RECIRC_ID | STRIP_ACTIVE_MEMBER_MAC ], [0], [dnl
341 status: active negotiated
342 sys_id: aa:55:aa:55:00:00
347 member: p0: expired attached
352 actor sys_id: aa:55:aa:55:00:00
353 actor sys_priority: 65534
355 actor port_priority: 65535
357 actor state: activity timeout aggregation synchronized collecting distributing expired
359 partner sys_id: aa:66:aa:66:00:00
360 partner sys_priority: 65534
362 partner port_priority: 65535
364 partner state: activity timeout aggregation collecting distributing
366 member: p1: current attached
371 actor sys_id: aa:55:aa:55:00:00
372 actor sys_priority: 65534
374 actor port_priority: 65535
376 actor state: activity timeout aggregation synchronized collecting distributing
378 partner sys_id: aa:66:aa:66:00:00
379 partner sys_priority: 65534
381 partner port_priority: 65535
383 partner state: activity timeout aggregation synchronized collecting distributing
385 status: active negotiated
386 sys_id: aa:66:aa:66:00:00
391 member: p2: expired attached
396 actor sys_id: aa:66:aa:66:00:00
397 actor sys_priority: 65534
399 actor port_priority: 65535
401 actor state: activity timeout aggregation synchronized collecting distributing expired
403 partner sys_id: aa:55:aa:55:00:00
404 partner sys_priority: 65534
406 partner port_priority: 65535
408 partner state: activity timeout aggregation collecting distributing
410 member: p3: current attached
415 actor sys_id: aa:66:aa:66:00:00
416 actor sys_priority: 65534
418 actor port_priority: 65535
420 actor state: activity timeout aggregation synchronized collecting distributing
422 partner sys_id: aa:55:aa:55:00:00
423 partner sys_priority: 65534
425 partner port_priority: 65535
427 partner state: activity timeout aggregation synchronized collecting distributing
429 bond_mode: balance-tcp
430 bond may use recirculation: yes, <del>
432 lb_output action: disabled, bond-id: -1
435 lacp_status: negotiated
436 lacp_fallback_ab: false
437 active-backup primary: <none>
438 <active member mac del>
448 bond_mode: balance-tcp
449 bond may use recirculation: yes, <del>
451 lb_output action: disabled, bond-id: -1
454 lacp_status: negotiated
455 lacp_fallback_ab: false
456 active-backup primary: <none>
457 <active member mac del>
468 # Wait 4 more simulated seconds. The LACP state should become
469 # "defaulted" for p0 and p2.
470 ovs-appctl time/warp 4100 100
472 [ovs-appctl lacp/show bond0
473 ovs-appctl lacp/show bond1
474 ovs-appctl bond/show bond0 | STRIP_RECIRC_ID | STRIP_ACTIVE_MEMBER_MAC
475 ovs-appctl bond/show bond1 | STRIP_RECIRC_ID | STRIP_ACTIVE_MEMBER_MAC ], [0], [dnl
477 status: active negotiated
478 sys_id: aa:55:aa:55:00:00
483 member: p0: defaulted detached
488 actor sys_id: aa:55:aa:55:00:00
489 actor sys_priority: 65534
491 actor port_priority: 65535
493 actor state: activity timeout aggregation defaulted
495 partner sys_id: 00:00:00:00:00:00
496 partner sys_priority: 0
498 partner port_priority: 0
502 member: p1: current attached
507 actor sys_id: aa:55:aa:55:00:00
508 actor sys_priority: 65534
510 actor port_priority: 65535
512 actor state: activity timeout aggregation synchronized collecting distributing
514 partner sys_id: aa:66:aa:66:00:00
515 partner sys_priority: 65534
517 partner port_priority: 65535
519 partner state: activity timeout aggregation synchronized collecting distributing
521 status: active negotiated
522 sys_id: aa:66:aa:66:00:00
527 member: p2: defaulted detached
532 actor sys_id: aa:66:aa:66:00:00
533 actor sys_priority: 65534
535 actor port_priority: 65535
537 actor state: activity timeout aggregation defaulted
539 partner sys_id: 00:00:00:00:00:00
540 partner sys_priority: 0
542 partner port_priority: 0
546 member: p3: current attached
551 actor sys_id: aa:66:aa:66:00:00
552 actor sys_priority: 65534
554 actor port_priority: 65535
556 actor state: activity timeout aggregation synchronized collecting distributing
558 partner sys_id: aa:55:aa:55:00:00
559 partner sys_priority: 65534
561 partner port_priority: 65535
563 partner state: activity timeout aggregation synchronized collecting distributing
565 bond_mode: balance-tcp
566 bond may use recirculation: yes, <del>
568 lb_output action: disabled, bond-id: -1
571 lacp_status: negotiated
572 lacp_fallback_ab: false
573 active-backup primary: <none>
574 <active member mac del>
584 bond_mode: balance-tcp
585 bond may use recirculation: yes, <del>
587 lb_output action: disabled, bond-id: -1
590 lacp_status: negotiated
591 lacp_fallback_ab: false
592 active-backup primary: <none>
593 <active member mac del>
604 # Reconnect the patch link between p0 and p2 to allow traffic between the ports.
605 AT_CHECK([ovs-vsctl \
606 -- del-port null0 -- set int p2 options:peer=p0 \
607 -- del-port null1 -- set int p0 options:peer=p2])
609 # Wait for 30 more seconds (LACP_SLOW_TIME_TX) for the lacp to renegotiate
610 ovs-appctl time/warp 30100 100
613 [ovs-appctl lacp/show bond0
614 ovs-appctl lacp/show bond1
615 ovs-appctl bond/show bond0 | STRIP_RECIRC_ID | STRIP_ACTIVE_MEMBER_MAC
616 ovs-appctl bond/show bond1 | STRIP_RECIRC_ID | STRIP_ACTIVE_MEMBER_MAC ], [0], [dnl
618 status: active negotiated
619 sys_id: aa:55:aa:55:00:00
624 member: p0: current attached
629 actor sys_id: aa:55:aa:55:00:00
630 actor sys_priority: 65534
632 actor port_priority: 65535
634 actor state: activity timeout aggregation synchronized collecting distributing
636 partner sys_id: aa:66:aa:66:00:00
637 partner sys_priority: 65534
639 partner port_priority: 65535
641 partner state: activity timeout aggregation synchronized collecting distributing
643 member: p1: current attached
648 actor sys_id: aa:55:aa:55:00:00
649 actor sys_priority: 65534
651 actor port_priority: 65535
653 actor state: activity timeout aggregation synchronized collecting distributing
655 partner sys_id: aa:66:aa:66:00:00
656 partner sys_priority: 65534
658 partner port_priority: 65535
660 partner state: activity timeout aggregation synchronized collecting distributing
662 status: active negotiated
663 sys_id: aa:66:aa:66:00:00
668 member: p2: current attached
673 actor sys_id: aa:66:aa:66:00:00
674 actor sys_priority: 65534
676 actor port_priority: 65535
678 actor state: activity timeout aggregation synchronized collecting distributing
680 partner sys_id: aa:55:aa:55:00:00
681 partner sys_priority: 65534
683 partner port_priority: 65535
685 partner state: activity timeout aggregation synchronized collecting distributing
687 member: p3: current attached
692 actor sys_id: aa:66:aa:66:00:00
693 actor sys_priority: 65534
695 actor port_priority: 65535
697 actor state: activity timeout aggregation synchronized collecting distributing
699 partner sys_id: aa:55:aa:55:00:00
700 partner sys_priority: 65534
702 partner port_priority: 65535
704 partner state: activity timeout aggregation synchronized collecting distributing
706 bond_mode: balance-tcp
707 bond may use recirculation: yes, <del>
709 lb_output action: disabled, bond-id: -1
712 lacp_status: negotiated
713 lacp_fallback_ab: false
714 active-backup primary: <none>
715 <active member mac del>
725 bond_mode: balance-tcp
726 bond may use recirculation: yes, <del>
728 lb_output action: disabled, bond-id: -1
731 lacp_status: negotiated
732 lacp_fallback_ab: false
733 active-backup primary: <none>
734 <active member mac del>
748 # test lacp liveness propagation - OF1.3.
749 AT_SETUP([lacp - liveness propagation - OF1.3])
751 AT_CHECK([ovs-ofctl -O OpenFlow13 -P standard monitor br0 --detach --no-chdir --pidfile])
753 printf '\n\n--- check_liveness %d ---\n\n\n' $1
756 echo >>expout "OFPT_PORT_STATUS (OF1.3): MOD: 1(p0): addr:
759 speed: 0 Mbps now, 0 Mbps max"
763 s/ (xid=0x[0-9a-fA-F]*)//
765 s/addr:[0-9a-fA-F:]*/addr:/' < monitor.log|grep -A3 "MOD: 1(p0)"|grep -ve --]],
769 ovs-appctl -t ovs-ofctl ofctl/barrier
770 ovs-appctl -t ovs-ofctl ofctl/set-output-file monitor.log
771 # Set miss_send_len to 128, enabling port_status messages to our service connection.
772 ovs-appctl -t ovs-ofctl ofctl/send 0409000c0123456700000080
774 # Create bond0 on br0 with members p0 and p1
775 # and bond1 on br1 with members p2 and p3
776 # with p0 patched to p2 and p1 patched to p3.
777 AT_CHECK([ovs-vsctl add-bond br0 bond0 p0 p1 bond_mode=balance-tcp lacp=active \
778 other-config:lacp-time=fast \
779 other-config:bond-rebalance-interval=0 -- \
780 set interface p0 type=patch options:peer=p2 ofport_request=1 \
781 other-config:lacp-aggregation-key=2 -- \
782 set interface p1 type=patch options:peer=p3 ofport_request=2 \
783 other-config:lacp-aggregation-key=2 -- \
785 set bridge br1 other-config:hwaddr=aa:66:aa:66:00:00 -- \
786 set bridge br1 datapath-type=dummy other-config:datapath-id=1234 \
787 fail-mode=secure -- \
788 add-bond br1 bond1 p2 p3 bond_mode=balance-tcp lacp=active \
789 other-config:lacp-time=fast \
790 other-config:bond-rebalance-interval=0 -- \
791 set interface p2 type=patch options:peer=p0 ofport_request=3 \
792 other-config:lacp-aggregation-key=4 -- \
793 set interface p3 type=patch options:peer=p1 ofport_request=4 \
794 other-config:lacp-aggregation-key=4 --])
796 AT_CHECK([ovs-appctl netdev-dummy/set-admin-state up], 0, [OK
800 # Wait for up to 5 (simulated) seconds, until LACP negotiation finishes.
803 ovs-appctl lacp/show bond0 > bond0
804 AT_CAPTURE_FILE([bond0])
805 ovs-appctl lacp/show bond1 > bond1
806 AT_CAPTURE_FILE([bond1])
807 if grep negotiated bond0 && grep negotiated bond1; then
808 if grep expired bond0 || grep expired bond1; then
815 if test $i = 50; then
818 ovs-appctl time/warp 100
820 check_liveness 1 LIVE
822 # Makes LACP state "expired" for p0 and p2.
823 AT_CHECK([ovs-vsctl \
824 -- add-port br0 null0 -- set int null0 type=patch options:peer=p2 -- set int p2 options:peer=null0 \
825 -- add-port br1 null1 -- set int null1 type=patch options:peer=p0 -- set int p0 options:peer=null1])
827 # Wait 4 more simulated seconds. The LACP state should become "defaulted" for p0 and p2.
828 ovs-appctl time/warp 4100 100
831 # Reconnect the patch link between p0 and p2 to allow traffic between the ports.
832 AT_CHECK([ovs-vsctl \
833 -- del-port null0 -- set int p2 options:peer=p0 \
834 -- del-port null1 -- set int p0 options:peer=p2])
836 # Wait for 30 more seconds (LACP_SLOW_TIME_TX) for the lacp to renegotiate
837 ovs-appctl time/warp 30100 100
838 check_liveness 3 LIVE
843 # test lacp liveness propagation - OF1.4.
844 AT_SETUP([lacp - liveness propagation - OF1.4])
846 AT_CHECK([ovs-ofctl -O OpenFlow14 -P standard monitor br0 --detach --no-chdir --pidfile])
848 printf '\n\n--- check_liveness %d ---\n\n\n' $1
851 echo >>expout "OFPT_PORT_STATUS (OF1.4): MOD: 1(p0): addr:
854 speed: 0 Mbps now, 0 Mbps max"
858 s/ (xid=0x[0-9a-fA-F]*)//
860 s/addr:[0-9a-fA-F:]*/addr:/' < monitor.log|grep -A3 "MOD: 1(p0)"|grep -ve --]],
864 ovs-appctl -t ovs-ofctl ofctl/barrier
865 ovs-appctl -t ovs-ofctl ofctl/set-output-file monitor.log
866 # Set miss_send_len to 128, enabling port_status messages to our service connection.
867 ovs-appctl -t ovs-ofctl ofctl/send 0509000c0123456700000080
869 # Create bond0 on br0 with members p0 and p1
870 # and bond1 on br1 with members p2 and p3
871 # with p0 patched to p2 and p1 patched to p3.
872 AT_CHECK([ovs-vsctl add-bond br0 bond0 p0 p1 bond_mode=balance-tcp lacp=active \
873 other-config:lacp-time=fast \
874 other-config:bond-rebalance-interval=0 -- \
875 set interface p0 type=patch options:peer=p2 ofport_request=1 \
876 other-config:lacp-aggregation-key=2 -- \
877 set interface p1 type=patch options:peer=p3 ofport_request=2 \
878 other-config:lacp-aggregation-key=2 -- \
880 set bridge br1 other-config:hwaddr=aa:66:aa:66:00:00 -- \
881 set bridge br1 datapath-type=dummy other-config:datapath-id=1234 \
882 fail-mode=secure -- \
883 add-bond br1 bond1 p2 p3 bond_mode=balance-tcp lacp=active \
884 other-config:lacp-time=fast \
885 other-config:bond-rebalance-interval=0 -- \
886 set interface p2 type=patch options:peer=p0 ofport_request=3 \
887 other-config:lacp-aggregation-key=4 -- \
888 set interface p3 type=patch options:peer=p1 ofport_request=4 \
889 other-config:lacp-aggregation-key=4 --])
891 AT_CHECK([ovs-appctl netdev-dummy/set-admin-state up], 0, [OK
895 # Wait for up to 5 (simulated) seconds, until LACP negotiation finishes.
898 ovs-appctl lacp/show bond0 > bond0
899 AT_CAPTURE_FILE([bond0])
900 ovs-appctl lacp/show bond1 > bond1
901 AT_CAPTURE_FILE([bond1])
902 if grep negotiated bond0 && grep negotiated bond1; then
903 if grep expired bond0 || grep expired bond1; then
910 if test $i = 50; then
913 ovs-appctl time/warp 100
915 check_liveness 1 LIVE
917 # Makes LACP state "expired" for p0 and p2.
918 AT_CHECK([ovs-vsctl \
919 -- add-port br0 null0 -- set int null0 type=patch options:peer=p2 -- set int p2 options:peer=null0 \
920 -- add-port br1 null1 -- set int null1 type=patch options:peer=p0 -- set int p0 options:peer=null1])
922 # Wait 4 more simulated seconds. The LACP state should become "defaulted" for p0 and p2.
923 ovs-appctl time/warp 4100 100
926 # Reconnect the patch link between p0 and p2 to allow traffic between the ports.
927 AT_CHECK([ovs-vsctl \
928 -- del-port null0 -- set int p2 options:peer=p0 \
929 -- del-port null1 -- set int p0 options:peer=p2])
931 # Wait for 30 more seconds (LACP_SLOW_TIME_TX) for the lacp to renegotiate
932 ovs-appctl time/warp 30100 100
933 check_liveness 3 LIVE
938 # test lacp liveness propagation - OF1.5.
939 AT_SETUP([lacp - liveness propagation - OF1.5])
941 AT_CHECK([ovs-ofctl -O OpenFlow15 -P standard monitor br0 --detach --no-chdir --pidfile])
943 printf '\n\n--- check_liveness %d ---\n\n\n' $1
946 echo >>expout "OFPT_PORT_STATUS (OF1.5): MOD: 1(p0): addr:
949 speed: 0 Mbps now, 0 Mbps max"
953 s/ (xid=0x[0-9a-fA-F]*)//
955 s/addr:[0-9a-fA-F:]*/addr:/' < monitor.log|grep -A3 "MOD: 1(p0)"|grep -ve --]],
959 ovs-appctl -t ovs-ofctl ofctl/barrier
960 ovs-appctl -t ovs-ofctl ofctl/set-output-file monitor.log
961 # Set miss_send_len to 128, enabling port_status messages to our service connection.
962 ovs-appctl -t ovs-ofctl ofctl/send 0609000c0123456700000080
964 # Create bond0 on br0 with members p0 and p1
965 # and bond1 on br1 with members p2 and p3
966 # with p0 patched to p2 and p1 patched to p3.
967 AT_CHECK([ovs-vsctl add-bond br0 bond0 p0 p1 bond_mode=balance-tcp lacp=active \
968 other-config:lacp-time=fast \
969 other-config:bond-rebalance-interval=0 -- \
970 set interface p0 type=patch options:peer=p2 ofport_request=1 \
971 other-config:lacp-aggregation-key=2 -- \
972 set interface p1 type=patch options:peer=p3 ofport_request=2 \
973 other-config:lacp-aggregation-key=2 -- \
975 set bridge br1 other-config:hwaddr=aa:66:aa:66:00:00 -- \
976 set bridge br1 datapath-type=dummy other-config:datapath-id=1234 \
977 fail-mode=secure -- \
978 add-bond br1 bond1 p2 p3 bond_mode=balance-tcp lacp=active \
979 other-config:lacp-time=fast \
980 other-config:bond-rebalance-interval=0 -- \
981 set interface p2 type=patch options:peer=p0 ofport_request=3 \
982 other-config:lacp-aggregation-key=4 -- \
983 set interface p3 type=patch options:peer=p1 ofport_request=4 \
984 other-config:lacp-aggregation-key=4 --])
986 AT_CHECK([ovs-appctl netdev-dummy/set-admin-state up], 0, [OK
990 # Wait for up to 5 (simulated) seconds, until LACP negotiation finishes.
993 ovs-appctl lacp/show bond0 > bond0
994 AT_CAPTURE_FILE([bond0])
995 ovs-appctl lacp/show bond1 > bond1
996 AT_CAPTURE_FILE([bond1])
997 if grep negotiated bond0 && grep negotiated bond1; then
998 if grep expired bond0 || grep expired bond1; then
1005 if test $i = 50; then
1008 ovs-appctl time/warp 100
1010 check_liveness 1 LIVE
1012 # Makes LACP state "expired" for p0 and p2.
1013 AT_CHECK([ovs-vsctl \
1014 -- add-port br0 null0 -- set int null0 type=patch options:peer=p2 -- set int p2 options:peer=null0 \
1015 -- add-port br1 null1 -- set int null1 type=patch options:peer=p0 -- set int p0 options:peer=null1])
1017 # Wait 4 more simulated seconds. The LACP state should become "defaulted" for p0 and p2.
1018 ovs-appctl time/warp 4100 100
1021 # Reconnect the patch link between p0 and p2 to allow traffic between the ports.
1022 AT_CHECK([ovs-vsctl \
1023 -- del-port null0 -- set int p2 options:peer=p0 \
1024 -- del-port null1 -- set int p0 options:peer=p2])
1026 # Wait for 30 more seconds (LACP_SLOW_TIME_TX) for the lacp to renegotiate
1027 ovs-appctl time/warp 30100 100
1028 check_liveness 3 LIVE