ofproto-dpif: Always un-wildcard fields that are being set.
authorJustin Pettit <jpettit@nicira.com>
Sat, 3 Aug 2013 04:17:31 +0000 (21:17 -0700)
committerJustin Pettit <jpettit@nicira.com>
Sat, 3 Aug 2013 06:21:21 +0000 (23:21 -0700)
commitf74e7df7450d6c31caaad66fe8b1dc923e86e9a7
treeb64fcf6184dac1d6ef68af2f1114a5d9a87966ee
parent888e0cf441e1cd7dc2846a91f85319abd7419246
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>
lib/multipath.c
lib/nx-match.c
lib/nx-match.h
ofproto/ofproto-dpif-xlate.c
tests/ofproto-dpif.at