On Oct 21, 2014, at 5:24 PM, Ankur Sharma <ankursha...@vmware.com> wrote:
> Refactored CreateQueue function so that packets are enqueued to correct > corresponding queue. > > Signed-off-by: Ankur Sharma <ankursha...@vmware.com> Looks good mostly. One comment I had was if it was the right thing to use gOvsControlLock. This can lead to a deadlock. Consider the following sequence: Context #1 executing OvsDeviceControl() code to do vport add: 1. Acquires gOvsControlLock 2. Acquires dispatch lock Context #2 executing packet processing code: 1. Acquires dispatch lock 2. Acquires gOvsControlLock for enqueueing packets We should add a separate lock for PID, and not use the gOvsControlLock. > @@ -932,6 +943,10 @@ OvsGetPid(POVS_VPORT_ENTRY vport, PNET_BUFFER nb, UINT32 > *pid) > { > UNREFERENCED_PARAMETER(nb); > > + if (!vport) { > + return STATUS_INVALID_PARAMETER; > + } The existing code already checks for vport == NULL before calling OvsGetPid(). We can just ASSERT() here. thanks, -- Nithin _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev