On Mon, Jul 23, 2012 at 03:16:38PM +0900, Simon Horman wrote: > + enum ofputil_protocol protocol; > + > + switch(oh->version) { > + case OFP10_VERSION: > + protocol = OFPUTIL_P_OF10_TID; > + break; > + default: > + protocol = ofputil_protocol_from_ofp_version(oh->version); > + break; > + } > > ofpbuf_init(&ofpacts, 64); > - error = ofputil_decode_flow_mod(&fm, oh, OFPUTIL_P_OF10_TID, &ofpacts); > + error = ofputil_decode_flow_mod(&fm, oh, protocol, &ofpacts);
I think it'd be better to calculate the protocol to use as something more like: protocol = ofputil_protocol_from_ofp_version(oh->version); protocol = ofputil_protocol_set_tid(protocol, true); _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev