diff options
author | Jarno Rajahalme <jarno@ovn.org> | 2016-11-14 13:24:55 -0800 |
---|---|---|
committer | Jarno Rajahalme <jarno@ovn.org> | 2016-11-14 13:24:55 -0800 |
commit | 50b73fe16586ab18e5822ba9e952dd2fec539cf7 (patch) | |
tree | 37570a9dea10ba3380c177e1a4e963832b516578 /lib/ofp-util.c | |
parent | 14bf7951a2da2253619390e81fa9c54f92751068 (diff) | |
download | openvswitch-50b73fe16586ab18e5822ba9e952dd2fec539cf7.tar.gz |
ofproto: Return the OFPC_BUNDLES bit in switch features reply.
Add definitions for the OpenFlow 1.4.1/1.5 specific capabilities bits
OFPC14_BUNDLES and OFPC14_FLOW_MONITORING. Return the bundles
capability bit in switch features reply.
Reported-by: Andrej Leitner <andrej.leitner@pantheon.tech>
Signed-off-by: Jarno Rajahalme <jarno@ovn.org>
Acked-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'lib/ofp-util.c')
-rw-r--r-- | lib/ofp-util.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/ofp-util.c b/lib/ofp-util.c index c0a402f4c..899cfe388 100644 --- a/lib/ofp-util.c +++ b/lib/ofp-util.c @@ -4644,6 +4644,9 @@ BUILD_ASSERT_DECL((int) OFPUTIL_C_PORT_STATS == OFPC_PORT_STATS); BUILD_ASSERT_DECL((int) OFPUTIL_C_IP_REASM == OFPC_IP_REASM); BUILD_ASSERT_DECL((int) OFPUTIL_C_QUEUE_STATS == OFPC_QUEUE_STATS); BUILD_ASSERT_DECL((int) OFPUTIL_C_ARP_MATCH_IP == OFPC_ARP_MATCH_IP); +BUILD_ASSERT_DECL((int) OFPUTIL_C_PORT_BLOCKED == OFPC12_PORT_BLOCKED); +BUILD_ASSERT_DECL((int) OFPUTIL_C_BUNDLES == OFPC14_BUNDLES); +BUILD_ASSERT_DECL((int) OFPUTIL_C_FLOW_MONITORING == OFPC14_FLOW_MONITORING); static uint32_t ofputil_capabilities_mask(enum ofp_version ofp_version) @@ -4655,10 +4658,12 @@ ofputil_capabilities_mask(enum ofp_version ofp_version) return OFPC_COMMON | OFPC_ARP_MATCH_IP; case OFP12_VERSION: case OFP13_VERSION: + return OFPC_COMMON | OFPC12_PORT_BLOCKED; case OFP14_VERSION: case OFP15_VERSION: case OFP16_VERSION: - return OFPC_COMMON | OFPC12_PORT_BLOCKED; + return OFPC_COMMON | OFPC12_PORT_BLOCKED | OFPC14_BUNDLES + | OFPC14_FLOW_MONITORING; default: /* Caller needs to check osf->header.version itself */ return 0; @@ -4784,7 +4789,6 @@ ofputil_encode_switch_features(const struct ofputil_switch_features *features, osf->n_buffers = htonl(features->n_buffers); osf->n_tables = features->n_tables; - osf->capabilities = htonl(features->capabilities & OFPC_COMMON); osf->capabilities = htonl(features->capabilities & ofputil_capabilities_mask(version)); switch (version) { |