summaryrefslogtreecommitdiff
path: root/datapath-windows/ovsext/User.c
diff options
context:
space:
mode:
authorSorin Vinturis <svinturis@cloudbasesolutions.com>2015-03-26 19:59:38 +0000
committerBen Pfaff <blp@nicira.com>2015-03-26 14:19:01 -0700
commitd016f8414d47c1fe93ba80902c1a5ee46b6fa9be (patch)
treee57c9f84f6238a037954e7dc847b7280af0861eb /datapath-windows/ovsext/User.c
parentba7f9d9019b28ee3331893b1771aa239b0bed005 (diff)
downloadopenvswitch-d016f8414d47c1fe93ba80902c1a5ee46b6fa9be.tar.gz
datapath-windows: Added specific pool tag for user code
All memory allocations within user code have 'USVO' 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>
Diffstat (limited to 'datapath-windows/ovsext/User.c')
-rw-r--r--datapath-windows/ovsext/User.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/datapath-windows/ovsext/User.c b/datapath-windows/ovsext/User.c
index d8a657e32..03f0377d9 100644
--- a/datapath-windows/ovsext/User.c
+++ b/datapath-windows/ovsext/User.c
@@ -85,7 +85,7 @@ OvsPurgePacketQueue(POVS_USER_PACKET_QUEUE queue,
LIST_FORALL_SAFE(&tmp, link, next) {
RemoveEntryList(link);
elem = CONTAINING_RECORD(link, OVS_PACKET_QUEUE_ELEM, link);
- OvsFreeMemory(elem);
+ OvsFreeMemoryWithTag(elem, OVS_USER_POOL_TAG);
}
}
@@ -132,13 +132,13 @@ OvsCleanupPacketQueue(POVS_OPEN_INSTANCE instance)
LIST_FORALL_SAFE(&tmp, link, next) {
RemoveEntryList(link);
elem = CONTAINING_RECORD(link, OVS_PACKET_QUEUE_ELEM, link);
- OvsFreeMemory(elem);
+ OvsFreeMemoryWithTag(elem, OVS_USER_POOL_TAG);
}
if (irp) {
OvsCompleteIrpRequest(irp, 0, STATUS_SUCCESS);
}
if (queue) {
- OvsFreeMemory(queue);
+ OvsFreeMemoryWithTag(queue, OVS_USER_POOL_TAG);
}
/* Verify if gOvsSwitchContext exists. */
@@ -170,7 +170,8 @@ OvsSubscribeDpIoctl(PVOID instanceP,
OvsReleasePidHashLock();
} else if (instance->packetQueue == NULL && join) {
- queue = (POVS_USER_PACKET_QUEUE) OvsAllocateMemory(sizeof *queue);
+ queue = (POVS_USER_PACKET_QUEUE) OvsAllocateMemoryWithTag(
+ sizeof *queue, OVS_USER_POOL_TAG);
if (queue == NULL) {
return STATUS_NO_MEMORY;
}
@@ -248,7 +249,7 @@ OvsReadDpIoctl(PFILE_OBJECT fileObject,
}
*replyLen = len;
- OvsFreeMemory(elem);
+ OvsFreeMemoryWithTag(elem, OVS_USER_POOL_TAG);
}
return STATUS_SUCCESS;
}
@@ -762,7 +763,7 @@ OvsQueuePackets(PLIST_ENTRY packetList,
while (!IsListEmpty(&dropPackets)) {
link = RemoveHeadList(&dropPackets);
elem = CONTAINING_RECORD(link, OVS_PACKET_QUEUE_ELEM, link);
- OvsFreeMemory(elem);
+ OvsFreeMemoryWithTag(elem, OVS_USER_POOL_TAG);
num++;
}
@@ -1060,7 +1061,8 @@ OvsCreateQueueNlPacket(PVOID userData,
dataLen + extraLen);
allocLen = sizeof (OVS_PACKET_QUEUE_ELEM) + nlMsgSize;
- elem = (POVS_PACKET_QUEUE_ELEM)OvsAllocateMemory(allocLen);
+ elem = (POVS_PACKET_QUEUE_ELEM)OvsAllocateMemoryWithTag(allocLen,
+ OVS_USER_POOL_TAG);
if (elem == NULL) {
ovsUserStats.dropDuetoResource++;
return NULL;
@@ -1163,6 +1165,6 @@ OvsCreateQueueNlPacket(PVOID userData,
return elem;
fail:
- OvsFreeMemory(elem);
+ OvsFreeMemoryWithTag(elem, OVS_USER_POOL_TAG);
return NULL;
}