diff options
author | Ben Pfaff <blp@nicira.com> | 2012-07-24 16:15:37 -0700 |
---|---|---|
committer | Ben Pfaff <blp@nicira.com> | 2012-08-07 12:41:58 -0700 |
commit | 002c3f1734454492d921de29f2d5be6428ed1a18 (patch) | |
tree | 4a925075d45d995db0a5da187c007d43bb42eab2 /lib/learning-switch.h | |
parent | 733c8ed3b95e54f9245dc7175fc89cee672f9405 (diff) |
learning-switch: Make lswitch own its rconn.
Until now, ovs-controller and the learning-switch code split responsibility
for the OpenFlow connection. This commit moves all the responsibility into
the learning-switch code.
The rationale here is twofold. First, the split itself seems odd; I think
there must have been a reason for it at one time, but I don't remember it
and don't see one anymore. Second, I intend to make the lswitch code more
stateful in upcoming commits, and it seems odd to have the lswitch manage
quite a bit of state but not the entity that that state applies to.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'lib/learning-switch.h')
-rw-r--r-- | lib/learning-switch.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/learning-switch.h b/lib/learning-switch.h index 1b760d8e..dcfb5a27 100644 --- a/lib/learning-switch.h +++ b/lib/learning-switch.h @@ -57,15 +57,19 @@ struct lswitch_config { /* Maps from a port name to a queue_id. */ const struct simap *port_queues; + + /* If true, do not reply to any messages from the switch (for debugging + * fail-open mode). */ + bool mute; }; struct lswitch *lswitch_create(struct rconn *, const struct lswitch_config *); +bool lswitch_is_alive(const struct lswitch *); void lswitch_set_queue(struct lswitch *sw, uint32_t queue); void lswitch_run(struct lswitch *); void lswitch_wait(struct lswitch *); void lswitch_destroy(struct lswitch *); -void lswitch_process_packet(struct lswitch *, struct rconn *, - const struct ofpbuf *); +void lswitch_mute(struct lswitch *); #endif /* learning-switch.h */ |