> -volatile LONG      gOvsSwitchContextRefCount = 1;
> +volatile LONG      gOvsSwitchContextRefCount = 0;

This assignment does not matter anymore. So, I’d prefer not to initialize.

> static NDIS_STATUS OvsCreateSwitch(NDIS_HANDLE ndisFilterHandle,
>                                    POVS_SWITCH_CONTEXT *switchContextOut);
> @@ -138,6 +138,7 @@ OvsExtAttach(NDIS_HANDLE ndisFilterHandle,
>     switchContext->dataFlowState = OvsSwitchPaused;
> 
>     gOvsSwitchContext = switchContext;
> +    gOvsSwitchContextRefCount = 1;

I’d set gOvsSwitchContextRefCount to 1, before 'gOvsSwitchContext = 
switchContext’, since the gating factor in OvsDeviceControl() to begin 
processing is: gOvsSwitchContext != NULL. Just my personal opinion though. I am 
ok with this change too.

Acked-by: Nithin Raju <nit...@vmware.com>
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to