vhost: fix shadowed descriptors not flushed
authorMarvin Liu <yong.liu@intel.com>
Fri, 17 Apr 2020 01:16:09 +0000 (09:16 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 21 Apr 2020 11:57:09 +0000 (13:57 +0200)
commitc7de6f9be56793a681964b2ff3ee234e9d1d551a
tree57a3b806f530b0b57cc723d934015fabba3a7c29
parent8b13d12a16e7da07326f75bb8b5b82a39bdcbe9e
vhost: fix shadowed descriptors not flushed

When ring size or enqueue packets not aligned with batch number, it is
possible that descs update still kept in shadowed used structure when
batched enqueue. Fix this issue by flushing remained shadowed used descs
before batch flush.

Fixes: f41516c309d7 ("vhost: flush batched enqueue descs directly")
Cc: stable@dpdk.org
Signed-off-by: Marvin Liu <yong.liu@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
lib/librte_vhost/virtio_net.c