3 AT_SETUP([ofproto - echo request])
5 AT_CHECK([ovs-ofctl -vANY:ANY:WARN probe br0])
9 AT_SETUP([ofproto - feature request, config request])
11 AT_CHECK([ovs-ofctl -vANY:ANY:WARN show br0], [0], [stdout])
12 AT_CHECK([STRIP_XIDS stdout], [0], [dnl
13 OFPT_FEATURES_REPLY: dpid:fedcba9876543210
14 n_tables:255, n_buffers:256
15 capabilities: FLOW_STATS TABLE_STATS PORT_STATS QUEUE_STATS ARP_MATCH_IP
16 actions: OUTPUT SET_VLAN_VID SET_VLAN_PCP STRIP_VLAN SET_DL_SRC SET_DL_DST SET_NW_SRC SET_NW_DST SET_NW_TOS SET_TP_SRC SET_TP_DST ENQUEUE
17 LOCAL(br0): addr:aa:55:aa:55:00:00
20 speed: 100 Mbps now, 100 Mbps max
21 OFPT_GET_CONFIG_REPLY: frags=normal miss_send_len=0
26 dnl This is really bare-bones.
27 dnl It at least checks request and reply serialization and deserialization.
28 AT_SETUP([ofproto - port stats])
30 AT_CHECK([ovs-ofctl -vANY:ANY:WARN dump-ports br0], [0], [stdout])
31 AT_CHECK([STRIP_XIDS stdout], [0], [dnl
32 OFPST_PORT reply: 1 ports
33 port 65534: rx pkts=0, bytes=0, drop=0, errs=0, frame=0, over=0, crc=0
34 tx pkts=0, bytes=0, drop=0, errs=0, coll=0
39 dnl This is really bare-bones.
40 dnl It at least checks request and reply serialization and deserialization.
41 AT_SETUP([ofproto - queue stats])
43 AT_CHECK([ovs-ofctl -vANY:ANY:WARN queue-stats br0], [0], [stdout])
44 AT_CHECK([STRIP_XIDS stdout], [0], [dnl
45 OFPST_QUEUE reply: 0 queues
50 AT_SETUP([ofproto - mod-port])
52 for command_config_state in \
54 'noflood NO_FLOOD 0' \
55 'down PORT_DOWN,NO_FLOOD LINK_DOWN' \
56 'flood PORT_DOWN LINK_DOWN'
58 set $command_config_state
59 command=$[1] config=`echo $[2] | sed 's/,/ /g'` state=$[3]
60 AT_CHECK([ovs-ofctl -vANY:ANY:WARN mod-port br0 br0 $command])
61 AT_CHECK([ovs-ofctl -vANY:ANY:WARN show br0], [0], [stdout])
62 AT_CHECK_UNQUOTED([STRIP_XIDS stdout], [0], [dnl
63 OFPT_FEATURES_REPLY: dpid:fedcba9876543210
64 n_tables:255, n_buffers:256
65 capabilities: FLOW_STATS TABLE_STATS PORT_STATS QUEUE_STATS ARP_MATCH_IP
66 actions: OUTPUT SET_VLAN_VID SET_VLAN_PCP STRIP_VLAN SET_DL_SRC SET_DL_DST SET_NW_SRC SET_NW_DST SET_NW_TOS SET_TP_SRC SET_TP_DST ENQUEUE
67 LOCAL(br0): addr:aa:55:aa:55:00:00
70 speed: 100 Mbps now, 100 Mbps max
71 OFPT_GET_CONFIG_REPLY: frags=normal miss_send_len=0
77 AT_SETUP([ofproto - basic flow_mod commands (NXM)])
79 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip], [0], [NXST_FLOW reply:
81 AT_CHECK([echo 'in_port=1,actions=0' | ovs-ofctl add-flows br0 -])
82 AT_CHECK([ovs-ofctl add-flow br0 in_port=0,actions=1])
83 AT_CHECK([ovs-ofctl -F nxm add-flow br0 table=1,in_port=3,actions=2])
84 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
85 in_port=0 actions=output:1
86 in_port=1 actions=output:0
87 table=1, in_port=3 actions=output:2
90 AT_CHECK([ovs-ofctl dump-aggregate br0 table=0 | STRIP_XIDS], [0], [dnl
91 NXST_AGGREGATE reply: packet_count=0 byte_count=0 flow_count=2
93 AT_CHECK([ovs-ofctl del-flows br0])
94 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip], [0], [NXST_FLOW reply:
99 AT_SETUP([ofproto - basic flow_mod commands (OpenFlow 1.0)])
101 AT_CHECK([ovs-ofctl -F openflow10 dump-flows br0 | ofctl_strip], [0], [OFPST_FLOW reply:
103 AT_CHECK([echo 'in_port=1,actions=0' | ovs-ofctl -F openflow10 add-flows br0 -])
104 AT_CHECK([ovs-ofctl -F openflow10 add-flow br0 in_port=0,actions=1])
105 AT_CHECK([ovs-ofctl -F openflow10 add-flow br0 table=1,in_port=3,actions=2])
106 AT_CHECK([ovs-ofctl -F openflow10 dump-flows br0 | ofctl_strip | sort], [0], [dnl
107 in_port=0 actions=output:1
108 in_port=1 actions=output:0
109 table=1, in_port=3 actions=output:2
112 AT_CHECK([ovs-ofctl -F openflow10 dump-aggregate br0 table=0 | STRIP_XIDS], [0], [dnl
113 OFPST_AGGREGATE reply: packet_count=0 byte_count=0 flow_count=2
115 AT_CHECK([ovs-ofctl -F openflow10 del-flows br0])
116 AT_CHECK([ovs-ofctl -F openflow10 dump-flows br0 | ofctl_strip], [0], [OFPST_FLOW reply:
121 AT_SETUP([ofproto - dump flows with cookie])
123 AT_CHECK([ovs-ofctl add-flow br0 cookie=0x1,in_port=1,actions=0])
124 AT_CHECK([ovs-ofctl add-flow br0 cookie=0x2,in_port=2,actions=0])
125 AT_CHECK([ovs-ofctl add-flow br0 cookie=0x3,in_port=3,actions=0])
126 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
127 cookie=0x1, in_port=1 actions=output:0
128 cookie=0x2, in_port=2 actions=output:0
129 cookie=0x3, in_port=3 actions=output:0
132 AT_CHECK([ovs-ofctl dump-aggregate br0 table=0 | STRIP_XIDS], [0], [dnl
133 NXST_AGGREGATE reply: packet_count=0 byte_count=0 flow_count=3
135 AT_CHECK([ovs-ofctl dump-flows br0 cookie=0x3 | ofctl_strip | sort], [0], [dnl
136 cookie=0x3, in_port=3 actions=output:0
139 AT_CHECK([ovs-ofctl dump-aggregate br0 cookie=0x3 | STRIP_XIDS], [0], [dnl
140 NXST_AGGREGATE reply: packet_count=0 byte_count=0 flow_count=1
145 AT_SETUP([ofproto - dump flows with cookie mask])
147 AT_CHECK([ovs-ofctl add-flow br0 cookie=0x1,in_port=1,actions=0])
148 AT_CHECK([ovs-ofctl add-flow br0 cookie=0x2,in_port=2,actions=0])
149 AT_CHECK([ovs-ofctl add-flow br0 cookie=0x3,in_port=3,actions=0])
150 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
151 cookie=0x1, in_port=1 actions=output:0
152 cookie=0x2, in_port=2 actions=output:0
153 cookie=0x3, in_port=3 actions=output:0
156 AT_CHECK([ovs-ofctl dump-aggregate br0 table=0 | STRIP_XIDS], [0], [dnl
157 NXST_AGGREGATE reply: packet_count=0 byte_count=0 flow_count=3
159 AT_CHECK([ovs-ofctl dump-flows br0 cookie=0x3/0x1 | ofctl_strip | sort], [0], [dnl
160 cookie=0x1, in_port=1 actions=output:0
161 cookie=0x3, in_port=3 actions=output:0
164 AT_CHECK([ovs-ofctl dump-aggregate br0 cookie=0x3/0x1 | STRIP_XIDS], [0], [dnl
165 NXST_AGGREGATE reply: packet_count=0 byte_count=0 flow_count=2
170 AT_SETUP([ofproto - del flows with cookie])
172 AT_CHECK([ovs-ofctl add-flow br0 cookie=0x1,in_port=1,actions=0])
173 AT_CHECK([ovs-ofctl add-flow br0 cookie=0x2,in_port=2,actions=0])
174 AT_CHECK([ovs-ofctl add-flow br0 cookie=0x3,in_port=3,actions=0])
175 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
176 cookie=0x1, in_port=1 actions=output:0
177 cookie=0x2, in_port=2 actions=output:0
178 cookie=0x3, in_port=3 actions=output:0
182 AT_CHECK([ovs-ofctl del-flows br0 cookie=0x3])
183 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
184 cookie=0x1, in_port=1 actions=output:0
185 cookie=0x2, in_port=2 actions=output:0
191 AT_SETUP([ofproto - del flows with cookie mask])
193 AT_CHECK([ovs-ofctl add-flow br0 cookie=0x1,in_port=1,actions=0])
194 AT_CHECK([ovs-ofctl add-flow br0 cookie=0x2,in_port=2,actions=0])
195 AT_CHECK([ovs-ofctl add-flow br0 cookie=0x3,in_port=3,actions=0])
196 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
197 cookie=0x1, in_port=1 actions=output:0
198 cookie=0x2, in_port=2 actions=output:0
199 cookie=0x3, in_port=3 actions=output:0
202 AT_CHECK([ovs-ofctl del-flows br0 cookie=0x3/0x1])
203 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
204 cookie=0x2, in_port=2 actions=output:0
210 AT_SETUP([ofproto - flow table configuration])
212 # Check the default configuration.
213 (echo "OFPST_TABLE reply (xid=0x1): 255 tables
214 0: classifier: wild=0x3fffff, max=1000000, active=0
217 while test $x -lt 255; do
218 printf " %d: %-8s: wild=0x3fffff, max=1000000, active=0
223 AT_CHECK([ovs-ofctl dump-tables br0], [0], [expout])
224 # Change the configuration.
227 -- --id=@t0 create Flow_Table name=main \
228 -- --id=@t1 create Flow_Table flow-limit=1024 \
229 -- set bridge br0 'flow_tables={1=@t1,0=@t0}' \
230 | perl $srcdir/uuidfilt.pl],
234 # Check that the configuration was updated.
235 mv expout orig-expout
236 (echo "OFPST_TABLE reply (xid=0x1): 255 tables
237 0: main : wild=0x3fffff, max=1000000, active=0
239 1: table1 : wild=0x3fffff, max= 1024, active=0
241 tail -n +6 orig-expout) > expout
242 AT_CHECK([ovs-ofctl dump-tables br0], [0], [expout])
246 AT_SETUP([ofproto - hard limits on flow table size])
248 # Configure a maximum of 4 flows.
251 -- --id=@t0 create Flow_Table flow-limit=4 \
252 -- set bridge br0 flow_tables:0=@t0 \
253 | perl $srcdir/uuidfilt.pl],
257 for in_port in 1 2 3 4; do
258 ovs-ofctl add-flow br0 in_port=$in_port,actions=drop
260 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
261 in_port=1 actions=drop
262 in_port=2 actions=drop
263 in_port=3 actions=drop
264 in_port=4 actions=drop
267 # Adding another flow will be refused.
268 AT_CHECK([ovs-ofctl add-flow br0 in_port=5,actions=drop], [1], [], [stderr])
269 AT_CHECK([head -n 1 stderr | ofctl_strip], [0],
270 [OFPT_ERROR: OFPFMFC_ALL_TABLES_FULL
272 # Also a mod-flow that would add a flow will be refused.
273 AT_CHECK([ovs-ofctl mod-flows br0 in_port=5,actions=drop], [1], [], [stderr])
274 AT_CHECK([head -n 1 stderr | ofctl_strip], [0],
275 [OFPT_ERROR: OFPFMFC_ALL_TABLES_FULL
277 # Replacing or modifying an existing flow is allowed.
278 AT_CHECK([ovs-ofctl add-flow br0 in_port=4,actions=normal])
279 AT_CHECK([ovs-ofctl mod-flows br0 in_port=3,actions=output:1])
280 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
281 in_port=1 actions=drop
282 in_port=2 actions=drop
283 in_port=3 actions=output:1
284 in_port=4 actions=NORMAL
290 AT_SETUP([ofproto - eviction upon table overflow])
292 # Configure a maximum of 4 flows.
295 -- --id=@t0 create Flow_Table flow-limit=4 overflow-policy=evict \
296 -- set bridge br0 flow_tables:0=@t0 \
297 | perl $srcdir/uuidfilt.pl],
301 for in_port in 4 3 2 1; do
302 ovs-ofctl add-flow br0 idle_timeout=${in_port}0,in_port=$in_port,actions=drop
304 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
305 idle_timeout=10,in_port=1 actions=drop
306 idle_timeout=20,in_port=2 actions=drop
307 idle_timeout=30,in_port=3 actions=drop
308 idle_timeout=40,in_port=4 actions=drop
311 # Adding another flow will cause the one that expires soonest to be evicted.
312 AT_CHECK([ovs-ofctl add-flow br0 in_port=5,actions=drop])
313 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
314 idle_timeout=20,in_port=2 actions=drop
315 idle_timeout=30,in_port=3 actions=drop
316 idle_timeout=40,in_port=4 actions=drop
317 in_port=5 actions=drop
320 # A mod-flow that adds a flow also causes eviction, but replacing or
321 # modifying an existing flow doesn't.
322 AT_CHECK([ovs-ofctl mod-flows br0 in_port=6,actions=drop])
323 AT_CHECK([ovs-ofctl add-flow br0 in_port=4,actions=normal])
324 AT_CHECK([ovs-ofctl mod-flows br0 in_port=3,actions=output:1])
325 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
326 idle_timeout=30,in_port=3 actions=output:1
327 in_port=4 actions=NORMAL
328 in_port=5 actions=drop
329 in_port=6 actions=drop
332 # Flows with no timeouts at all cannot be evicted.
333 AT_CHECK([ovs-ofctl add-flow br0 in_port=7,actions=normal])
334 AT_CHECK([ovs-ofctl add-flow br0 in_port=8,actions=drop], [1], [], [stderr])
335 AT_CHECK([head -n 1 stderr | ofctl_strip], [0],
336 [OFPT_ERROR: OFPFMFC_ALL_TABLES_FULL
338 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
339 in_port=4 actions=NORMAL
340 in_port=5 actions=drop
341 in_port=6 actions=drop
342 in_port=7 actions=NORMAL
348 AT_SETUP([ofproto - eviction upon table overflow, with fairness])
350 # Configure a maximum of 4 flows.
353 -- --id=@t0 create Flow_Table name=evict flow-limit=4 \
354 overflow-policy=evict \
355 groups='"NXM_OF_IN_PORT[[]]"' \
356 -- set bridge br0 flow_tables:0=@t0 \
357 | perl $srcdir/uuidfilt.pl],
361 ovs-ofctl add-flows br0 - <<EOF
362 idle_timeout=10 in_port=2 dl_src=00:44:55:66:77:88 actions=drop
363 idle_timeout=20 in_port=1 dl_src=00:11:22:33:44:55 actions=drop
364 idle_timeout=30 in_port=1 dl_src=00:22:33:44:55:66 actions=drop
365 idle_timeout=40 in_port=1 dl_src=00:33:44:55:66:77 actions=drop
367 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
368 idle_timeout=10,in_port=2,dl_src=00:44:55:66:77:88 actions=drop
369 idle_timeout=20,in_port=1,dl_src=00:11:22:33:44:55 actions=drop
370 idle_timeout=30,in_port=1,dl_src=00:22:33:44:55:66 actions=drop
371 idle_timeout=40,in_port=1,dl_src=00:33:44:55:66:77 actions=drop
374 # Adding another flow will cause the one that expires soonest within
375 # the largest group (those with in_port=1) to be evicted. In this
376 # case this is not the same as the one that expires soonest overall
377 # (which is what makes the test interesting):
378 AT_CHECK([ovs-ofctl add-flow br0 in_port=2,dl_src=00:55:66:77:88:99,actions=drop])
379 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
380 idle_timeout=10,in_port=2,dl_src=00:44:55:66:77:88 actions=drop
381 idle_timeout=30,in_port=1,dl_src=00:22:33:44:55:66 actions=drop
382 idle_timeout=40,in_port=1,dl_src=00:33:44:55:66:77 actions=drop
383 in_port=2,dl_src=00:55:66:77:88:99 actions=drop
386 # Enlarge the flow limit, change the eviction policy back to strictly
387 # based on expiration, and and add some flows.
388 AT_CHECK([ovs-vsctl set Flow_Table evict groups='[[]]' flow-limit=7])
389 ovs-ofctl add-flows br0 - <<EOF
390 idle_timeout=50 in_port=2 dl_src=00:66:77:88:99:aa actions=drop
391 idle_timeout=60 in_port=2 dl_src=00:77:88:99:aa:bb actions=drop
392 idle_timeout=70 in_port=2 dl_src=00:88:99:aa:bb:cc actions=drop
394 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
395 idle_timeout=10,in_port=2,dl_src=00:44:55:66:77:88 actions=drop
396 idle_timeout=30,in_port=1,dl_src=00:22:33:44:55:66 actions=drop
397 idle_timeout=40,in_port=1,dl_src=00:33:44:55:66:77 actions=drop
398 idle_timeout=50,in_port=2,dl_src=00:66:77:88:99:aa actions=drop
399 idle_timeout=60,in_port=2,dl_src=00:77:88:99:aa:bb actions=drop
400 idle_timeout=70,in_port=2,dl_src=00:88:99:aa:bb:cc actions=drop
401 in_port=2,dl_src=00:55:66:77:88:99 actions=drop
404 # Adding another flow will cause the one that expires soonest overall
406 AT_CHECK([ovs-ofctl add-flow br0 'idle_timeout=80 in_port=2 dl_src=00:99:aa:bb:cc:dd actions=drop'])
407 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
408 idle_timeout=30,in_port=1,dl_src=00:22:33:44:55:66 actions=drop
409 idle_timeout=40,in_port=1,dl_src=00:33:44:55:66:77 actions=drop
410 idle_timeout=50,in_port=2,dl_src=00:66:77:88:99:aa actions=drop
411 idle_timeout=60,in_port=2,dl_src=00:77:88:99:aa:bb actions=drop
412 idle_timeout=70,in_port=2,dl_src=00:88:99:aa:bb:cc actions=drop
413 idle_timeout=80,in_port=2,dl_src=00:99:aa:bb:cc:dd actions=drop
414 in_port=2,dl_src=00:55:66:77:88:99 actions=drop
417 # Reducing the flow limit also causes the flows that expire soonest
418 # overall to be evicted.
419 AT_CHECK([ovs-vsctl set Flow_Table evict flow-limit=4])
420 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
421 idle_timeout=60,in_port=2,dl_src=00:77:88:99:aa:bb actions=drop
422 idle_timeout=70,in_port=2,dl_src=00:88:99:aa:bb:cc actions=drop
423 idle_timeout=80,in_port=2,dl_src=00:99:aa:bb:cc:dd actions=drop
424 in_port=2,dl_src=00:55:66:77:88:99 actions=drop
430 AT_SETUP([ofproto - asynchronous message control])
432 AT_CHECK([ovs-ofctl -P openflow10 monitor br0 --detach --no-chdir --pidfile])
434 printf '\n\n--- check_async %d ---\n\n\n' $1
437 ovs-appctl -t ovs-ofctl ofctl/set-output-file monitor.log
440 # OFPT_PACKET_IN, OFPR_ACTION (controller_id=0)
441 ovs-ofctl -v packet-out br0 none controller '0001020304050010203040501234'
442 if test X"$1" = X"OFPR_ACTION"; then shift;
443 echo >>expout "OFPT_PACKET_IN: total_len=14 in_port=NONE (via action) data_len=14 (unbuffered)
444 priority:0,tunnel:0,in_port:0000,tci(0) mac(00:10:20:30:40:50->00:01:02:03:04:05) type:1234 proto:0 tos:0 ttl:0 ip(0.0.0.0->0.0.0.0)"
447 # OFPT_PACKET_IN, OFPR_NO_MATCH (controller_id=123)
448 ovs-ofctl -v packet-out br0 none 'controller(reason=no_match,id=123)' '0001020304050010203040501234'
449 if test X"$1" = X"OFPR_NO_MATCH"; then shift;
450 echo >>expout "OFPT_PACKET_IN: total_len=14 in_port=NONE (via no_match) data_len=14 (unbuffered)
451 priority:0,tunnel:0,in_port:0000,tci(0) mac(00:10:20:30:40:50->00:01:02:03:04:05) type:1234 proto:0 tos:0 ttl:0 ip(0.0.0.0->0.0.0.0)"
454 # OFPT_PACKET_IN, OFPR_INVALID_TTL (controller_id=0)
455 ovs-ofctl packet-out br0 none dec_ttl '002583dfb4000026b98cb0f908004500003fb7e200000011339bac11370dac100002d7730035002b8f6d86fb0100000100000000000006626c702d7873066e696369726103636f6d00000f00'
456 if test X"$1" = X"OFPR_INVALID_TTL"; then shift;
457 echo >>expout "OFPT_PACKET_IN: total_len=76 in_port=NONE (via invalid_ttl) data_len=76 (unbuffered)
458 priority:0,tunnel:0,in_port:0000,tci(0) mac(00:26:b9:8c:b0:f9->00:25:83:df:b4:00) type:0800 proto:17 tos:0 ttl:0 ip(172.17.55.13->172.16.0.2) port(55155->53) udp_csum:8f6d"
461 # OFPT_PORT_STATUS, OFPPR_ADD
462 ovs-vsctl add-port br0 test -- set Interface test type=dummy
463 if test X"$1" = X"OFPPR_ADD"; then shift;
464 echo >>expout "OFPT_PORT_STATUS: ADD: 1(test): addr:aa:55:aa:55:00:0x
467 speed: 100 Mbps now, 100 Mbps max"
470 # OFPT_PORT_STATUS, OFPPR_DELETE
471 ovs-vsctl del-port br0 test
472 if test X"$1" = X"OFPPR_DELETE"; then shift;
473 echo >>expout "OFPT_PORT_STATUS: DEL: 1(test): addr:aa:55:aa:55:00:0x
476 speed: 100 Mbps now, 100 Mbps max"
479 # OFPT_FLOW_REMOVED, OFPRR_DELETE
480 ovs-ofctl add-flow br0 send_flow_rem,actions=drop
481 ovs-ofctl --strict del-flows br0 ''
482 if test X"$1" = X"OFPRR_DELETE"; then shift;
483 echo >>expout "OFPT_FLOW_REMOVED: reason=delete"
485 AT_FAIL_IF([test X"$1" != X])
487 ovs-appctl -t ovs-ofctl ofctl/barrier
488 echo >>expout "OFPT_BARRIER_REPLY:"
492 s/ (xid=0x[0-9a-fA-F]*)//
494 s/00:0.$/00:0x/' < monitor.log]],
498 # It's a service connection so initially there should be no async messages.
501 # Set miss_send_len to 128, turning on packet-outs for our service connection.
502 ovs-appctl -t ovs-ofctl ofctl/send 0109000c0123456700000080
503 check_async 2 OFPR_ACTION OFPPR_ADD OFPPR_DELETE OFPRR_DELETE
505 # Set miss_send_len to 128 and enable invalid_ttl.
506 ovs-appctl -t ovs-ofctl ofctl/send 0109000c0123456700040080
507 check_async 3 OFPR_ACTION OFPR_INVALID_TTL OFPPR_ADD OFPPR_DELETE OFPRR_DELETE
509 # Become slave, which should disable everything except port status.
510 ovs-appctl -t ovs-ofctl ofctl/send 0104001400000002000023200000000a00000002
511 check_async 4 OFPPR_ADD OFPPR_DELETE
513 # Use NXT_SET_ASYNC_CONFIG to enable a patchwork of asynchronous messages.
514 ovs-appctl -t ovs-ofctl ofctl/send 01040028000000020000232000000013000000020000000500000005000000020000000200000005
515 check_async 5 OFPR_INVALID_TTL OFPPR_DELETE OFPRR_DELETE
517 # Set controller ID 123.
518 ovs-appctl -t ovs-ofctl ofctl/send 01040018000000030000232000000014000000000000007b
519 check_async 6 OFPR_NO_MATCH OFPPR_DELETE OFPRR_DELETE
521 # Restore controller ID 0.
522 ovs-appctl -t ovs-ofctl ofctl/send 010400180000000300002320000000140000000000000000
525 ovs-appctl -t ovs-ofctl ofctl/send 0104001400000002000023200000000a00000001
526 check_async 7 OFPR_ACTION OFPPR_ADD
528 ovs-appctl -t ovs-ofctl exit