[ovs-dev] datapath-windows: Add corresponding tag for tunnel context allocations
diff mbox

Message ID 1441098681-9701-1-git-send-email-svinturis@cloudbasesolutions.com
State Accepted
Headers show

Commit Message

Sorin Vinturis Sept. 2, 2015, 1:37 p.m. UTC
Signed-off-by: Sorin Vinturis <svinturis@cloudbasesolutions.com>
---
 datapath-windows/ovsext/Vport.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Nithin Raju Sept. 2, 2015, 4:11 p.m. UTC | #1
> On Sep 2, 2015, at 6:37 AM, Sorin Vinturis <svinturis@cloudbasesolutions.com> wrote:
> 
> Signed-off-by: Sorin Vinturis <svinturis@cloudbasesolutions.com>
> ---
> datapath-windows/ovsext/Vport.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/datapath-windows/ovsext/Vport.c b/datapath-windows/ovsext/Vport.c
> index 6b74ec2..38cf878 100644
> --- a/datapath-windows/ovsext/Vport.c
> +++ b/datapath-windows/ovsext/Vport.c
> @@ -1267,7 +1267,9 @@ OvsRemoveTunnelVport(POVS_USER_PARAMS_CONTEXT usrParamsCtx,
>     POVS_TUNFLT_INIT_CONTEXT tunnelContext = NULL;
>     PIRP irp = NULL;
> 
> -    tunnelContext = OvsAllocateMemory(sizeof(*tunnelContext));
> +    tunnelContext = (POVS_TUNFLT_INIT_CONTEXT)
> +        OvsAllocateMemoryWithTag(sizeof(*tunnelContext),
> +                                 OVS_VPORT_POOL_TAG);

Do we need the typecast? The return is a VOID *, similar to what we had for OvsAllocateMemory().

Looks good otherwise.

Acked-by: Nithin Raju <nithin@vmware.com>

Patch
diff mbox

diff --git a/datapath-windows/ovsext/Vport.c b/datapath-windows/ovsext/Vport.c
index 6b74ec2..38cf878 100644
--- a/datapath-windows/ovsext/Vport.c
+++ b/datapath-windows/ovsext/Vport.c
@@ -1267,7 +1267,9 @@  OvsRemoveTunnelVport(POVS_USER_PARAMS_CONTEXT usrParamsCtx,
     POVS_TUNFLT_INIT_CONTEXT tunnelContext = NULL;
     PIRP irp = NULL;
 
-    tunnelContext = OvsAllocateMemory(sizeof(*tunnelContext));
+    tunnelContext = (POVS_TUNFLT_INIT_CONTEXT)
+        OvsAllocateMemoryWithTag(sizeof(*tunnelContext),
+                                 OVS_VPORT_POOL_TAG);
     if (tunnelContext == NULL) {
         return STATUS_INSUFFICIENT_RESOURCES;
     }