From: Jarno Rajahalme Date: Tue, 24 Feb 2015 23:33:59 +0000 (-0800) Subject: ofproto-dpif-upcall: Create ukey only for miss upcalls. X-Git-Tag: v2.4.0~496 X-Git-Url: http://git.cascardo.eti.br/?a=commitdiff_plain;h=7cde82084a4d6c4d6e6b2ca97c978561c3c96dda;p=cascardo%2Fovs.git ofproto-dpif-upcall: Create ukey only for miss upcalls. 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 Acked-by: Ben Pfaff --- diff --git a/ofproto/ofproto-dpif-upcall.c b/ofproto/ofproto-dpif-upcall.c index 262f1d5a0..3c80a0c03 100644 --- a/ofproto/ofproto-dpif-upcall.c +++ b/ofproto/ofproto-dpif-upcall.c @@ -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