vhost: fix off-by-one error on descriptor number check
authorMaxime Coquelin <maxime.coquelin@redhat.com>
Mon, 25 Jul 2016 14:09:58 +0000 (16:09 +0200)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Mon, 25 Jul 2016 15:55:12 +0000 (17:55 +0200)
commitb7aabd7a87cee66ec3c8e010ee45e0ca70d0d914
tree24140d8ca9c8c880d5d8618d4200710ceb8c4dba
parent20d159f2054383c46529e301aac723a823c670cb
vhost: fix off-by-one error on descriptor number check

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")

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
lib/librte_vhost/vhost_rxtx.c