From patchwork Tue Oct 11 00:48:53 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nithin Raju X-Patchwork-Id: 680594 X-Patchwork-Delegate: guru@ovn.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from archives.nicira.com (archives.nicira.com [96.126.127.54]) by ozlabs.org (Postfix) with ESMTP id 3stJK81xL2z9ryr for ; Tue, 11 Oct 2016 11:49:00 +1100 (AEDT) Received: from archives.nicira.com (localhost [127.0.0.1]) by archives.nicira.com (Postfix) with ESMTP id 37D7610196; Mon, 10 Oct 2016 17:48:59 -0700 (PDT) X-Original-To: dev@openvswitch.org Delivered-To: dev@openvswitch.org Received: from mx3v3.cudamail.com (mx3.cudamail.com [64.34.241.5]) by archives.nicira.com (Postfix) with ESMTPS id 6FA8710156 for ; Mon, 10 Oct 2016 17:48:58 -0700 (PDT) Received: from bar6.cudamail.com (localhost [127.0.0.1]) by mx3v3.cudamail.com (Postfix) with ESMTPS id 06CE21658DF for ; Mon, 10 Oct 2016 18:48:58 -0600 (MDT) X-ASG-Debug-ID: 1476146937-0b32374ce00b620001-byXFYA Received: from mx1-pf1.cudamail.com ([192.168.24.1]) by bar6.cudamail.com with ESMTP id EKRbcH3LUDbm43Hr (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Mon, 10 Oct 2016 18:48:57 -0600 (MDT) X-Barracuda-Envelope-From: nithin@vmware.com X-Barracuda-RBL-Trusted-Forwarder: 192.168.24.1 Received: from unknown (HELO EX13-EDG-OU-001.vmware.com) (208.91.0.189) by mx1-pf1.cudamail.com with ESMTPS (AES256-SHA encrypted); 11 Oct 2016 00:48:56 -0000 Received-SPF: error (mx1-pf1.cudamail.com: error in processing during lookup of vmware.com: DNS problem) Received: from sc9-mailhost2.vmware.com (10.113.161.72) by EX13-EDG-OU-001.vmware.com (10.113.208.155) with Microsoft SMTP Server id 15.0.1156.6; Mon, 10 Oct 2016 17:48:08 -0700 Received: from pa-dbc1118.eng.vmware.com (pa-dbc1118.eng.vmware.com [10.162.210.18]) by sc9-mailhost2.vmware.com (Postfix) with ESMTP id B3142B04F9; Mon, 10 Oct 2016 17:48:54 -0700 (PDT) X-CudaMail-Envelope-Sender: nithin@vmware.com From: Nithin Raju To: X-CudaMail-Whitelist-To: dev@openvswitch.org X-CudaMail-MID: CM-E1-1009071339 X-CudaMail-DTE: 101016 X-CudaMail-Originating-IP: 208.91.0.189 Date: Mon, 10 Oct 2016 17:48:53 -0700 X-ASG-Orig-Subj: [##CM-E1-1009071339##][PATCH] datapath-windows: else-if block in OvsExtNetPnPEvent Message-ID: <1476146933-9378-1-git-send-email-nithin@vmware.com> X-Mailer: git-send-email 2.6.2 MIME-Version: 1.0 Received-SPF: None (EX13-EDG-OU-001.vmware.com: nithin@vmware.com does not designate permitted sender hosts) X-Barracuda-Connect: UNKNOWN[192.168.24.1] X-Barracuda-Start-Time: 1476146937 X-Barracuda-Encrypted: ECDHE-RSA-AES256-GCM-SHA384 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 Subject: [ovs-dev] [PATCH] datapath-windows: else-if block in OvsExtNetPnPEvent 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: , Errors-To: dev-bounces@openvswitch.org Sender: "dev" Signed-off-by: Nithin Raju Acked-by: Sairam Venugopal --- datapath-windows/ovsext/Switch.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/datapath-windows/ovsext/Switch.c b/datapath-windows/ovsext/Switch.c index 825fa3c..87dbc5e 100644 --- a/datapath-windows/ovsext/Switch.c +++ b/datapath-windows/ovsext/Switch.c @@ -599,8 +599,8 @@ OvsExtNetPnPEvent(NDIS_HANDLE filterModuleContext, OVS_LOG_TRACE("Enter: filterModuleContext: %p, NetEvent: %d", filterModuleContext, (netPnPEvent->NetPnPEvent).NetEvent); /* - * The only interesting event is the NetEventSwitchActivate. It provides - * an asynchronous notification of the switch completing activation. + * NetEventSwitchActivate provides an asynchronous notification of + * the switch completing activation. */ if (netPnPEvent->NetPnPEvent.NetEvent == NetEventSwitchActivate) { ASSERT(switchContext->isActivated == FALSE); @@ -610,9 +610,7 @@ OvsExtNetPnPEvent(NDIS_HANDLE filterModuleContext, "status: %s", switchContext, status ? "TRUE" : "FALSE"); } - } - - if (netPnPEvent->NetPnPEvent.NetEvent == NetEventFilterPreDetach) { + } else if (netPnPEvent->NetPnPEvent.NetEvent == NetEventFilterPreDetach) { switchContext->dataFlowState = OvsSwitchPaused; KeMemoryBarrier(); }