revalidator: Prevent handling the same flow twice.
[sliver-openvswitch.git] / ofproto / ofproto-dpif-xlate.c
index 89a3ec0..248382f 100644 (file)
@@ -1217,7 +1217,7 @@ output_normal(struct xlate_ctx *ctx, const struct xbundle *out_xbundle,
 
         if (ctx->xbridge->enable_recirc) {
             ctx->xout->use_recirc = bond_may_recirc(
-                out_xbundle->bond, &xr->recirc_id, &xr->hash_bias);
+                out_xbundle->bond, &xr->recirc_id, &xr->hash_basis);
 
             if (ctx->xout->use_recirc) {
                 /* Only TCP mode uses recirculation. */
@@ -1608,8 +1608,10 @@ compose_sample_action(const struct xbridge *xbridge,
     actions_offset = nl_msg_start_nested(odp_actions, OVS_SAMPLE_ATTR_ACTIONS);
 
     odp_port = ofp_port_to_odp_port(xbridge, flow->in_port.ofp_port);
-    pid = dpif_port_get_pid(xbridge->dpif, odp_port, 0);
-    cookie_offset = odp_put_userspace_action(pid, cookie, cookie_size, odp_actions);
+    pid = dpif_port_get_pid(xbridge->dpif, odp_port,
+                            flow_hash_5tuple(flow, 0));
+    cookie_offset = odp_put_userspace_action(pid, cookie, cookie_size,
+                                             odp_actions);
 
     nl_msg_end_nested(odp_actions, actions_offset);
     nl_msg_end_nested(odp_actions, sample_offset);
@@ -1809,7 +1811,7 @@ compose_output_action__(struct xlate_ctx *ctx, ofp_port_t ofp_port,
 
     /* If 'struct flow' gets additional metadata, we'll need to zero it out
      * before traversing a patch port. */
-    BUILD_ASSERT_DECL(FLOW_WC_SEQ == 25);
+    BUILD_ASSERT_DECL(FLOW_WC_SEQ == 26);
 
     if (!xport) {
         xlate_report(ctx, "Nonexistent output port");
@@ -1957,7 +1959,7 @@ compose_output_action__(struct xlate_ctx *ctx, ofp_port_t ofp_port,
                                                 OVS_ACTION_ATTR_HASH,
                                                 sizeof *act_hash);
             act_hash->hash_alg = xr->hash_alg;
-            act_hash->hash_bias = xr->hash_bias;
+            act_hash->hash_basis = xr->hash_basis;
 
             /* Recirc action. */
             nl_msg_put_u32(&ctx->xout->odp_actions, OVS_ACTION_ATTR_RECIRC,