-/* Return 'wildcards' in "normal form":
- *
- * - Forces unknown bits to 0.
- *
- * - Forces nw_src and nw_dst masks greater than 32 to exactly 32.
- */
-static inline uint32_t
-flow_wildcards_normalize(uint32_t wildcards)
-{
- wildcards &= wildcards & (OVSFW_ALL | FWW_ALL);
- if (wildcards & (0x20 << OFPFW_NW_SRC_SHIFT)) {
- wildcards &= ~(0x1f << OFPFW_NW_SRC_SHIFT);
- }
- if (wildcards & (0x20 << OFPFW_NW_DST_SHIFT)) {
- wildcards &= ~(0x1f << OFPFW_NW_DST_SHIFT);
- }
- return wildcards;
-}
-
-/* Initializes 'wc' from 'wildcards', which may be any combination of the
- * OFPFW_* and OVSFW_* wildcard bits.
- *
- * All registers (NXM_NX_REG*) are always completely wildcarded, because
- * 'wildcards' doesn't have enough bits to give the details on which
- * particular bits should be wildcarded (if any). The caller may use
- * flow_wildcards_set_reg_mask() to update the register wildcard masks. */