[dpdk-dev] [PATCH v5 resend 12/12] examples/vhost: add per queue stats

2015-09-19 Thread Yuanhan Liu
From: Changchun Ouyang Signed-off-by: Changchun Ouyang Signed-off-by: Yuanhan Liu --- examples/vhost/main.c | 97 +-- 1 file changed, 56 insertions(+), 41 deletions(-) diff --git a/examples/vhost/main.c

[dpdk-dev] [PATCH v5 resend 11/12] examples/vhost: demonstrate the usage of vhost mq feature

2015-09-19 Thread Yuanhan Liu
From: Changchun Ouyang This patch demonstrates the usage of vhost mq feature, by leveraging the VMDq+RSS HW feature to receive packets and distribute them into different queue in the pool according to 5 tuples. Queue number is specified by the --rxq option. HW queue

[dpdk-dev] [PATCH v5 resend 10/12] ixgbe: support VMDq RSS in non-SRIOV environment

2015-09-19 Thread Yuanhan Liu
From: Changchun Ouyang In non-SRIOV environment, VMDq RSS could be enabled by MRQC register. In theory, the queue number per pool could be 2 or 4, but only 2 queues are available due to HW limitation, the same limit also exists in Linux ixgbe driver. Signed-off-by:

[dpdk-dev] [PATCH v5 resend 09/12] vhost: add API bind a virtq to a specific core

2015-09-19 Thread Yuanhan Liu
From: Changchun Ouyang The new API rte_vhost_core_id_set() is to bind a virtq to a specific core, while the another API rte_vhost_core_id_get() is for getting the bind core for a virtq. The usage, which will be introduced soon, could be find at examles/vhost/main.c.

[dpdk-dev] [PATCH v5 resend 08/12] vhost-user: enable vhost-user multiple queue

2015-09-19 Thread Yuanhan Liu
By setting VHOST_USER_PROTOCOL_F_MQ protocol feature bit, and VIRTIO_NET_F_MQ feature bit. Signed-off-by: Yuanhan Liu --- lib/librte_vhost/vhost_user/virtio-net-user.h | 4 +++- lib/librte_vhost/virtio-net.c | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git

[dpdk-dev] [PATCH v5 resend 07/12] virtio: resolve for control queue

2015-09-19 Thread Yuanhan Liu
From: Changchun Ouyang Fix the max virtio queue pair read issue. Control queue can't work for vhost-user mulitple queue mode, so introduce a counter to void the dead loop when polling the control queue. Signed-off-by: Changchun Ouyang Signed-off-by: Yuanhan Liu

[dpdk-dev] [PATCH v5 resend 06/12] vhost-user: handle VHOST_USER_RESET_OWNER correctly

2015-09-19 Thread Yuanhan Liu
Destroy corresponding device when a VHOST_USER_RESET_OWNER message is received, otherwise, the vhost-switch would still try to access vq of that device, which results to SIGSEG fault, and let vhost-switch crash in the end. Signed-off-by: Changchun Ouyang Signed-off-by: Yuanhan Liu ---

[dpdk-dev] [PATCH v5 resend 05/12] vhost: add VHOST_USER_SET_VRING_ENABLE message

2015-09-19 Thread Yuanhan Liu
From: Changchun Ouyang This message is used to enable/disable a specific vring queue pair. The first queue pair is enabled by default. Signed-off-by: Changchun Ouyang Signed-off-by: Yuanhan Liu --- lib/librte_vhost/rte_virtio_net.h | 1 +

[dpdk-dev] [PATCH v5 resend 04/12] vhost: rxtx: prepare work for multiple queue support

2015-09-19 Thread Yuanhan Liu
From: Changchun Ouyang Do not use VIRTIO_RXQ or VIRTIO_TXQ anymore; use the queue_id, instead, which will be set to a proper value for a specific queue when we have multiple queue support enabled. For now, queue_id is still set with VIRTIO_RXQ or VIRTIO_TXQ, so it

[dpdk-dev] [PATCH v5 resend 03/12] vhost: vring queue setup for multiple queue support

2015-09-19 Thread Yuanhan Liu
All queue pairs, including the default (the first) queue pair, are allocated dynamically, when a vring_call message is received first time for a specific queue pair. This is a refactor work for enabling vhost-user multiple queue; it should not break anything as it does no functional changes: we

[dpdk-dev] [PATCH v5 resend 02/12] vhost-user: add VHOST_USER_GET_QUEUE_NUM message

2015-09-19 Thread Yuanhan Liu
To tell the frontend (qemu) how many queue pairs we support. And it is initiated to VIRTIO_NET_CTRL_MQ_VQ_PAIRS_MAX. Signed-off-by: Yuanhan Liu --- lib/librte_vhost/vhost_user/vhost-net-user.c | 7 +++ lib/librte_vhost/vhost_user/vhost-net-user.h | 1 + 2 files changed, 8 insertions(+)

[dpdk-dev] [PATCH v5 resend 01/12] vhost-user: add protocol features support

2015-09-19 Thread Yuanhan Liu
The two protocol features messages are introduced by qemu vhost maintainer(Michael) for extendting vhost-user interface. Here is an excerpta from the vhost-user spec: Any protocol extensions are gated by protocol feature bits, which allows full backwards compatibility on both master

[dpdk-dev] [PATCH v5 resend 00/12] vhost-user multiple queues enabling

2015-09-19 Thread Yuanhan Liu
This patch set enables vhost-user multiple queues. Overview It depends on some QEMU patches that, hopefully, will be merged soon. 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-dev] [PATCH v5 00/12] vhost-user multiple queues enabling

2015-09-19 Thread Yuanhan Liu
Sorry that I typed wrong email address of Changchun; I will resend them. Sorry for the noisy. --yliu On Fri, Sep 18, 2015 at 11:01:01PM +0800, Yuanhan Liu wrote: > This patch set enables vhost-user multiple queues. > > Overview > > > It depends on some QEMU patches that,

[dpdk-dev] [PATCH v5 12/12] examples/vhost: add per queue stats

2015-09-19 Thread Yuanhan Liu
From: Changchun Ouyang Signed-off-by: Changchun Ouyang Signed-off-by: Yuanhan Liu --- examples/vhost/main.c | 97 +-- 1 file changed, 56 insertions(+), 41 deletions(-) diff --git a/examples/vhost/main.c

[dpdk-dev] [PATCH v5 11/12] examples/vhost: demonstrate the usage of vhost mq feature

2015-09-19 Thread Yuanhan Liu
From: Changchun Ouyang This patch demonstrates the usage of vhost mq feature, by leveraging the VMDq+RSS HW feature to receive packets and distribute them into different queue in the pool according to 5 tuples. Queue number is specified by the --rxq option. HW queue

[dpdk-dev] [PATCH v5 10/12] ixgbe: support VMDq RSS in non-SRIOV environment

2015-09-19 Thread Yuanhan Liu
From: Changchun Ouyang In non-SRIOV environment, VMDq RSS could be enabled by MRQC register. In theory, the queue number per pool could be 2 or 4, but only 2 queues are available due to HW limitation, the same limit also exists in Linux ixgbe driver. Signed-off-by:

[dpdk-dev] [PATCH v5 09/12] vhost: add API bind a virtq to a specific core

2015-09-19 Thread Yuanhan Liu
From: Changchun Ouyang The new API rte_vhost_core_id_set() is to bind a virtq to a specific core, while the another API rte_vhost_core_id_get() is for getting the bind core for a virtq. The usage, which will be introduced soon, could be find at examles/vhost/main.c.

[dpdk-dev] [PATCH v5 08/12] vhost-user: enable vhost-user multiple queue

2015-09-19 Thread Yuanhan Liu
By setting VHOST_USER_PROTOCOL_F_MQ protocol feature bit, and VIRTIO_NET_F_MQ feature bit. Signed-off-by: Yuanhan Liu --- lib/librte_vhost/vhost_user/virtio-net-user.h | 4 +++- lib/librte_vhost/virtio-net.c | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git

[dpdk-dev] [PATCH v5 07/12] virtio: resolve for control queue

2015-09-19 Thread Yuanhan Liu
From: Changchun Ouyang Fix the max virtio queue pair read issue. Control queue can't work for vhost-user mulitple queue mode, so introduce a counter to void the dead loop when polling the control queue. Signed-off-by: Changchun Ouyang Signed-off-by: Yuanhan Liu

[dpdk-dev] [PATCH v5 06/12] vhost-user: handle VHOST_USER_RESET_OWNER correctly

2015-09-19 Thread Yuanhan Liu
Destroy corresponding device when a VHOST_USER_RESET_OWNER message is received, otherwise, the vhost-switch would still try to access vq of that device, which results to SIGSEG fault, and let vhost-switch crash in the end. Signed-off-by: Changchun Ouyang Signed-off-by: Yuanhan Liu ---

[dpdk-dev] [PATCH v5 05/12] vhost: add VHOST_USER_SET_VRING_ENABLE message

2015-09-19 Thread Yuanhan Liu
From: Changchun Ouyang This message is used to enable/disable a specific vring queue pair. The first queue pair is enabled by default. Signed-off-by: Changchun Ouyang Signed-off-by: Yuanhan Liu --- lib/librte_vhost/rte_virtio_net.h | 1 +

[dpdk-dev] [PATCH v5 04/12] vhost: rxtx: prepare work for multiple queue support

2015-09-19 Thread Yuanhan Liu
From: Changchun Ouyang Do not use VIRTIO_RXQ or VIRTIO_TXQ anymore; use the queue_id, instead, which will be set to a proper value for a specific queue when we have multiple queue support enabled. For now, queue_id is still set with VIRTIO_RXQ or VIRTIO_TXQ, so it

[dpdk-dev] [PATCH v5 03/12] vhost: vring queue setup for multiple queue support

2015-09-19 Thread Yuanhan Liu
All queue pairs, including the default (the first) queue pair, are allocated dynamically, when a vring_call message is received first time for a specific queue pair. This is a refactor work for enabling vhost-user multiple queue; it should not break anything as it does no functional changes: we

[dpdk-dev] [PATCH v5 01/12] vhost-user: add protocol features support

2015-09-19 Thread Yuanhan Liu
The two protocol features messages are introduced by qemu vhost maintainer(Michael) for extendting vhost-user interface. Here is an excerpta from the vhost-user spec: Any protocol extensions are gated by protocol feature bits, which allows full backwards compatibility on both master

[dpdk-dev] [PATCH v5 00/12] vhost-user multiple queues enabling

2015-09-19 Thread Yuanhan Liu
This patch set enables vhost-user multiple queues. Overview It depends on some QEMU patches that, hopefully, will be merged soon. 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