diff options
author | Ben Pfaff <blp@ovn.org> | 2018-10-24 14:23:38 -0700 |
---|---|---|
committer | Ben Pfaff <blp@ovn.org> | 2018-10-31 16:04:36 -0700 |
commit | af26093ab197c309dc0cfa83c5a2db34706f6021 (patch) | |
tree | 91ea48382bee5afa997066ec3deb96aeacbaaa2d /ofproto/ofproto.c | |
parent | 8645f9cd196aaedf1300f44e804c54a8ba7420c8 (diff) | |
download | openvswitch-af26093ab197c309dc0cfa83c5a2db34706f6021.tar.gz |
connmgr: Improve interface for setting controllers.
Using an shash instead of an array simplifies the code for both the caller
and the callee. Putting the set of allowed OpenFlow versions into the
ofproto_controller data structure also simplifies the overall function
interface slightly.
Tested-by: Yifeng Sun <pkusunyifeng@gmail.com>
Reviewed-by: Yifeng Sun <pkusunyifeng@gmail.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'ofproto/ofproto.c')
-rw-r--r-- | ofproto/ofproto.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c index 8b2e3ca97..222c74994 100644 --- a/ofproto/ofproto.c +++ b/ofproto/ofproto.c @@ -639,12 +639,9 @@ ofproto_set_datapath_id(struct ofproto *p, uint64_t datapath_id) } void -ofproto_set_controllers(struct ofproto *p, - const struct ofproto_controller *controllers, - size_t n_controllers, uint32_t allowed_versions) +ofproto_set_controllers(struct ofproto *p, struct shash *controllers) { - connmgr_set_controllers(p->connmgr, controllers, n_controllers, - allowed_versions); + connmgr_set_controllers(p->connmgr, controllers); } void |