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.
The first patch cleans up async enqueue code, and the second patch enables rte_vhost_submit_enqueue_burst() to return completed packets. Jiayu Hu (2): vhost: cleanup async enqueue vhost: enhance async enqueue for small packets lib/librte_vhost/rte_vhost_async.h | 24 ++-- lib/librte_vhost/vhost.c | 14 +- lib/librte_vhost/vhost.h | 7 +- lib/librte_vhost/vhost_user.c | 7 +- lib/librte_vhost/virtio_net.c | 256 +++++++++++++++++++++---------------- 5 files changed, 171 insertions(+), 137 deletions(-) -- 2.7.4