mirror of
https://github.com/openvswitch/ovs
synced 2025-10-25 15:07:05 +00:00
ofp-parse: New function parse_ofp_exact_flow().
This function parses a flow rather than a cls_rule. It will be useful for "ofproto/trace", which currently requires an odp_flow and thus can't accept values for registers and other concepts that don't exist in the kernel. Signed-off-by: Ben Pfaff <blp@nicira.com>
This commit is contained in:
@@ -1457,6 +1457,19 @@ mf_set_flow_value(const struct mf_field *mf,
|
||||
}
|
||||
}
|
||||
|
||||
/* Returns true if 'mf' has a zero value in 'flow', false if it is nonzero.
|
||||
*
|
||||
* The caller is responsible for ensuring that 'flow' meets 'mf''s
|
||||
* prerequisites. */
|
||||
bool
|
||||
mf_is_zero(const struct mf_field *mf, const struct flow *flow)
|
||||
{
|
||||
union mf_value value;
|
||||
|
||||
mf_get_value(mf, flow, &value);
|
||||
return is_all_zeros((const uint8_t *) &value, mf->n_bytes);
|
||||
}
|
||||
|
||||
/* Makes 'rule' wildcard field 'mf'.
|
||||
*
|
||||
* The caller is responsible for ensuring that 'rule' meets 'mf''s
|
||||
|
||||
Reference in New Issue
Block a user