dpif-netdev: Use existing flow for computing dp hash
authorAndy Zhou <azhou@nicira.com>
Tue, 8 Apr 2014 20:26:46 +0000 (13:26 -0700)
committerAndy Zhou <azhou@nicira.com>
Wed, 9 Apr 2014 17:59:48 +0000 (10:59 -0700)
Signed-off-by: Andy Zhou <azhou@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
lib/dpif-netdev.c

index 9fc51db..9ad9386 100644 (file)
@@ -2151,10 +2151,7 @@ dp_execute_cb(void *aux_, struct ofpbuf *packet,
             recirc_md.dp_hash = 0;
 
             if (act->hash_alg == OVS_RECIRC_HASH_ALG_L4) {
-                struct flow flow;
-
-                flow_extract(recirc_packet, md, &flow);
-                recirc_md.dp_hash = flow_hash_symmetric_l4(&flow,
+                recirc_md.dp_hash = flow_hash_symmetric_l4(aux->key,
                                                            act->hash_bias);
                 if (!recirc_md.dp_hash) {
                     recirc_md.dp_hash = 1;  /* 0 is not valid */