When creating a flow in the datapath as the result of an upcall
the match itself is the match supplied in the upcall while
the mask of the match, if supplied, is generated based on the
flow and mask composed during action translation.

In the case of, for example a UDP packet, the match will include
of L2, L3 and L4 fields. However, if the flow is cleared in
flow_push_mpls() then the mask that is synthesised from it will
not include L3 and L4 fields. This seems incorrect and the kernel
datapath complains about this mismatch.

Signed-off-by: Simon Horman <ho...@verge.net.au>
---
 lib/flow.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/lib/flow.c b/lib/flow.c
index 82d6729..a0194f7 100644
--- a/lib/flow.c
+++ b/lib/flow.c
@@ -1175,11 +1175,6 @@ flow_push_mpls(struct flow *flow, int n, ovs_be16 
mpls_eth_type,
         }
 
         flow->mpls_lse[0] = set_mpls_lse_values(ttl, tc, 1, htonl(label));
-
-        /* Clear all L3 and L4 fields. */
-        BUILD_ASSERT(FLOW_WC_SEQ == 24);
-        memset((char *) flow + FLOW_SEGMENT_2_ENDS_AT, 0,
-               sizeof(struct flow) - FLOW_SEGMENT_2_ENDS_AT);
     }
     flow->dl_type = mpls_eth_type;
 }
-- 
1.8.5.2

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to