ofproto-dpif: Install internal rule should not change the match content.
authorAndy Zhou <azhou@nicira.com>
Sat, 10 May 2014 02:13:47 +0000 (19:13 -0700)
committerAndy Zhou <azhou@nicira.com>
Fri, 16 May 2014 18:28:39 +0000 (11:28 -0700)
commitfe99c36086aa755a077be609d21870c3d0874944
tree2d744106c234b6e40ccd6e7f84ca0232d8cba39e
parente09d61c41b4fe6559de4316d83d9221c254d4b0a
ofproto-dpif: Install internal rule should not change the match content.

Without this patch, the match passed into to
ofproto_dpif_add_internal_flow() are modified. The mask of dl_type will
always be converted from wildcarded match into exact match due to
calling rule_dpif_lookup_in_table(). The fix makes sure
ofproto_dpif_add_internal_flow() does not change the original match,
and makes the match passed as const in the
ofproto_dpif_add_internal_flow() API.

This bug prevents bond module from properly tracking the post
recirculation rules installed in the internal table. The existing rule
is always deleted followed by reinstalling of the same rule.

The observable behavior of the bug is that bond module losses track
of the slave's stats, after the slave is rebalanced. Although traffic
flows through the slave just fine.

Bug #1229225

Signed-off-by: Andy Zhou <azhou@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
ofproto/ofproto-dpif.c
ofproto/ofproto-dpif.h