diff options
author | Justin Pettit <jpettit@nicira.com> | 2013-08-02 21:17:31 -0700 |
---|---|---|
committer | Justin Pettit <jpettit@nicira.com> | 2013-08-02 23:21:21 -0700 |
commit | f74e7df7450d6c31caaad66fe8b1dc923e86e9a7 (patch) | |
tree | b64fcf6184dac1d6ef68af2f1114a5d9a87966ee /lib/nx-match.h | |
parent | 888e0cf441e1cd7dc2846a91f85319abd7419246 (diff) |
ofproto-dpif: Always un-wildcard fields that are being set.
The ODP library has an optimization to not set a header if the field was
not changed, regardless of whether an action to set the field was
present. That library is also responsible for un-wildcarding fields
that are bieng modified. This leads to a problem where a packet matches
a flow that updates a field, but that particular packet's field already
has that value. As such, an overly loose megaflow will be generated
that doesn't match on that field and the actions won't update it. A
second packet that should have the field set will match that flow and
will not be modified.
This commit changes the behavior to always un-wildcard fields that are
being modified. Since the ODP library updates the entire header if a
field in it is modified, and all those fields will be un-wildcarded, the
generated flows may be different. However, they should be correct.
Bug #18946.
Reported-by: Jesse Gross <jesse@nicira.com>
Signed-off-by: Justin Pettit <jpettit@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'lib/nx-match.h')
-rw-r--r-- | lib/nx-match.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/nx-match.h b/lib/nx-match.h index a6b7c523..9dcc19a1 100644 --- a/lib/nx-match.h +++ b/lib/nx-match.h @@ -87,7 +87,7 @@ void nxm_execute_reg_move(const struct ofpact_reg_move *, struct flow *, struct flow_wildcards *); void nxm_execute_reg_load(const struct ofpact_reg_load *, struct flow *); void nxm_reg_load(const struct mf_subfield *, uint64_t src_data, - struct flow *); + struct flow *, struct flow_wildcards *); char *nxm_parse_stack_action(struct ofpact_stack *, const char *) WARN_UNUSED_RESULT; @@ -113,7 +113,8 @@ void nxm_execute_stack_push(const struct ofpact_stack *, const struct flow *, struct flow_wildcards *, struct ofpbuf *); void nxm_execute_stack_pop(const struct ofpact_stack *, - struct flow *, struct ofpbuf *); + struct flow *, struct flow_wildcards *, + struct ofpbuf *); int nxm_field_bytes(uint32_t header); int nxm_field_bits(uint32_t header); |