vhost: fix batch enqueue only handle few packets
authorMarvin Liu <yong.liu@intel.com>
Thu, 7 Nov 2019 14:37:48 +0000 (22:37 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 8 Nov 2019 22:15:05 +0000 (23:15 +0100)
commitaa74c383d4ed636db26b50638e6d9f8ecb6280fd
treef7123dcf1863aa4f1d6b73b7dbc033df01f29aa3
parent4da3dd488511698364bc64477af3d836406ed9c5
vhost: fix batch enqueue only handle few packets

After enqueue function finished, packet index has been increased. Batch
enqueue function should retrieve mbuf structure pointed by that index.

Fixes: 0294211bb6dc ("vhost: optimize packed ring enqueue")

Signed-off-by: Marvin Liu <yong.liu@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
lib/librte_vhost/virtio_net.c