Support matching and modifying IP ECN bits.
[sliver-openvswitch.git] / lib / ofp-util.c
index 5ef4e80..1b16279 100644 (file)
@@ -897,6 +897,11 @@ ofputil_min_flow_format(const struct cls_rule *rule)
         return NXFF_NXM;
     }
 
+    /* Only NXM supports matching IP ECN bits. */
+    if (wc->tos_mask & IP_ECN_MASK) {
+        return NXFF_NXM;
+    }
+
     /* Other formats can express this rule. */
     return NXFF_OPENFLOW10;
 }