vhost: enhance async enqueue for small packets
authorJiayu Hu <jiayu.hu@intel.com>
Mon, 11 Jan 2021 12:16:27 +0000 (07:16 -0500)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 13 Jan 2021 17:51:58 +0000 (18:51 +0100)
commit1b7b24389cee5baa421d334048782e3e99e7dec5
treea9b61d3286dac6dcd9c9ffd007acfae36ea92929
parent9ab57ef196d007a50dc64a50c1c0c9b485bdbdce
vhost: enhance async enqueue for small packets

Async enqueue offloads large copies to DMA devices, and small copies
are still performed by the CPU. However, it requires users to get
enqueue completed packets by rte_vhost_poll_enqueue_completed(), even
if they are completed by the CPU when rte_vhost_submit_enqueue_burst()
returns. This design incurs extra overheads of tracking completed
pktmbufs and function calls, thus degrading performance on small packets.

This patch enhances async enqueue for small packets by enabling
rte_vhost_submit_enqueue_burst() to return completed packets.

Signed-off-by: Jiayu Hu <jiayu.hu@intel.com>
Tested-by: Yinan Wang <yinan.wang@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
doc/guides/prog_guide/vhost_lib.rst
examples/vhost/main.c
lib/librte_vhost/rte_vhost_async.h
lib/librte_vhost/vhost.c
lib/librte_vhost/vhost.h
lib/librte_vhost/vhost_user.c
lib/librte_vhost/virtio_net.c