datapath-windows: Added specific pool tag for vxlan code
authorSorin Vinturis <svinturis@cloudbasesolutions.com>
Thu, 26 Mar 2015 19:59:37 +0000 (19:59 +0000)
committerBen Pfaff <blp@nicira.com>
Thu, 26 Mar 2015 21:18:51 +0000 (14:18 -0700)
All memory allocations within vxlan code have 'XSVO' pool tag.

Signed-off-by: Sorin Vinturis <svinturis@cloudbasesolutions.com>
Reported-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
Reported-at: https://github.com/openvswitch/ovs-issues/issues/56
Acked-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
Acked-by: Eitan Eliahu <eliahue@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
datapath-windows/ovsext/Util.h
datapath-windows/ovsext/Vxlan.c

index 907cd3c..c153acf 100644 (file)
@@ -27,6 +27,7 @@
 #define OVS_DATAPATH_POOL_TAG           'DSVO'
 #define OVS_EVENT_POOL_TAG              'ESVO'
 #define OVS_FLOW_POOL_TAG               'LSVO'
+#define OVS_VXLAN_POOL_TAG              'XSVO'
 
 VOID *OvsAllocateMemory(size_t size);
 VOID *OvsAllocateMemoryWithTag(size_t size, ULONG tag);
index 1ce5af2..8c57185 100644 (file)
@@ -59,7 +59,8 @@ OvsInitVxlanTunnel(POVS_VPORT_ENTRY vport,
 {
     POVS_VXLAN_VPORT vxlanPort;
 
-    vxlanPort = OvsAllocateMemory(sizeof (*vxlanPort));
+    vxlanPort = OvsAllocateMemoryWithTag(sizeof (*vxlanPort),
+                                         OVS_VXLAN_POOL_TAG);
     if (vxlanPort == NULL) {
         return STATUS_INSUFFICIENT_RESOURCES;
     }
@@ -86,7 +87,7 @@ OvsCleanupVxlanTunnel(POVS_VPORT_ENTRY vport)
         return;
     }
 
-    OvsFreeMemory(vport->priv);
+    OvsFreeMemoryWithTag(vport->priv, OVS_VXLAN_POOL_TAG);
     vport->priv = NULL;
 }