From: Simon Horman Date: Fri, 26 Oct 2012 02:35:52 +0000 (+0900) Subject: connmgr: Parameterize ofservice_create() over allowed OpenFlow versions X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=00401ef0675e446712f4229cf38b5810ba428514;p=openvswitch connmgr: Parameterize ofservice_create() over allowed OpenFlow versions This is in preparation for allowing configuration of the allowed OpenFlow versions. Signed-off-by: Simon Horman Signed-off-by: Ben Pfaff --- diff --git a/ofproto/connmgr.c b/ofproto/connmgr.c index 5a0b0d3d..7897bb7f 100644 --- a/ofproto/connmgr.c +++ b/ofproto/connmgr.c @@ -137,7 +137,8 @@ struct ofservice { static void ofservice_reconfigure(struct ofservice *, const struct ofproto_controller *); -static int ofservice_create(struct connmgr *, const char *target, uint8_t dscp); +static int ofservice_create(struct connmgr *mgr, const char *target, + uint32_t allowed_versions, uint8_t dscp); static void ofservice_destroy(struct connmgr *, struct ofservice *); static struct ofservice *ofservice_lookup(struct connmgr *, const char *target); @@ -513,7 +514,7 @@ connmgr_set_controllers(struct connmgr *mgr, if (!ofservice_lookup(mgr, c->target)) { VLOG_INFO("%s: added service controller \"%s\"", mgr->name, c->target); - ofservice_create(mgr, c->target, c->dscp); + ofservice_create(mgr, c->target, 0, c->dscp); } } else { VLOG_WARN_RL(&rl, "%s: unsupported controller \"%s\"", @@ -1618,13 +1619,14 @@ connmgr_flushed(struct connmgr *mgr) * ofservice_reconfigure() must be called to fully configure the new * ofservice. */ static int -ofservice_create(struct connmgr *mgr, const char *target, uint8_t dscp) +ofservice_create(struct connmgr *mgr, const char *target, + uint32_t allowed_versions, uint8_t dscp) { struct ofservice *ofservice; struct pvconn *pvconn; int error; - error = pvconn_open(target, 0, &pvconn, dscp); + error = pvconn_open(target, allowed_versions, &pvconn, dscp); if (error) { return error; }