* wildcarded. */
void
ofputil_cls_rule_from_match(const struct ofp_match *match,
- unsigned int priority, int flow_format,
+ unsigned int priority,
+ enum nx_flow_format flow_format,
uint64_t cookie, struct cls_rule *rule)
{
struct flow_wildcards *wc = &rule->wc;
wc->nw_src_mask = ofputil_wcbits_to_netmask(ofpfw >> OFPFW_NW_SRC_SHIFT);
wc->nw_dst_mask = ofputil_wcbits_to_netmask(ofpfw >> OFPFW_NW_DST_SHIFT);
- if (!(ofpfw & NXFW_TUN_ID)) {
+ if (flow_format == NXFF_TUN_ID_FROM_COOKIE && !(ofpfw & NXFW_TUN_ID)) {
rule->flow.tun_id = htonl(ntohll(cookie) >> 32);
} else {
wc->wildcards |= FWW_TUN_ID;
* the latter case only, 'match''s NXFW_TUN_ID bit will be filled in; otherwise
* it is always set to 0. */
void
-ofputil_cls_rule_to_match(const struct cls_rule *rule, int flow_format,
+ofputil_cls_rule_to_match(const struct cls_rule *rule,
+ enum nx_flow_format flow_format,
struct ofp_match *match)
{
const struct flow_wildcards *wc = &rule->wc;