On Oct 21, 2014, at 5:24 PM, Ankur Sharma <ankursha...@vmware.com> wrote:

> In this patch we have added APIs for insert, delete and search APIs.
> 
> Signed-off-by: Ankur Sharma <ankursha...@vmware.com>

Looks good but for minor comments I had. Please wrap variable names with single 
quotes, such as 'gOvsCtrlLock'. I know it is not consistently followed in 
existing code :) This need not be done for this patch.

> +VOID
> +OvsDelPidInstance(POVS_SWITCH_CONTEXT switchContext, UINT32 pid)
> +{
> +    POVS_OPEN_INSTANCE instance = OvsGetPidInstance(switchContext, pid);
> +
> +    if (instance) {
> +        RemoveEntryList(&(instance->pidLink));

Also, please do to re-initialize the instance->pidLink. Otherwise, it is kind 
of left with dangling pointers. This is not an issue if the instance is being 
freed away in the same function here, but since the instance continues to live, 
it is better to reset the contents of 'pidLink'.

Use: InitializeListHead(&(instance->pidLink));

Acked-by: Nithin Raju <nit...@vmware.com>
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to