diff options
author | Ben Pfaff <blp@ovn.org> | 2016-08-01 22:50:10 -0700 |
---|---|---|
committer | Ben Pfaff <blp@ovn.org> | 2016-08-15 19:27:08 -0700 |
commit | 67842eba196c126ebe0dbc28f03a7bb3b27540f3 (patch) | |
tree | d1c44c5cf65a480b8e8a5206cf86426a77a15a54 /include | |
parent | c1ff66ac80b51aea49c3d672393a9a35f5164790 (diff) | |
download | openvswitch-67842eba196c126ebe0dbc28f03a7bb3b27540f3.tar.gz |
meta-flow: New functions mf_subfield_copy() and mf_subfield_swap().
The function nxm_execute_reg_move() was almost a general-purpose function
for manipulating subfields, except for its awkward interface that took a
struct ofpact_reg_move instead of a plain source and destination. This
commit introduces a general-purpose function in meta-flow that corrects
this flaw, and updates the callers. An upcoming commit will introduce a
new user of the function.
This commit also introduces a related function mf_subfield_swap() to swap
the contents of subfields. An upcoming commit will introduce the first
user.
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Ryan Moats <rmoats@us.ibm.com>
Acked-by: Justin Pettit <jpettit@ovn.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/openvswitch/meta-flow.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/openvswitch/meta-flow.h b/include/openvswitch/meta-flow.h index 76d915ce3..f209fc2f8 100644 --- a/include/openvswitch/meta-flow.h +++ b/include/openvswitch/meta-flow.h @@ -2116,6 +2116,12 @@ void mf_read_subfield(const struct mf_subfield *, const struct flow *, union mf_subvalue *); uint64_t mf_get_subfield(const struct mf_subfield *, const struct flow *); +void mf_subfield_copy(const struct mf_subfield *src, + const struct mf_subfield *dst, + struct flow *, struct flow_wildcards *); +void mf_subfield_swap(const struct mf_subfield *, + const struct mf_subfield *, + struct flow *flow, struct flow_wildcards *); enum ofperr mf_check_src(const struct mf_subfield *, const struct flow *); enum ofperr mf_check_dst(const struct mf_subfield *, const struct flow *); |