datapath-windows: Code refactoring and fixes in Vport.c
authorNithin Raju <nithin@vmware.com>
Fri, 26 Jun 2015 18:51:28 +0000 (11:51 -0700)
committerBen Pfaff <blp@nicira.com>
Wed, 1 Jul 2015 21:12:51 +0000 (14:12 -0700)
commitb8155080abc546d3d0cac3f316929904e8737bc8
tree0c2dc932565ceae5cac3826cb6af66d68be060b8
parent23dec42fb0114a04f70f37b637ec05a61178bc53
datapath-windows: Code refactoring and fixes in Vport.c

In this patch, there a couple of fixes and some code refactoring:
1. During deletion of "internal" and "external" in
   OvsRemoveAndDeleteVport(), we need to check if 'hvDelete' is TRUE before
   updating the data structures. Added code comments explaining the
   same.

2. Added a OvsRemoveTunnelPort() that gets called from
   OvsRemoveAndDeletePort() for the special processing for tunnel ports.

3. Folded in OvsCleanupVportCommon() back into OvsRemoveAndDeletePort(),
   since we only need a part of the functionality of
   OvsCleanupVportCommon() to be called from
   OvsTunnelVportPendingUninit(), and not the entire function.

4. Renamed OvsTunnelVportPendingUninit() to
   OvsTunnelVportPendingRemove() since it is basically a "pending" version
   of OvsVportTunnelRemove().

Validation:
- Add external port from Hyper-V, add external port from OVS, remove
external port from OVS, remove external port from Hyper-V. No ASSERT
hit.
- Add external port from Hyper-V, add external port from OVS, remove
external port from Hyper-V, remove external port from OVS. No ASSERT
hit.
- Vxlan tunnel port creation/deletion
- Stt tunnel port creation/deletion
- Ping on Vxlan/Stt tunnels
- Ovs Extension load/unload. There's an unrelated issue I found that is
reported in: https://github.com/openvswitch/ovs-issues/issues/86

Signed-off-by: Nithin Raju <nithin@vmware.com>V
Reported-at: https://github.com/openvswitch/ovs-issues/issues/79
Reported-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
Reported-by: Nithin Raju <nithin@vmware.com>
Acked-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
datapath-windows/ovsext/Vport.c