* request OFP12_VERSION * Always send using OF1.2 * Reset ofconn to OF1.2 --- lib/ofp-util.c | 2 +- lib/vconn.c | 12 ++++++------ ofproto/connmgr.c | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/lib/ofp-util.c b/lib/ofp-util.c index 4e8536b..8f2aecf 100644 --- a/lib/ofp-util.c +++ b/lib/ofp-util.c @@ -3646,7 +3646,7 @@ put_openflow_xid(size_t openflow_len, uint8_t type, ovs_be32 xid, assert(openflow_len <= UINT16_MAX); oh = ofpbuf_put_uninit(buffer, openflow_len); - oh->version = OFP10_VERSION; + oh->version = OFP12_VERSION; oh->type = type; oh->length = htons(openflow_len); oh->xid = xid; diff --git a/lib/vconn.c b/lib/vconn.c index 5cd708d..1a579d2 100644 --- a/lib/vconn.c +++ b/lib/vconn.c @@ -214,7 +214,7 @@ vconn_verify_name(const char *name) * * The vconn will automatically negotiate an OpenFlow protocol version * acceptable to both peers on the connection. The version negotiated will be - * no lower than 'min_version' and no higher than OFP10_VERSION. + * no lower than 'min_version' and no higher than OFP12_VERSION. * * Returns 0 if successful, otherwise a positive errno value. If successful, * stores a pointer to the new connection in '*vconnp', otherwise a null @@ -417,13 +417,13 @@ vcs_recv_hello(struct vconn *vconn) ds_destroy(&msg); } - vconn->version = MIN(OFP10_VERSION, oh->version); + vconn->version = MIN(OFP12_VERSION, oh->version); if (vconn->version < vconn->min_version) { VLOG_WARN_RL(&bad_ofmsg_rl, "%s: version negotiation failed: we support " "versions 0x%02x to 0x%02x inclusive but peer " "supports no later than version 0x%02"PRIx8, - vconn->name, vconn->min_version, OFP10_VERSION, + vconn->name, vconn->min_version, OFP12_VERSION, oh->version); vconn->state = VCS_SEND_ERROR; } else { @@ -431,7 +431,7 @@ vcs_recv_hello(struct vconn *vconn) "(we support versions 0x%02x to 0x%02x inclusive, " "peer no later than version 0x%02"PRIx8")", vconn->name, vconn->version, vconn->min_version, - OFP10_VERSION, oh->version); + OFP12_VERSION, oh->version); vconn->state = VCS_CONNECTED; } ofpbuf_delete(b); @@ -462,7 +462,7 @@ vcs_send_error(struct vconn *vconn) snprintf(s, sizeof s, "We support versions 0x%02x to 0x%02x inclusive but " "you support no later than version 0x%02"PRIx8".", - vconn->min_version, OFP10_VERSION, vconn->version); + vconn->min_version, OFP12_VERSION, vconn->version); b = ofperr_encode_hello(OFPERR_OFPHFC_INCOMPATIBLE, ofperr_domain_from_version(vconn->version), s); retval = do_send(vconn, b); @@ -958,7 +958,7 @@ pvconn_close(struct pvconn *pvconn) * * The new vconn will automatically negotiate an OpenFlow protocol version * acceptable to both peers on the connection. The version negotiated will be - * no lower than 'min_version' and no higher than OFP10_VERSION. + * no lower than 'min_version' and no higher than OFP12_VERSION. * * pvconn_accept() will not block waiting for a connection. If no connection * is ready to be accepted, it returns EAGAIN immediately. */ diff --git a/ofproto/connmgr.c b/ofproto/connmgr.c index bd22e77..c9ca3d5 100644 --- a/ofproto/connmgr.c +++ b/ofproto/connmgr.c @@ -1015,7 +1015,7 @@ ofconn_flush(struct ofconn *ofconn) int i; ofconn->role = NX_ROLE_OTHER; - ofconn->protocol = OFPUTIL_P_OF10; + ofconn->protocol = OFPUTIL_P_OF12; ofconn->packet_in_format = NXPIF_OPENFLOW10; /* Disassociate 'ofconn' from all of the ofopgroups that it initiated that -- 1.7.10.2.484.gcd07cc5 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev