vhost: fix packed ring zero-copy
authorMarvin Liu <yong.liu@intel.com>
Mon, 24 Feb 2020 15:14:19 +0000 (23:14 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 21 Apr 2020 11:57:07 +0000 (13:57 +0200)
commit2a0ff4d55445988629e1a00afdf542c5e62387fa
tree52f668a56fe048d47a99a7d22d145b7e9684db5d
parent39f59f37ee410bbc43e88b3595108d9e2cffc132
vhost: fix packed ring zero-copy

Available buffer ID should be stored in the zmbuf in the packed-ring
dequeue path. There's no guarantee that local queue avail index is
equal to buffer ID.

Fixes: d1eafb532268 ("vhost: add packed ring zcopy batch and single dequeue")
Cc: stable@dpdk.org
Signed-off-by: Marvin Liu <yong.liu@intel.com>
Reported-by: Yinan Wang <yinan.wang@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
lib/librte_vhost/virtio_net.c