Open Flow 1.2, like Open Flow 1.1, has OFPC11_GROUP_STATS. All other Open Flow 1.2 capabilities are handled by ofputil_capabilities_mask() which is used by both ofputil_decode_switch_features() and ofputil_encode_switch_features().
No update to ofputil_encode_switch_features() is required to support Open Flow 1.2 due to its protocol version logic which is looser than that of ofputil_decode_switch_features(). Signed-off-by: Simon Horman <ho...@verge.net.au> --- v4 * No change v3 * Manual rebase v2 * No change --- lib/ofp-util.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/ofp-util.c b/lib/ofp-util.c index 299f77b..9db0793 100644 --- a/lib/ofp-util.c +++ b/lib/ofp-util.c @@ -820,6 +820,8 @@ static const struct ofputil_msg_type ofputil_msg_types[] = { MIN_SIZE, \ EXTRA_MULTIPLE \ } + OFPT12(OFPT_FEATURES_REPLY, OFPT_FEATURES_REPLY, + sizeof(struct ofp_switch_features), sizeof(struct ofp11_port)), OFPT12(OFPT_FLOW_REMOVED, OFPT_FLOW_REMOVED, sizeof(struct ofp12_flow_removed), 0), OFPT12(OFPT11_FLOW_MOD, OFPT11_FLOW_MOD, @@ -2994,7 +2996,8 @@ ofputil_decode_switch_features(const struct ofp_switch_features *osf, features->capabilities |= OFPUTIL_C_STP; } features->actions = decode_action_bits(osf->actions, of10_action_bits); - } else if (osf->header.version == OFP11_VERSION) { + } else if (osf->header.version == OFP11_VERSION || + osf->header.version == OFP12_VERSION) { if (osf->capabilities & htonl(OFPC11_GROUP_STATS)) { features->capabilities |= OFPUTIL_C_GROUP_STATS; } -- 1.7.10.2.484.gcd07cc5 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev