[ovs-dev] [PATCH 29/48] ofp-util: Allow decoding of Open Flow 1.2 Port Mod Messages
Simon Horman
horms at verge.net.au
Mon Jun 25 06:44:32 UTC 2012
Signed-off-by: Simon Horman <horms at verge.net.au>
---
v4
* No change
v3
* No change
v2
* No change
---
lib/ofp-util.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/lib/ofp-util.c b/lib/ofp-util.c
index a055022..4fa708f 100644
--- a/lib/ofp-util.c
+++ b/lib/ofp-util.c
@@ -824,6 +824,8 @@ static const struct ofputil_msg_type ofputil_msg_types[] = {
sizeof(struct ofp12_flow_removed), 0),
OFPT12(OFPT11_FLOW_MOD, OFPT11_FLOW_MOD,
sizeof(struct ofp11_flow_mod), 1),
+ OFPT12(OFPT_PORT_MOD, OFPT11_PORT_MOD,
+ sizeof(struct ofp11_port_mod), 0),
#undef OPFT12
#define OFPST10_REQUEST(STAT, RAW_STAT, MIN_SIZE, EXTRA_MULTIPLE) \
@@ -3145,7 +3147,7 @@ ofputil_decode_port_mod(const struct ofp_header *oh,
pm->config = ntohl(opm->config) & OFPPC10_ALL;
pm->mask = ntohl(opm->mask) & OFPPC10_ALL;
pm->advertise = netdev_port_features_from_ofp10(opm->advertise);
- } else if (oh->version == OFP11_VERSION) {
+ } else if (oh->version == OFP11_VERSION || oh->version == OFP12_VERSION) {
const struct ofp11_port_mod *opm = (const struct ofp11_port_mod *) oh;
enum ofperr error;
--
1.7.10.2.484.gcd07cc5
More information about the dev
mailing list