[dpdk-dev] [PATCH v2] example/vhost_blk: fix buffer not null terminated

2020-05-15 Thread Jin Yu
In vhost_blk_bdev_construct: The string buffer may not have a null terminator if the source string's length is equal to the buffer size. Fixes: 91d3e2d42997 ("examples/vhost_blk: refactor to increase readability") Cc: jin...@intel.com Signed-off-by: Jin Yu --- V2 - update the

[dpdk-dev] [PATCH] example/vhost_blk: fix buffer not null terminated

2020-05-07 Thread Jin Yu
Fix the potential bug. Signed-off-by: Jin Yu --- examples/vhost_blk/vhost_blk.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/examples/vhost_blk/vhost_blk.c b/examples/vhost_blk/vhost_blk.c index f08473f58..b5ce3332a 100644 --- a/examples/vhost_blk/vhost_blk.c +++ b

[dpdk-dev] [PATCH v2] examples/vhost_blk: refactor vhost-blk example

2020-04-30 Thread Jin Yu
introduce vhost storage sample") Signed-off-by: Jin Yu --- V2 - fix build error in 32-bit --- doc/guides/sample_app_ug/vhost_blk.rst |8 +- examples/vhost_blk/blk.c | 13 +- examples/vhost_blk/vhost_blk.c | 1139 ++-- examples/vhost_

[dpdk-dev] [PATCH] examples/vhost_blk: refactor vhost-blk example

2020-02-28 Thread Jin Yu
introduce vhost storage sample") Signed-off-by: Jin Yu --- doc/guides/sample_app_ug/vhost_blk.rst |8 +- examples/vhost_blk/blk.c | 13 +- examples/vhost_blk/vhost_blk.c | 1139 ++-- examples/vhost_blk/vhost_blk.h | 39 +- 4 fil

[dpdk-dev] [PATCH v2] examples/vhost_blk: fix the TOCTOU

2020-02-11 Thread Jin Yu
Coverity issue: 350589 158663 Fixes: c19beb3f38cd ("examples/vhost_blk: introduce vhost storage sample") Cc: sta...@dpdk.org Signed-off-by: Jin Yu Reviewed-by: Maxime Coquelin --- V2 - complement the commit message. --- examples/vhost_blk/vhost_blk.c | 9 ++--- 1 file changed

[dpdk-dev] [PATCH v2] examples/vhost_blk: fix the TOCTOU

2020-02-10 Thread Jin Yu
Coverity issue: 350589 158663 Fixes: c19beb3f38cd ("examples/vhost_blk: introduce vhost storage sample") Cc: sta...@dpdk.org Signed-off-by: Jin Yu Reviewed-by: Maxime Coquelin --- V2 - complement the commit message. --- examples/vhost_blk/vhost_blk.c | 9 ++--- 1 file changed

[dpdk-dev] [PATCH] vhost: add protocol feature check

2019-12-24 Thread Jin Yu
Add VHOST_USER_PROTOCOL_F_INFLIGHT_SHMFD check in getting inflight ring functions. Fixes: 4d891f77ddfa ("vhost: add APIs to get inflight ring") Cc: sta...@dpdk.org Signed-off-by: Jin Yu --- lib/librte_vhost/vhost.c | 8 1 file changed, 8 insertions(+) diff --git a/lib/li

[dpdk-dev] [PATCH] vhost: fix the inflight resubmit check

2019-12-24 Thread Jin Yu
The frontend may not send the get_inflight_fd and set_inflight_fd although we negotiate the protocol feature. When we meet this situation just return OK. Fixes: ad0a4ae491fe ("vhost: checkout resubmit inflight information") Cc: sta...@dpdk.org Signed-off-by: Jin Yu --- lib/li

[dpdk-dev] [PATCH v2] vhost-blk: fix the unused return value

2019-11-26 Thread Jin Yu
add the assert to handle error. Coverity issue: 350592 Fixes: c19beb3f38cd ("examples/vhost_blk: introduce vhost storage sample") Cc: sta...@dpdk.org Signed-off-by: Jin Yu --- v2 - add the error hander --- examples/vhost_blk/vhost_blk.c | 1 + 1 file changed, 1 insertion(+) di

[dpdk-dev] [PATCH] vhost-blk: delete the unused return value

2019-11-25 Thread Jin Yu
Coverity issue: 350592 Fixes: c19beb3f38cd ("examples/vhost_blk: introduce vhost storage sample") Cc: sta...@dpdk.org Signed-off-by: Jin Yu --- examples/vhost_blk/vhost_blk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/vhost_blk/vhost_blk.c b/examples

[dpdk-dev] [PATCH] examples/vhost_blk: fix the TOCTOU

2019-11-25 Thread Jin Yu
Fix the time of check time of use warning in example code Coverity issue: 350589 158663 Fixes: c19beb3f38cd ("examples/vhost_blk: introduce vhost storage sample") Cc: sta...@dpdk.org Signed-off-by: Jin Yu --- examples/vhost_blk/vhost_blk.c | 9 ++--- 1 file changed, 2 insert

[dpdk-dev] [PATCH] vhost: fix insecure temporary file

2019-11-25 Thread Jin Yu
When using mkstemp(), remember to safely set the umask before to restrict the resulting temporary file permissions to only the owner. Coverity issue: 350367 Fixes: d87f1a1cb7b6 ("vhost: support inflight info sharing") Cc: sta...@dpdk.org Signed-off-by: Jin Yu --- lib/librte_vhost/vh

[dpdk-dev] [PATCH v6] vhost: add vhost-user-blk example which support inflight

2019-11-04 Thread Jin Yu
A vhost-user-blk example that support inflight feature. It uses the new APIs that introduced in the first patch, so it can show how these APIs work to support inflight feature. Signed-off-by: Jin Yu --- v1 - add the case. v2 - add the rte_vhost prefix. v3 - add packed ring support v4 - fix build

[dpdk-dev] [PATCH v5] vhost: add vhost-user-blk example which support inflight

2019-10-31 Thread Jin Yu
A vhost-user-blk example that support inflight feature. It uses the new APIs that introduced in the first patch, so it can show how these APIs work to support inflight feature. Signed-off-by: Jin Yu --- v1 - add the case. v2 - add the rte_vhost prefix. v3 - add packed ring support v4 - fix build

[dpdk-dev] [PATCH v2] vhost: fix compile error

2019-10-29 Thread Jin Yu
Compile librte_vhost/vhost_crypto.c needs the rte_hash.h So we need the librte_hash to be compiled before vhost. Add the DEPDIRs to make sure this. Bugzilla ID: 356 Fixes: 939066d96563 ("vhost/crypto: add public function implementation") Cc: sta...@dpdk.org Signed-off-by: Jin Yu --

[dpdk-dev] [PATCH] vhost: fix compile error

2019-10-29 Thread Jin Yu
Compile librte_vhost/vhost_crypto.c needs the rte_hash.h So we need the librte_hash to be compiled before vhost. Add the DEPDIRs to make sure this. Bugzilla ID: 356 Fixes: 939066d96563 ("vhost/crypto: add public function implementation") Cc: sta...@dpdk.org Signed-off-by: Jin Yu --

[dpdk-dev] [PATCH] vhost: add vhost-user-blk example which support inflight

2019-10-28 Thread Jin Yu
A vhost-user-blk example that support inflight feature. It uses the new APIs that introduced in the first patch, so it can show how these APIs work to support inflight feature. Signed-off-by: Jin Yu --- V1 - add the case. V2 - add the rte_vhost prefix. V3 - add packed ring support V4 - fix build

[dpdk-dev] [PATCH] vhost: fix compile error

2019-10-27 Thread Jin Yu
Compile librte_vhost/vhost_crypto.c needs the rte_hash.h So we need the librte_hash to be compiled before vhost. Add the DEPDIRs to make sure this. Bugzilla ID: 356 Cc: sta...@dpdk.org Signed-off-by: Jin Yu --- lib/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a

[dpdk-dev] [PATCH v2] vhost: delete vhost scsi example

2019-10-23 Thread Jin Yu
This example is too old and SPDK will not maintain this example anymore. Also SPDK has submitted a new vhost example vhost-blk. We will keep on maintaining vhost-blk and It shows the packed ring and live recovery support. Signed-off-by: Jin Yu --- V2 - delete the left trace --- MAINTAINERS

[dpdk-dev] [PATCH] vhost: delete vhost scsi example

2019-10-23 Thread Jin Yu
This example is too old and SPDK will not maintain this example anymore. Also SPDK has submitted a new vhost example vhost-blk. We will keep on maintaining vhost-blk and It shows the packed ring and live recovery support. Signed-off-by: Jin Yu --- examples/vhost_scsi/Makefile | 69

[dpdk-dev] [PATCH v11 8/9] vhost: add vring functions packed ring support

2019-10-09 Thread Jin Yu
This patch add packed ring support in two APIs so user can get the packed ring`. Signed-off-by: Lin Li Signed-off-by: Xun Ni Signed-off-by: Yu Zhang Signed-off-by: Jin Yu --- lib/librte_vhost/vhost.c | 68 +--- 1 file changed, 49 insertions(+), 19

[dpdk-dev] [PATCH v11 7/9] vhost: add APIs for user getting inflight ring

2019-10-09 Thread Jin Yu
This patch introduces two APIs. one is for getting inflgiht ring and the other is for getting base. Signed-off-by: Lin Li Signed-off-by: Xun Ni Signed-off-by: Yu Zhang Signed-off-by: Jin Yu --- lib/librte_vhost/rte_vhost.h | 40 + lib/librte_vhost

[dpdk-dev] [PATCH v11 9/9] vhost: add vhost-user-blk example which support inflight

2019-10-09 Thread Jin Yu
A vhost-user-blk example that support inflight feature. It uses the new APIs that introduced in the first patch, so it can show how these APIs work to support inflight feature. Signed-off-by: Jin Yu --- V1 - add the case. V2 - add the rte_vhost prefix. V3 - add packed ring support --- examples

[dpdk-dev] [PATCH v11 5/9] vhost: checkout the resubmit inflight information

2019-10-09 Thread Jin Yu
This patch shows how to checkout the inflight ring and construct the resubmit information also include destroying resubmit info. Signed-off-by: Lin Li Signed-off-by: Xun Ni Signed-off-by: Yu Zhang Signed-off-by: Jin Yu --- lib/librte_vhost/rte_vhost.h | 19 +++ lib/librte_vhost/vhost.c

[dpdk-dev] [PATCH v11 4/9] vhost: add two new messages to support a shared buffer

2019-10-09 Thread Jin Yu
This patch introduces two new messages VHOST_USER_GET_INFLIGHT_FD and VHOST_USER_SET_INFLIGHT_FD to support transferring a shared buffer between qemu and backend. Signed-off-by: Lin Li Signed-off-by: Xun Ni Signed-off-by: Yu Zhang Signed-off-by: Jin Yu --- lib/librte_vhost/vhost.h | 7

[dpdk-dev] [PATCH v11 6/9] vhost: add the APIs to operate inflight ring

2019-10-09 Thread Jin Yu
This patch introduces three APIs to operate the inflight ring. Three APIs are set, set last and clear. It includes split and packed ring. Signed-off-by: Lin Li Signed-off-by: Xun Ni Signed-off-by: Yu Zhang Signed-off-by: Jin Yu --- lib/librte_vhost/rte_vhost.h | 116

[dpdk-dev] [PATCH v11 1/9] vhost: add the inflight description

2019-10-09 Thread Jin Yu
This patch add the inflight message description and the inflight share fd protocol feature flag. Signed-off-by: Lin Li Signed-off-by: Xun Ni Signed-off-by: Yu Zhang Signed-off-by: Jin Yu Reviewed-by: Maxime Coquelin --- v1 - specify the APIs are split-ring only v2 - fix APIs and judge split

[dpdk-dev] [PATCH v11 2/9] vhost: add packed ring

2019-10-09 Thread Jin Yu
This patch add the packed ring in the rte_vhost_vring. Signed-off-by: Lin Li Signed-off-by: Xun Ni Signed-off-by: Yu Zhang Signed-off-by: Jin Yu Reviewed-by: Maxime Coquelin --- lib/librte_vhost/rte_vhost.h | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a

[dpdk-dev] [PATCH v11 3/9] vhost: add the inflight structure

2019-10-09 Thread Jin Yu
This patch adds the inflight queue region structure include the split and packed. Signed-off-by: Lin Li Signed-off-by: Xun Ni Signed-off-by: Yu Zhang Signed-off-by: Jin Yu --- lib/librte_vhost/rte_vhost.h | 43 1 file changed, 43 insertions(+) diff --git

[dpdk-dev] [PATCH v11 0/9] vhost: support inflight share memory protocol feature

2019-10-09 Thread Jin Yu
-device vhost-user-blk-pci,ring_packed=on,chardev=spdk_vhost_blk0,num-queues=1\ 5, run fio in the guest 6, kill the example and run again. 7, the fio in the guest should continue run without errors. Jin Yu (9): vhost: add the inflight description vhost: add packed ring vhost: add the inflig

[dpdk-dev] [PATCH v10 7/9] vhost: add APIs for user getting inflight ring

2019-10-09 Thread Jin Yu
This patch introduces two APIs. one is for getting inflgiht ring and the other is for getting base. Signed-off-by: Lin Li Signed-off-by: Xun Ni Signed-off-by: Yu Zhang Signed-off-by: Jin Yu --- lib/librte_vhost/rte_vhost.h | 40 + lib/librte_vhost

[dpdk-dev] [PATCH v10 8/9] vhost: add vring functions packed ring support

2019-10-09 Thread Jin Yu
This patch add packed ring support in two APIs so user can get the packed ring`. Signed-off-by: Lin Li Signed-off-by: Xun Ni Signed-off-by: Yu Zhang Signed-off-by: Jin Yu --- lib/librte_vhost/vhost.c | 68 +--- 1 file changed, 49 insertions(+), 19

[dpdk-dev] [PATCH v10 9/9] vhost: add vhost-user-blk example which support inflight

2019-10-09 Thread Jin Yu
A vhost-user-blk example that support inflight feature. It uses the new APIs that introduced in the first patch, so it can show how these APIs work to support inflight feature. Signed-off-by: Jin Yu --- V1 - add the case. V2 - add the rte_vhost prefix. V3 - add packed ring support --- examples

[dpdk-dev] [PATCH v10 3/9] vhost: add the inflight structure

2019-10-09 Thread Jin Yu
This patch adds the inflight queue region structure include the split and packed. Signed-off-by: Lin Li Signed-off-by: Xun Ni Signed-off-by: Yu Zhang Signed-off-by: Jin Yu --- lib/librte_vhost/rte_vhost.h | 43 1 file changed, 43 insertions(+) diff --git

[dpdk-dev] [PATCH v10 6/9] vhost: add the APIs to operate inflight ring

2019-10-09 Thread Jin Yu
This patch introduces three APIs to operate the inflight ring. Three APIs are set, set last and clear. It includes split and packed ring. Signed-off-by: Lin Li Signed-off-by: Xun Ni Signed-off-by: Yu Zhang Signed-off-by: Jin Yu --- lib/librte_vhost/rte_vhost.h | 116

[dpdk-dev] [PATCH v10 5/9] vhost: checkout the resubmit inflight information

2019-10-09 Thread Jin Yu
This patch shows how to checkout the inflight ring and construct the resubmit information also include destroying resubmit info. Signed-off-by: Lin Li Signed-off-by: Xun Ni Signed-off-by: Yu Zhang Signed-off-by: Jin Yu --- lib/librte_vhost/rte_vhost.h | 19 +++ lib/librte_vhost/vhost.c

[dpdk-dev] [PATCH v10 4/9] vhost: add two new messages to support a shared buffer

2019-10-09 Thread Jin Yu
This patch introduces two new messages VHOST_USER_GET_INFLIGHT_FD and VHOST_USER_SET_INFLIGHT_FD to support transferring a shared buffer between qemu and backend. Signed-off-by: Lin Li Signed-off-by: Xun Ni Signed-off-by: Yu Zhang Signed-off-by: Jin Yu --- lib/librte_vhost/vhost.h | 7

[dpdk-dev] [PATCH v10 2/9] vhost: add packed ring

2019-10-09 Thread Jin Yu
This patch add the packed ring in the rte_vhost_vring. Signed-off-by: Lin Li Signed-off-by: Xun Ni Signed-off-by: Yu Zhang Signed-off-by: Jin Yu Reviewed-by: Maxime Coquelin --- lib/librte_vhost/rte_vhost.h | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a

[dpdk-dev] [PATCH v10 1/9] vhost: add the inflight description

2019-10-09 Thread Jin Yu
This patch add the inflight message description and the inflight share fd protocol feature flag. Signed-off-by: Lin Li Signed-off-by: Xun Ni Signed-off-by: Yu Zhang Signed-off-by: Jin Yu Reviewed-by: Maxime Coquelin --- v1 - specify the APIs are split-ring only v2 - fix APIs and judge split

[dpdk-dev] [PATCH v10 0/9] vhost: support inflight share memory protocol feature

2019-10-09 Thread Jin Yu
=spdk_vhost_blk0,num-queues=1\ 5, run fio in the guest 6, kill the example and run again. 7, the fio in the guest should continue run without errors. Jin Yu (9): vhost: add the inflight description vhost: add packed ring vhost: add the inflight structure vhost: add two new messages to su

[dpdk-dev] [PATCH v10 9/9] vhost: add vhost-user-blk example which support inflight

2019-10-09 Thread Jin Yu
A vhost-user-blk example that support inflight feature. It uses the new APIs that introduced in the first patch, so it can show how these APIs work to support inflight feature. Signed-off-by: Jin Yu --- V1 - add the case. V2 - add the rte_vhost prefix. V3 - add packed ring support --- examples

[dpdk-dev] [PATCH v10 8/9] vhost: add vring functions packed ring support

2019-10-09 Thread Jin Yu
This patch add packed ring support in two APIs so user can get the packed ring`. Signed-off-by: Lin Li Signed-off-by: Xun Ni Signed-off-by: Yu Zhang Signed-off-by: Jin Yu --- lib/librte_vhost/vhost.c | 68 +--- 1 file changed, 49 insertions(+), 19

[dpdk-dev] [PATCH v10 7/9] vhost: add APIs for user getting inflight ring

2019-10-09 Thread Jin Yu
This patch introduces two APIs. one is for getting inflgiht ring and the other is for getting base. Signed-off-by: Lin Li Signed-off-by: Xun Ni Signed-off-by: Yu Zhang Signed-off-by: Jin Yu --- lib/librte_vhost/rte_vhost.h | 40 + lib/librte_vhost

[dpdk-dev] [PATCH v10 5/9] vhost: checkout the resubmit inflight information

2019-10-09 Thread Jin Yu
This patch shows how to checkout the inflight ring and construct the resubmit information also include destroying resubmit info. Signed-off-by: Lin Li Signed-off-by: Xun Ni Signed-off-by: Yu Zhang Signed-off-by: Jin Yu --- lib/librte_vhost/rte_vhost.h | 19 +++ lib/librte_vhost/vhost.c

[dpdk-dev] [PATCH v10 2/9] vhost: add packed ring

2019-10-09 Thread Jin Yu
This patch add the packed ring in the rte_vhost_vring. Signed-off-by: Lin Li Signed-off-by: Xun Ni Signed-off-by: Yu Zhang Signed-off-by: Jin Yu Reviewed-by: Maxime Coquelin --- lib/librte_vhost/rte_vhost.h | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a

[dpdk-dev] [PATCH v10 3/9] vhost: add the inflight structure

2019-10-09 Thread Jin Yu
This patch adds the inflight queue region structure include the split and packed. Signed-off-by: Lin Li Signed-off-by: Xun Ni Signed-off-by: Yu Zhang Signed-off-by: Jin Yu --- lib/librte_vhost/rte_vhost.h | 43 1 file changed, 43 insertions(+) diff --git

[dpdk-dev] [PATCH v10 6/9] vhost: add the APIs to operate inflight ring

2019-10-09 Thread Jin Yu
This patch introduces three APIs to operate the inflight ring. Three APIs are set, set last and clear. It includes split and packed ring. Signed-off-by: Lin Li Signed-off-by: Xun Ni Signed-off-by: Yu Zhang Signed-off-by: Jin Yu --- lib/librte_vhost/rte_vhost.h | 116

[dpdk-dev] [PATCH v10 4/9] vhost: add two new messages to support a shared buffer

2019-10-09 Thread Jin Yu
This patch introduces two new messages VHOST_USER_GET_INFLIGHT_FD and VHOST_USER_SET_INFLIGHT_FD to support transferring a shared buffer between qemu and backend. Signed-off-by: Lin Li Signed-off-by: Xun Ni Signed-off-by: Yu Zhang Signed-off-by: Jin Yu --- lib/librte_vhost/vhost.h | 7

[dpdk-dev] [PATCH v10 1/9] vhost: add the inflight description

2019-10-09 Thread Jin Yu
This patch add the inflight message description and the inflight share fd protocol feature flag. Signed-off-by: Lin Li Signed-off-by: Xun Ni Signed-off-by: Yu Zhang Signed-off-by: Jin Yu Reviewed-by: Maxime Coquelin --- v1 - specify the APIs are split-ring only v2 - fix APIs and judge split

[dpdk-dev] [PATCH v10 0/9] vhost: support inflight share memory protocol feature

2019-10-09 Thread Jin Yu
t-user-blk-pci. eg: -chardev socket,id=spdk_vhost_blk0,reconnect=1,path=\ -device vhost-user-blk-pci,ring_packed=on,chardev=spdk_vhost_blk0,num-queues=1\ 5, run fio in the guest 6, kill the example and run again. 7, the fio in the guest should continue run without errors. Jin Y

[dpdk-dev] [PATCH v9 08/10] vhost: add vring functions packed ring support

2019-10-08 Thread Jin Yu
This patch add packed ring support in two APIs so user can get the packed ring`. Signed-off-by: Lin Li Signed-off-by: Xun Ni Signed-off-by: Yu Zhang Signed-off-by: Jin Yu --- lib/librte_vhost/vhost.c | 68 +--- 1 file changed, 49 insertions(+), 19

[dpdk-dev] [PATCH v9 07/10] vhost: add APIs for user getting inflight ring

2019-10-08 Thread Jin Yu
This patch introduces two APIs. one is for getting inflgiht ring and the other is for getting base. Signed-off-by: Lin Li Signed-off-by: Xun Ni Signed-off-by: Yu Zhang Signed-off-by: Jin Yu --- lib/librte_vhost/rte_vhost.h | 40 + lib/librte_vhost

[dpdk-dev] [PATCH v9 06/10] vhost: add the APIs to operate inflight ring

2019-10-08 Thread Jin Yu
This patch introduces three APIs to operate the inflight ring. Three APIs are set, set last and clear. It includes split and packed ring. Signed-off-by: Lin Li Signed-off-by: Xun Ni Signed-off-by: Yu Zhang Signed-off-by: Jin Yu --- lib/librte_vhost/rte_vhost.h | 116

[dpdk-dev] [PATCH v9 10/10] vhost: add vhost-user-blk example which support inflight

2019-10-08 Thread Jin Yu
A vhost-user-blk example that support inflight feature. It uses the new APIs that introduced in the first patch, so it can show how these APIs work to support inflight feature. Signed-off-by: Jin Yu --- V1 - add the case. V2 - add the rte_vhost prefix. V3 - add packed ring support --- examples

[dpdk-dev] [PATCH v9 09/10] vhost: add an API for judging vq format

2019-10-08 Thread Jin Yu
This patch introduces an API for getting virtqueue format. Signed-off-by: Lin Li Signed-off-by: Xun Ni Signed-off-by: Yu Zhang Signed-off-by: Jin Yu --- lib/librte_vhost/rte_vhost.h | 13 + lib/librte_vhost/rte_vhost_version.map | 1 + lib/librte_vhost/vhost.c

[dpdk-dev] [PATCH v9 05/10] vhost: checkout the resubmit inflight information

2019-10-08 Thread Jin Yu
This patch shows how to checkout the inflight ring and construct the resubmit information also include destroying resubmit info. Signed-off-by: Lin Li Signed-off-by: Xun Ni Signed-off-by: Yu Zhang Signed-off-by: Jin Yu --- lib/librte_vhost/rte_vhost.h | 19 +++ lib/librte_vhost/vhost.c

[dpdk-dev] [PATCH v9 02/10] vhost: add packed ring

2019-10-08 Thread Jin Yu
This patch add the packed ring in the rte_vhost_vring. Signed-off-by: Lin Li Signed-off-by: Xun Ni Signed-off-by: Yu Zhang Signed-off-by: Jin Yu Reviewed-by: Maxime Coquelin --- lib/librte_vhost/rte_vhost.h | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a

[dpdk-dev] [PATCH v9 00/10] vhost: support inflight share memory protocol feature

2019-10-08 Thread Jin Yu
t-user-blk-pci. eg: -chardev socket,id=spdk_vhost_blk0,reconnect=1,path=\ -device vhost-user-blk-pci,ring_packed=on,chardev=spdk_vhost_blk0,num-queues=1\ 5, run fio in the guest 6, kill the example and run again. 7, the fio in the guest should continue run without error

[dpdk-dev] [PATCH v9 03/10] vhost: add the inflight structure

2019-10-08 Thread Jin Yu
This patch adds the inflight queue region structure include the split and packed. Signed-off-by: Lin Li Signed-off-by: Xun Ni Signed-off-by: Yu Zhang Signed-off-by: Jin Yu --- lib/librte_vhost/rte_vhost.h | 43 1 file changed, 43 insertions(+) diff --git

[dpdk-dev] [PATCH v9 01/10] vhost: add the inflight description

2019-10-08 Thread Jin Yu
This patch add the inflight message description and the inflight share fd protocol feature flag. Signed-off-by: Lin Li Signed-off-by: Xun Ni Signed-off-by: Yu Zhang Signed-off-by: Jin Yu Reviewed-by: Maxime Coquelin --- v1 - specify the APIs are split-ring only v2 - fix APIs and judge split

[dpdk-dev] [PATCH v9 04/10] vhost: add two new messages to support a shared buffer

2019-10-08 Thread Jin Yu
This patch introduces two new messages VHOST_USER_GET_INFLIGHT_FD and VHOST_USER_SET_INFLIGHT_FD to support transferring a shared buffer between qemu and backend. Signed-off-by: Lin Li Signed-off-by: Xun Ni Signed-off-by: Yu Zhang Signed-off-by: Jin Yu --- lib/librte_vhost/vhost.h | 7

[dpdk-dev] [PATCH v8 07/10] vhost: add APIs for user getting inflight ring

2019-09-26 Thread Jin Yu
This patch introduces two APIs. one is for getting inflgiht ring and the other is for getting base. Signed-off-by: Lin Li Signed-off-by: Xun Ni Signed-off-by: Yu Zhang Signed-off-by: Jin Yu --- lib/librte_vhost/rte_vhost.h | 40 + lib/librte_vhost

[dpdk-dev] [PATCH v8 06/10] vhost: add the APIs to operate inflight ring

2019-09-26 Thread Jin Yu
This patch introduces three APIs to operate the inflight ring. Three APIs are set, set last and clear. It includes split and packed ring. Signed-off-by: Lin Li Signed-off-by: Xun Ni Signed-off-by: Yu Zhang Signed-off-by: Jin Yu --- lib/librte_vhost/rte_vhost.h | 116

[dpdk-dev] [PATCH v8 08/10] vhost: add vring functions packed ring support

2019-09-26 Thread Jin Yu
This patch add packed ring support in two APIs so user can get the packed ring`. Signed-off-by: Lin Li Signed-off-by: Xun Ni Signed-off-by: Yu Zhang Signed-off-by: Jin Yu --- lib/librte_vhost/vhost.c | 68 +--- 1 file changed, 49 insertions(+), 19

[dpdk-dev] [PATCH v8 10/10] vhost: add vhost-user-blk example which support inflight

2019-09-26 Thread Jin Yu
A vhost-user-blk example that support inflight feature. It uses the new APIs that introduced in the first patch, so it can show how these APIs work to support inflight feature. Signed-off-by: Jin Yu --- V1 - add the case. V2 - add the rte_vhost prefix. V3 - add packed ring support --- examples

[dpdk-dev] [PATCH v8 05/10] vhost: checkout the resubmit inflight information

2019-09-26 Thread Jin Yu
This patch shows how to checkout the inflight ring and construct the resubmit information also include destroying resubmit info. Signed-off-by: Lin Li Signed-off-by: Xun Ni Signed-off-by: Yu Zhang Signed-off-by: Jin Yu --- lib/librte_vhost/rte_vhost.h | 19 +++ lib/librte_vhost/vhost.c

[dpdk-dev] [PATCH v8 09/10] vhost: add an API for judging vq format

2019-09-26 Thread Jin Yu
This patch introduces an API for getting virtqueue format. Signed-off-by: Lin Li Signed-off-by: Xun Ni Signed-off-by: Yu Zhang Signed-off-by: Jin Yu --- lib/librte_vhost/rte_vhost.h | 13 + lib/librte_vhost/rte_vhost_version.map | 1 + lib/librte_vhost/vhost.c

[dpdk-dev] [PATCH v8 02/10] vhost: add packed ring

2019-09-26 Thread Jin Yu
This patch add the packed ring in the rte_vhost_vring. Signed-off-by: Lin Li Signed-off-by: Xun Ni Signed-off-by: Yu Zhang Signed-off-by: Jin Yu Reviewed-by: Maxime Coquelin --- lib/librte_vhost/rte_vhost.h | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a

[dpdk-dev] [PATCH v8 04/10] vhost: add two new messages to support a shared buffer

2019-09-26 Thread Jin Yu
This patch introduces two new messages VHOST_USER_GET_INFLIGHT_FD and VHOST_USER_SET_INFLIGHT_FD to support transferring a shared buffer between qemu and backend. Signed-off-by: Lin Li Signed-off-by: Xun Ni Signed-off-by: Yu Zhang Signed-off-by: Jin Yu --- lib/librte_vhost/vhost.h | 7

[dpdk-dev] [PATCH v8 00/10] vhost: support inflight share memory protocol feature

2019-09-26 Thread Jin Yu
t-user-blk-pci. eg: -chardev socket,id=spdk_vhost_blk0,reconnect=1,path=\ -device vhost-user-blk-pci,ring_packed=on,chardev=spdk_vhost_blk0,num-queues=1\ 5, run fio in the guest 6, kill the example and run again. 7, the fio in the guest should continue run without error

[dpdk-dev] [PATCH v8 03/10] vhost: add the inflight structure

2019-09-26 Thread Jin Yu
This patch adds the inflight queue region structure include the split and packed. Signed-off-by: Lin Li Signed-off-by: Xun Ni Signed-off-by: Yu Zhang Signed-off-by: Jin Yu --- lib/librte_vhost/rte_vhost.h | 43 1 file changed, 43 insertions(+) diff --git

[dpdk-dev] [PATCH v8 01/10] vhost: add the inflight description

2019-09-26 Thread Jin Yu
This patch add the inflight message description and the inflight share fd protocol feature flag. Signed-off-by: Lin Li Signed-off-by: Xun Ni Signed-off-by: Yu Zhang Signed-off-by: Jin Yu Reviewed-by: Maxime Coquelin --- v1 - specify the APIs are split-ring only v2 - fix APIs and judge split

[dpdk-dev] [PATCH v7 08/10] vhost: add vring functions packed ring support

2019-09-19 Thread Jin Yu
This patch add packed ring support in two APIs so user can get the packed ring`. Signed-off-by: Lin Li Signed-off-by: Xun Ni Signed-off-by: Yu Zhang Signed-off-by: Jin Yu --- lib/librte_vhost/vhost.c | 68 +--- 1 file changed, 49 insertions(+), 19

[dpdk-dev] [PATCH v7 09/10] vhost: add an API for judging vq format

2019-09-19 Thread Jin Yu
This patch introduces an API for getting virtqueue format. Signed-off-by: Lin Li Signed-off-by: Xun Ni Signed-off-by: Yu Zhang Signed-off-by: Jin Yu --- lib/librte_vhost/rte_vhost.h | 13 + lib/librte_vhost/rte_vhost_version.map | 1 + lib/librte_vhost/vhost.c

[dpdk-dev] [PATCH v7 10/10] vhost: add vhost-user-blk example which support inflight

2019-09-19 Thread Jin Yu
A vhost-user-blk example that support inflight feature. It uses the new APIs that introduced in the first patch, so It can show how there APIs work to support inflight feature. Signed-off-by: Jin Yu --- V1 - add the case. V2 - add the rte_vhost prefix. V3 - add packed ring support --- examples

[dpdk-dev] [PATCH v7 07/10] vhost: add APIs for user getting inflight ring

2019-09-19 Thread Jin Yu
This patch introduces two APIs. one is for getting inflgiht ring and the other is for getting base. Signed-off-by: Lin Li Signed-off-by: Xun Ni Signed-off-by: Yu Zhang Signed-off-by: Jin Yu --- lib/librte_vhost/rte_vhost.h | 40 + lib/librte_vhost

[dpdk-dev] [PATCH v7 06/10] vhost: add the APIs to operate inflight ring

2019-09-19 Thread Jin Yu
This patch introduces three APIs to operate the inflight ring. Three APIs are set, set last and clear. It includes split and packed ring. Signed-off-by: Lin Li Signed-off-by: Xun Ni Signed-off-by: Yu Zhang Signed-off-by: Jin Yu --- lib/librte_vhost/rte_vhost.h | 116

[dpdk-dev] [PATCH v7 03/10] vhost: add the inflight structure

2019-09-19 Thread Jin Yu
This patch adds the inflight queue region structure include the split and packed. Signed-off-by: Lin Li Signed-off-by: Xun Ni Signed-off-by: Yu Zhang Signed-off-by: Jin Yu --- lib/librte_vhost/rte_vhost.h | 43 1 file changed, 43 insertions(+) diff --git

[dpdk-dev] [PATCH v7 04/10] vhost: add two new messages to support a shared buffer

2019-09-19 Thread Jin Yu
This patch introduces two new messages VHOST_USER_GET_INFLIGHT_FD and VHOST_USER_SET_INFLIGHT_FD to support transferring a shared buffer between qemu and backend. Signed-off-by: Lin Li Signed-off-by: Xun Ni Signed-off-by: Yu Zhang Signed-off-by: Jin Yu --- lib/librte_vhost/vhost.h | 7

[dpdk-dev] [PATCH v7 00/10] vhost: support inflight share memory protocol feature

2019-09-19 Thread Jin Yu
t-user-blk-pci. eg: -chardev socket,id=spdk_vhost_blk0,reconnect=1,path=\ -device vhost-user-blk-pci,ring_packed=on,chardev=spdk_vhost_blk0,num-queues=1\ 5, run fio in the guest 6, kill the example and run again. 7, the fio in the guest should continue run without error

[dpdk-dev] [PATCH v7 05/10] vhost: checkout the resubmit inflight information

2019-09-19 Thread Jin Yu
This patch shows how to checkout the inflight ring and construct the resubmit information also include destroying resubmit info. Signed-off-by: Lin Li Signed-off-by: Xun Ni Signed-off-by: Yu Zhang Signed-off-by: Jin Yu --- lib/librte_vhost/rte_vhost.h | 19 +++ lib/librte_vhost/vhost.c

[dpdk-dev] [PATCH v7 02/10] vhost: add packed ring

2019-09-19 Thread Jin Yu
This patch add the packed ring in the rte_vhost_vring. Signed-off-by: Lin Li Signed-off-by: Xun Ni Signed-off-by: Yu Zhang Signed-off-by: Jin Yu Reviewed-by: Maxime Coquelin --- lib/librte_vhost/rte_vhost.h | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a

[dpdk-dev] [PATCH v7 01/10] vhost: add the inflight description

2019-09-19 Thread Jin Yu
This patch add the inflight message description and the inflight share fd protocol feature flag. Signed-off-by: Lin Li Signed-off-by: Xun Ni Signed-off-by: Yu Zhang Signed-off-by: Jin Yu Reviewed-by: Maxime Coquelin --- v1 - specify the APIs are split-ring only v2 - fix APIs and judge split