datapath-windows: Initialize reference count when enabling extension
authorSorin Vinturis <svinturis@cloudbasesolutions.com>
Fri, 19 Jun 2015 16:33:56 +0000 (16:33 +0000)
committerBen Pfaff <blp@nicira.com>
Sat, 20 Jun 2015 16:47:25 +0000 (09:47 -0700)
commitc16e8547b4668de4233590b08f951b9cb3c13ea6
tree90a88d9fa212f9535a2c21d5b8246699d64ec5f3
parent0980247015b8102d0510643cc40a8b6931357abd
datapath-windows: Initialize reference count when enabling extension

When the extension is initialized the global reference count, used for
preventing early deallocation of the switch extension, is set to 1.
Enabling and then disabling the extension leaves the latter reference
count to zero. Because of this the switch context fails to be acquired,
i.e OvsAcquireSwitchContext returns zero, and that affects driver's
communication to the userspace.

The solution is to initialize the reference count each time the extension
is enabled.

Signed-off-by: Sorin Vinturis <svinturis@cloudbasesolutions.com>
Reported-by: Nithin Raju <nithin@vmware.com>
Reported-at: https://github.com/openvswitch/ovs-issues/issues/86
Acked-by: Nithin Raju <nithin@vmware.com>
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
datapath-windows/ovsext/Switch.c