vhost: fix desc access in relay helpers
authorTiwei Bie <tiwei.bie@intel.com>
Fri, 4 Jan 2019 04:06:37 +0000 (12:06 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Mon, 14 Jan 2019 16:44:29 +0000 (17:44 +0100)
commite218fa09f4a8e9ce21798ecf0582062e4a94d2b3
tree6e5cbb9a93c4cc235f8d2c741edddd2f49205b49
parent8532a0fcd8f2cf3a5d3189b453bd90a69991b1b1
vhost: fix desc access in relay helpers

Descs in desc table should be indexed using the desc idx
instead of the idx of avail ring and used ring.

Fixes: b13ad2decc83 ("vhost: provide helpers for virtio ring relay")

Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
lib/librte_vhost/vdpa.c