ofproto-dpif-upcall: Create ukey only for miss upcalls.
authorJarno Rajahalme <jrajahalme@nicira.com>
Tue, 24 Feb 2015 23:33:59 +0000 (15:33 -0800)
committerJarno Rajahalme <jrajahalme@nicira.com>
Wed, 4 Mar 2015 22:57:48 +0000 (14:57 -0800)
There is no point trying to create ukeys for non-miss upcalls, such as
upcalls due to an explicit userspace actions (e.g, slow-pathed flows).

Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
ofproto/ofproto-dpif-upcall.c

index 262f1d5..3c80a0c 100644 (file)
@@ -989,7 +989,12 @@ upcall_xlate(struct udpif *udpif, struct upcall *upcall,
                           &upcall->put_actions);
     }
 
-    upcall->ukey = ukey_create_from_upcall(upcall);
+    /* This function is also called for slow-pathed flows.  As we are only
+     * going to create new datapath flows for actual datapath misses, there is
+     * no point in creating a ukey otherwise. */
+    if (upcall->type == DPIF_UC_MISS) {
+        upcall->ukey = ukey_create_from_upcall(upcall);
+    }
 }
 
 static void