On 12 January 2016 at 10:00, Alin Serdean <aserd...@cloudbasesolutions.com>
wrote:

> Testing under 2012 gave some more inisight on an old bug.
>
> If a PNP event with the value of NetEventSwitchActivate was triggered
> we were calling OvsQuerySwitchActivationComplete which does an OID request
> to the underlying drivers, however this triggered a hang because as per
> documentation:
>
> https://msdn.microsoft.com/en-us/library/windows/hardware/ff561830%28v=vs.85%29.aspx
> "A driver can call NdisFOidRequest when it is in the Restarting, Running,
> Pausing, or Paused state."
> This resulted in an endless booting cycle.
> Looking at the documentation again:
>
> https://msdn.microsoft.com/en-us/library/windows/hardware/ff568751%28v=vs.85%29.aspx
> NetEventSwitchActivate indicates that the extensible switch has completed
> activation so we can now safely query the switch itself.
>
> Also we are not forwarding the PNP event to the overlaying drivers unless
> we succeeded in the operation, this issue has been fixed also.
>
> Signed-off-by: Alin Gabriel Serdean <aserd...@cloudbasesolutions.com>
>

I added Nithin's Ack and applied it. Thanks!


> ---
>  datapath-windows/ovsext/Switch.c | 24 ++++++++----------------
>  1 file changed, 8 insertions(+), 16 deletions(-)
>
> diff --git a/datapath-windows/ovsext/Switch.c
> b/datapath-windows/ovsext/Switch.c
> index 4d9cfda..77bafb4 100644
> --- a/datapath-windows/ovsext/Switch.c
> +++ b/datapath-windows/ovsext/Switch.c
> @@ -588,7 +588,6 @@ OvsExtNetPnPEvent(NDIS_HANDLE filterModuleContext,
>  {
>      NDIS_STATUS status = NDIS_STATUS_SUCCESS;
>      POVS_SWITCH_CONTEXT switchContext =
> (POVS_SWITCH_CONTEXT)filterModuleContext;
> -    BOOLEAN switchActive;
>
>      OVS_LOG_TRACE("Enter: filterModuleContext: %p, NetEvent: %d",
>                    filterModuleContext,
> (netPnPEvent->NetPnPEvent).NetEvent);
> @@ -597,24 +596,17 @@ OvsExtNetPnPEvent(NDIS_HANDLE filterModuleContext,
>       * an asynchronous notification of the switch completing activation.
>       */
>      if (netPnPEvent->NetPnPEvent.NetEvent == NetEventSwitchActivate) {
> -        status = OvsQuerySwitchActivationComplete(switchContext,
> &switchActive);
> -        if (status != NDIS_STATUS_SUCCESS) {
> -            switchContext->isActivateFailed = TRUE;
> -        } else {
> -            ASSERT(switchContext->isActivated == FALSE);
> -            if (switchContext->isActivated == FALSE && switchActive ==
> TRUE) {
> -                status = OvsActivateSwitch(switchContext);
> -                OVS_LOG_TRACE("OvsExtNetPnPEvent: activated switch: %p "
> -                              "status: %s", switchContext,
> -                              status ? "TRUE" : "FALSE");
> -            }
> +        ASSERT(switchContext->isActivated == FALSE);
> +        if (switchContext->isActivated == FALSE) {
> +            status = OvsActivateSwitch(switchContext);
> +            OVS_LOG_TRACE("OvsExtNetPnPEvent: activated switch: %p "
> +                          "status: %s", switchContext,
> +                          status ? "TRUE" : "FALSE");
>          }
>      }
>
> -    if (status == NDIS_STATUS_SUCCESS) {
> -        status = NdisFNetPnPEvent(switchContext->NdisFilterHandle,
> -                                  netPnPEvent);
> -    }
> +    status = NdisFNetPnPEvent(switchContext->NdisFilterHandle,
> +                              netPnPEvent);
>      OVS_LOG_TRACE("Exit: OvsExtNetPnPEvent");
>
>      return status;
> --
> 1.9.5.msysgit.0
> _______________________________________________
> dev mailing list
> dev@openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev
>
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to