diff mbox

[ovs-dev] datapath-windows: else-if block in OvsExtNetPnPEvent

Message ID 1476146933-9378-1-git-send-email-nithin@vmware.com
State Accepted
Delegated to: Guru Shetty
Headers show

Commit Message

Nithin Raju Oct. 11, 2016, 12:48 a.m. UTC
Signed-off-by: Nithin Raju <nithin@vmware.com>
---
 datapath-windows/ovsext/Switch.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

Comments

Sairam Venugopal Nov. 11, 2016, 9:58 p.m. UTC | #1
Acked-by: Sairam Venugopal <vsairam@vmware.com>


On 10/10/16, 5:48 PM, "Nithin Raju" <nithin@vmware.com> wrote:

>Signed-off-by: Nithin Raju <nithin@vmware.com>
>---
> 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();
>     }
>-- 
>2.6.2
>
>_______________________________________________
>dev mailing list
>dev@openvswitch.org
>https://urldefense.proofpoint.com/v2/url?u=http-3A__openvswitch.org_mailma
>n_listinfo_dev&d=CwIGaQ&c=Sqcl0Ez6M0X8aeM67LKIiDJAXVeAw-YihVMNtXt-uEs&r=Dc
>ruz40PROJ40ROzSpxyQSLw6fcrOWpJgEcEmNR3JEQ&m=MTe79ISZI2PMmCm-GmqXQ7K33aF4xO
>PhASV27pXGptE&s=e2-zWDn4VVa4hWq4zLbvP8vG6Pu6zPzIrg04nNq-wKU&e=
Gurucharan Shetty Nov. 11, 2016, 10:03 p.m. UTC | #2
On 10 October 2016 at 17:48, Nithin Raju <nithin@vmware.com> wrote:

> Signed-off-by: Nithin Raju <nithin@vmware.com>
>
Applied, thanks


> ---
>  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();
>      }
> --
> 2.6.2
>
> _______________________________________________
> dev mailing list
> dev@openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev
>
diff mbox

Patch

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();
     }