ctx->wc->masks.tp_src = 0;
ctx->wc->masks.tp_dst = 0;
}
+
+ /* Clear flow wildcard bits for fields which are not present
+ * in the original packet header. These wildcards may get set
+ * due to push/set_field actions. This results into frequent
+ * invalidation of datapath flows by revalidator thread. */
+
+ /* Clear mpls label wc bits if original packet is non-mpls. */
+ if (!eth_type_mpls(ctx->xin->upcall_flow->dl_type)) {
+ for (i = 0; i < FLOW_MAX_MPLS_LABELS; i++) {
+ ctx->wc->masks.mpls_lse[i] = 0;
+ }
+ }
+ /* Clear vlan header wc bits if original packet does not have
+ * vlan header. */
+ for (i = 0; i < FLOW_MAX_VLAN_HEADERS; i++) {
+ if (!eth_type_vlan(ctx->xin->upcall_flow->vlans[i].tpid)) {
+ ctx->wc->masks.vlans[i].tpid = 0;
+ ctx->wc->masks.vlans[i].tci = 0;
+ }
+ }
}
/* Translates the flow, actions, or rule in 'xin' into datapath actions in