From: Andy Zhou <azhou@nicira.com>
Date: Tue, 8 Apr 2014 20:26:46 +0000 (-0700)
Subject: dpif-netdev: Use existing flow for computing dp hash
X-Git-Tag: sliver-openvswitch-2.2.90-1~5^2~10
X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=cd527139bbe08729f18112eea5073ffd0f435979;p=sliver-openvswitch.git

dpif-netdev: Use existing flow for computing dp hash

Signed-off-by: Andy Zhou <azhou@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
---

diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c
index 9fc51db02..9ad938691 100644
--- a/lib/dpif-netdev.c
+++ b/lib/dpif-netdev.c
@@ -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 */