mbox series

[v4,0/2] Enhance Async Enqueue for Small Packets

Message ID 1610367387-117188-1-git-send-email-jiayu.hu@intel.com (mailing list archive)
Headers
Series Enhance Async Enqueue for Small Packets |

Message

Hu, Jiayu Jan. 11, 2021, 12:16 p.m. UTC
  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.

Change log
==========
v4:
- support new API in vhost example
v3:
- fix incorrect ret value when DMA ring is full
- enhance description of API declaration and programmer guide
v2:
- fix typo
- rename API variables
- update programmer guide

Jiayu Hu (2):
  vhost: cleanup async enqueue
  vhost: enhance async enqueue for small packets

 doc/guides/prog_guide/vhost_lib.rst |   8 +-
 examples/vhost/main.c               |  18 ++-
 lib/librte_vhost/rte_vhost_async.h  |  34 +++--
 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       | 258 ++++++++++++++++++++----------------
 7 files changed, 200 insertions(+), 146 deletions(-)
  

Comments

Maxime Coquelin Jan. 11, 2021, 3:02 p.m. UTC | #1
On 1/11/21 1:16 PM, Jiayu Hu wrote:
> 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.
> 
> Change log
> ==========
> v4:
> - support new API in vhost example
> v3:
> - fix incorrect ret value when DMA ring is full
> - enhance description of API declaration and programmer guide
> v2:
> - fix typo
> - rename API variables
> - update programmer guide
> 
> Jiayu Hu (2):
>   vhost: cleanup async enqueue
>   vhost: enhance async enqueue for small packets
> 
>  doc/guides/prog_guide/vhost_lib.rst |   8 +-
>  examples/vhost/main.c               |  18 ++-
>  lib/librte_vhost/rte_vhost_async.h  |  34 +++--
>  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       | 258 ++++++++++++++++++++----------------
>  7 files changed, 200 insertions(+), 146 deletions(-)
> 

Applied to dpdk-next-virtio/main.

Thanks,
Maxime