[dpdk-dev] [PATCH] vhost: fix off-by-one error on nr_desc check

Maxime Coquelin maxime.coquelin at redhat.com
Mon Jul 25 17:28:47 CEST 2016



On 07/25/2016 05:24 PM, Yuanhan Liu wrote:
> On Mon, Jul 25, 2016 at 04:09:58PM +0200, Maxime Coquelin wrote:
>> nr_desc is not an index but the number of descriptors,
>> so can be equal to the virtqueue size.
>>
>> Fixes: a436f53ebfeb ("vhost: avoid dead loop chain")
>>
>> Cc: Yuanhan Liu <yuanhan.liu at linux.intel.com>
>> Signed-off-by: Maxime Coquelin <maxime.coquelin at redhat.com>
>
> Thanks for catching it!
>
>> ---
>> Hi Yuanhan,
>>
>> I faced the bug while testing my indirect descriptor patch, it happens
>> as soon as the number of chained descritors is above 2.
>>
>> But the bug may in theory also be faced with normal descriptors,
>
> In theory, yes, and only in one case, that there is a Tx has 256
> descriptors chained. If that happens, I doubt things work well.
> So I would say it just happens __in theory__.
Right.

>
>> so it might
>> be good to have it 16.07?
>
> Even though, it apparently fixes a bug, so I think we could have it
> for 16.07.
Good, but don't delay 16.07 for that! :)

>
> Acked-by: Yuanhan Liu <yuanhan.liu at linux.intel.com>
>
> 	--yliu
>

Thanks,
Maxime


More information about the dev mailing list