Skip to content

vhost-user multiple queues enabling

Yuanhan Liu dpdk-dev 5 versions – Applied

Status from this message: Applied, thanks

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v8 Latest8 patches 15 repliesApplied
  2. v78 patches 33 repliesSuperseded
  3. v613 patches 23 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v5 posting 2/212 patches34 repliesApplied
v5 posting 1/212 patches1 replySuperseded

Changes in v8 from the cover letter

- put SET_VRING_ENABLE() patch before the patch actually enable mq, since that make more sense.

- don't change the kickfd reset behavior for patch 3

- move virt_queue field to the end of virtio_net struct.

- comment and type fixe

Patches in v8 Applied

#Subject and filesSizeRepliesApplied
1/8vhost-user: add protocol features supportlib/librte_vhost/rte_virtio_net.h lib/librte_vhost/vhost_user/vhost-net-user.c lib/librte_vhost/vhost_user/vhost-net-user.h +3 more+37 -20 replies
2/8vhost-user: add VHOST_USER_GET_QUEUE_NUM messagelib/librte_vhost/vhost_user/vhost-net-user.c lib/librte_vhost/vhost_user/vhost-net-user.h+8 -00 replies
3/8vhost: vring queue setup for multiple queue supportlib/librte_vhost/rte_virtio_net.h lib/librte_vhost/vhost_user/virtio-net-user.c lib/librte_vhost/virtio-net.c+123 -8210 replies
4/8vhost: rxtx: use queue id instead of constant ring indexlib/librte_vhost/vhost_rxtx.c+29 -140 replies
5/8virtio: fix deadloop due to reading virtio_net_config incorrectlydrivers/net/virtio/virtio_ethdev.c+11 -50 replies
6/8vhost: add VHOST_USER_SET_VRING_ENABLE messagelib/librte_vhost/rte_virtio_net.h lib/librte_vhost/vhost_rxtx.c lib/librte_vhost/vhost_user/vhost-net-user.c +4 more+63 -40 replies
7/8vhost-user: enable vhost-user multiple queuelib/librte_vhost/vhost_user/virtio-net-user.h lib/librte_vhost/virtio-net.c+4 -10 replies
8/8doc: update release note for vhost-user mq supportdoc/guides/rel_notes/release_2_2.rst+4 -02 replies

Reviews trailers per patch

7 of 8 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchFlavio LeitnerHuawei Xie
SeriesA-b
1/8A-b
2/8A-b
3/8A-b A-b
4/8A-b
5/8A-b
6/8A-b
7/8A-b
8/8

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v8 thread

Cover letter [PATCH v8 0/8] vhost-user multiple queues enabling

This patch set enables vhost-user multiple queue feature.

v8:

- put SET_VRING_ENABLE() patch before the patch actually enable mq, since that make more sense.

- don't change the kickfd reset behavior for patch 3

- move virt_queue field to the end of virtio_net struct.

- comment and type fixe

v7:

- Removed vhost-user mq examples in this patch set

Because the example leverages the hardware VMDq feature to demonstrate the mq feature, which introduces too much limitation, yet it's turned out to be not elegant.

- Commit log fixes

- Dropped the patch to fix RESET_OWNER handling, as I found Jerome's solution works as well, and it makes more sense to me:

http://dpdk.org/dev/patchwork/project/dpdk/list/?submitter=354

Overview
========

It depends on some QEMU patches that has already been merged to upstream. Those qemu patches introduce some new vhost-user messages, for vhost-user mq enabling negotiation. Here is the main negotiation steps (Qemu as master, and DPDK vhost-user as slave):

- Master queries features by VHOST_USER_GET_FEATURES from slave

- Check if VHOST_USER_F_PROTOCOL_FEATURES exist. If not, mq is not supported. (check patch 1 for why VHOST_USER_F_PROTOCOL_FEATURES is introduced)

- Master then sends another command, VHOST_USER_GET_QUEUE_NUM, for querying how many queues the slave supports.

Master will compare the result with the requested queue number. Qemu exits if the former is smaller.

- Master then tries to initiate all queue pairs by sending some vhost user commands, including VHOST_USER_SET_VRING_CALL, which will trigger the slave to do related vring setup, such as vring allocation.

Till now, all necessary initiation and negotiation are done. And master could send another message, VHOST_USER_SET_VRING_ENABLE, to enable/disable a specific queue dynamically later.

Patchset
========

Patch 1-6 are all prepare works for enabling mq; they are all atomic changes, with "do not breaking anything" beared in mind while making them.

Patch 7 actually enables mq feature, by setting two key feature flags.

Test with OVS
=============

Marcel created a simple yet quite clear test guide with OVS at:

http://wiki.qemu.org/Features/vhost-user-ovs-dpdk

---
Changchun Ouyang (3):
vhost: rxtx: use queue id instead of constant ring index
virtio: fix deadloop due to reading virtio_net_config incorrectly
vhost: add VHOST_USER_SET_VRING_ENABLE message

Yuanhan Liu (5):
vhost-user: add protocol features support
vhost-user: add VHOST_USER_GET_QUEUE_NUM message
vhost: vring queue setup for multiple queue support
vhost-user: enable vhost-user multiple queue
doc: update release note for vhost-user mq support

 doc/guides/rel_notes/release_2_2.rst          |   4 +
 drivers/net/virtio/virtio_ethdev.c            |  16 ++-
 lib/librte_vhost/rte_virtio_net.h             |  13 +-
 lib/librte_vhost/vhost_rxtx.c                 |  53 +++++---
 lib/librte_vhost/vhost_user/vhost-net-user.c  |  25 +++-
 lib/librte_vhost/vhost_user/vhost-net-user.h  |   4 +
 lib/librte_vhost/vhost_user/virtio-net-user.c |  86 ++++++++++---
 lib/librte_vhost/vhost_user/virtio-net-user.h |  10 ++
 lib/librte_vhost/virtio-net.c                 | 168 ++++++++++++++++----------
 9 files changed, 275 insertions(+), 104 deletions(-)
Signature · 1 line
1.9.0