[ovs-dev] [PATCH] datapath-windows: Initialize reference count when enabling extension
Nithin Raju
nithin at vmware.com
Fri Jun 19 16:08:56 UTC 2015
> -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 <nithin at vmware.com>
More information about the dev
mailing list