On Tue, Apr 4, 2017 at 5:20 PM, Bill Fischofer
<[email protected]> wrote:
> This is clearly orthogonal to this patch series. Ideally you should
> (a) Create a Bug to represent this, (b) Post the fix patch noting the
> Bug URL in the commit log, and (c) update the Bug entry with the URL
> of the patch that fixes this bug.
>
> On Tue, Apr 4, 2017 at 1:47 PM, Brian Brooks <[email protected]> wrote:
>> Signed-off-by: Kevin Wang <[email protected]>
>> Reviewed-by: Ola Liljedahl <[email protected]>
>> Reviewed-by: Brian Brooks <[email protected]>
>> ---
>>  platform/linux-generic/pktio/loop.c | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/platform/linux-generic/pktio/loop.c 
>> b/platform/linux-generic/pktio/loop.c
>> index 70962839..49d8a211 100644
>> --- a/platform/linux-generic/pktio/loop.c
>> +++ b/platform/linux-generic/pktio/loop.c
>> @@ -176,6 +176,7 @@ static int loopback_send(pktio_entry_t *pktio_entry, int 
>> index ODP_UNUSED,
>>                 pktio_entry->s.stats.out_octets += bytes;
>>         } else {
>>                 ODP_DBG("queue enqueue failed %i\n", ret);
>> +               odp_ticketlock_unlock(&pktio_entry->s.txl);
>>                 return -1;
>
> A better fix to this is to just delete the return -1 since that will
> result in the following unlock being executed and ret being returned
> as the return code from this routine.

Correction, change return -1 to ret = -1 since the test on the if if
(ret > 0) and we want to return a negative if ret = 0 from
odp_enqueue_multi().

>
>>         }
>>
>> --
>> 2.12.2
>>

Reply via email to