From patchwork Wed Sep 23 16:15:31 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nithin Raju X-Patchwork-Id: 521758 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from archives.nicira.com (li376-54.members.linode.com [96.126.127.54]) by ozlabs.org (Postfix) with ESMTP id 0AA8F1401AF for ; Thu, 24 Sep 2015 02:15:40 +1000 (AEST) Received: from archives.nicira.com (localhost [127.0.0.1]) by archives.nicira.com (Postfix) with ESMTP id 4998C10B72; Wed, 23 Sep 2015 09:15:40 -0700 (PDT) X-Original-To: dev@openvswitch.org Delivered-To: dev@openvswitch.org Received: from mx3v1.cudamail.com (mx3.cudamail.com [64.34.241.5]) by archives.nicira.com (Postfix) with ESMTPS id 53CD310B72 for ; Wed, 23 Sep 2015 09:15:38 -0700 (PDT) Received: from bar4.cudamail.com (bar2 [192.168.15.2]) by mx3v1.cudamail.com (Postfix) with ESMTP id CEE7E61899C for ; Wed, 23 Sep 2015 10:15:37 -0600 (MDT) X-ASG-Debug-ID: 1443024936-03dc216fbd1b430001-byXFYA Received: from mx3-pf1.cudamail.com ([192.168.14.2]) by bar4.cudamail.com with ESMTP id AFM4fDQbgpDVNBve (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 23 Sep 2015 10:15:36 -0600 (MDT) X-Barracuda-Envelope-From: nithin@vmware.com X-Barracuda-RBL-Trusted-Forwarder: 192.168.14.2 Received: from unknown (HELO smtp-outbound-2.vmware.com) (208.91.2.13) by mx3-pf1.cudamail.com with ESMTPS (DHE-RSA-AES256-SHA encrypted); 23 Sep 2015 16:15:36 -0000 Received-SPF: pass (mx3-pf1.cudamail.com: SPF record at _spf.vmware.com designates 208.91.2.13 as permitted sender) X-Barracuda-Apparent-Source-IP: 208.91.2.13 X-Barracuda-RBL-IP: 208.91.2.13 Received: from sc9-mailhost1.vmware.com (sc9-mailhost1.vmware.com [10.113.161.71]) by smtp-outbound-2.vmware.com (Postfix) with ESMTP id C75B92877C for ; Wed, 23 Sep 2015 09:15:33 -0700 (PDT) Received: from pa-dbc1122.eng.vmware.com (unknown [10.162.210.22]) by sc9-mailhost1.vmware.com (Postfix) with ESMTP id 4BC2618584; Wed, 23 Sep 2015 09:15:34 -0700 (PDT) X-CudaMail-Envelope-Sender: nithin@vmware.com From: Nithin Raju To: dev@openvswitch.org X-CudaMail-Whitelist-To: dev@openvswitch.org X-CudaMail-MID: CM-V1-922031225 X-CudaMail-DTE: 092315 X-CudaMail-Originating-IP: 208.91.2.13 Date: Wed, 23 Sep 2015 09:15:31 -0700 X-ASG-Orig-Subj: [##CM-V1-922031225##][PATCH 2/4 v2] datapath-windows: reset the IRP pointer after use in OvsQueuePackets Message-Id: <1443024933-47622-2-git-send-email-nithin@vmware.com> X-Mailer: git-send-email 1.8.5.6 In-Reply-To: <1443024933-47622-1-git-send-email-nithin@vmware.com> References: <1443024933-47622-1-git-send-email-nithin@vmware.com> X-Barracuda-Connect: UNKNOWN[192.168.14.2] X-Barracuda-Start-Time: 1443024936 X-Barracuda-Encrypted: DHE-RSA-AES256-SHA X-Barracuda-URL: https://web.cudamail.com:443/cgi-mod/mark.cgi X-ASG-Whitelist: Header =?UTF-8?B?eFwtY3VkYW1haWxcLXdoaXRlbGlzdFwtdG8=?= X-Virus-Scanned: by bsmtpd at cudamail.com X-Barracuda-BRTS-Status: 1 X-ASG-Whitelist: EmailCat (corporate) Subject: [ovs-dev] [PATCH 2/4 v2] datapath-windows: reset the IRP pointer after use in OvsQueuePackets X-BeenThere: dev@openvswitch.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dev-bounces@openvswitch.org Sender: "dev" Signed-off-by: Nithin Raju Acked-by: Sairam Venugopal Acked-by: Alin Gabriel Serdean --- v2: collected acks --- datapath-windows/ovsext/User.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/datapath-windows/ovsext/User.c b/datapath-windows/ovsext/User.c index 0bbf690..d6139b8 100644 --- a/datapath-windows/ovsext/User.c +++ b/datapath-windows/ovsext/User.c @@ -698,7 +698,6 @@ OvsQueuePackets(PLIST_ENTRY packetList, { POVS_USER_PACKET_QUEUE upcallQueue = NULL; POVS_PACKET_QUEUE_ELEM elem; - PIRP irp = NULL; PLIST_ENTRY link; UINT32 num = 0; LIST_ENTRY dropPackets; @@ -728,23 +727,17 @@ OvsQueuePackets(PLIST_ENTRY packetList, InsertTailList(&upcallQueue->packetList, &elem->link); upcallQueue->numPackets++; if (upcallQueue->pendingIrp) { + PIRP irp = upcallQueue->pendingIrp; PDRIVER_CANCEL cancelRoutine; - irp = upcallQueue->pendingIrp; upcallQueue->pendingIrp = NULL; cancelRoutine = IoSetCancelRoutine(irp, NULL); - if (cancelRoutine == NULL) { - irp = NULL; + if (cancelRoutine != NULL) { + OvsCompleteIrpRequest(irp, 0, STATUS_SUCCESS); } } } - - if (irp) { - OvsCompleteIrpRequest(irp, 0, STATUS_SUCCESS); - } - NdisReleaseSpinLock(&upcallQueue->queueLock); } - OvsReleasePidHashLock(); }