summaryrefslogtreecommitdiff
path: root/ofproto/fail-open.c
diff options
context:
space:
mode:
authorBen Pfaff <blp@ovn.org>2016-01-18 20:12:30 -0800
committerBen Pfaff <blp@ovn.org>2016-01-20 10:02:48 -0800
commita2b53dec11a6d001fd024ba8729de5c63bd2b6a1 (patch)
tree68fbe6f19fc3167c80c2e48661ff346e025359f7 /ofproto/fail-open.c
parent9bfe933472a784cd6b3f946afc3eed73d74f6a7d (diff)
downloadopenvswitch-a2b53dec11a6d001fd024ba8729de5c63bd2b6a1.tar.gz
connmgr: Generalize ofproto_packet_in to ofproto_async_msg.
An upcoming commit will add another kind of asynchronous message that should be handled in the same way as packet-ins. Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'ofproto/fail-open.c')
-rw-r--r--ofproto/fail-open.c28
1 files changed, 16 insertions, 12 deletions
diff --git a/ofproto/fail-open.c b/ofproto/fail-open.c
index 5a692bfec..a28acefdc 100644
--- a/ofproto/fail-open.c
+++ b/ofproto/fail-open.c
@@ -125,19 +125,23 @@ send_bogus_packet_ins(struct fail_open *fo)
eth_addr_nicira_random(&mac);
compose_rarp(&b, mac);
- struct ofproto_packet_in pin = {
- .up = {
- .packet = dp_packet_data(&b),
- .len = dp_packet_size(&b),
- .flow_metadata = MATCH_CATCHALL_INITIALIZER,
- .flow_metadata.flow.in_port.ofp_port = OFPP_LOCAL,
- .flow_metadata.wc.masks.in_port.ofp_port = u16_to_ofp(UINT16_MAX),
- .reason = OFPR_NO_MATCH,
- .cookie = OVS_BE64_MAX,
- },
- .max_len = UINT16_MAX,
+ struct ofproto_async_msg am = {
+ .oam = OAM_PACKET_IN,
+ .pin = {
+ .up = {
+ .packet = dp_packet_data(&b),
+ .len = dp_packet_size(&b),
+ .flow_metadata = MATCH_CATCHALL_INITIALIZER,
+ .flow_metadata.flow.in_port.ofp_port = OFPP_LOCAL,
+ .flow_metadata.wc.masks.in_port.ofp_port
+ = u16_to_ofp(UINT16_MAX),
+ .reason = OFPR_NO_MATCH,
+ .cookie = OVS_BE64_MAX,
+ },
+ .max_len = UINT16_MAX,
+ }
};
- connmgr_send_packet_in(fo->connmgr, &pin);
+ connmgr_send_async_msg(fo->connmgr, &am);
dp_packet_uninit(&b);
}