[PATCH v2] net/vhost: support asynchronous data path

2022-08-17 Thread Jiayu Hu
device for a tx/rx queue. (Default: no queues enable asynchronous data path) - dma-ring-size: DMA ring size. (Default: 4096). Here is an example: --vdev 'eth_vhost0,iface=./s0,dmas=[txq0@:00.01.0;rxq0@:00.01.1],dma-ring-size=4096' Signed-off-by: Jiayu Hu Signed-of

[PATCH] net/vhost: support asynchronous data path

2022-08-14 Thread Jiayu Hu
device for a tx/rx queue (Default: no queues enable asynchronous data path) - dma-ring-size: DMA ring size. (Default: 2048). Here is an example: --vdev 'eth_vhost0,iface=./s0,dmas=[txq0@:00.01.0;rxq0@:00.01.1],dma-ring-size=4096' Signed-off-by: Jiayu Hu Signed-of

[PATCH v2] vhost: fix unchecked return value

2022-06-29 Thread Jiayu Hu
This patch checks the return value of rte_dma_info_get() called in rte_vhost_async_dma_configure(). Coverity issue: 379066 Fixes: 53d3f4778c1d ("vhost: integrate dmadev in asynchronous data-path") Cc: sta...@dpdk.org Signed-off-by: Jiayu Hu Reviewed-by: Chenbo Xia --- v2: - add cc

[PATCH] vhost: fix unchecked return value

2022-06-22 Thread Jiayu Hu
This patch checks the return value of rte_dma_info_get() called in rte_vhost_async_dma_configure(). Coverity issue: 379066 Fixes: 53d3f4778c1d ("vhost: integrate dmadev in asynchronous data-path") Signed-off-by: Jiayu Hu --- lib/vhost/vhost.c | 6 +- 1 file changed, 5 insert

[PATCH] vhost: fix null pointer dereference

2022-03-27 Thread Jiayu Hu
igned-off-by: Jiayu Hu --- lib/vhost/vhost.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/vhost/vhost.c b/lib/vhost/vhost.c index bc88148347..7f60c2824f 100644 --- a/lib/vhost/vhost.c +++ b/lib/vhost/vhost.c @@ -1887,9 +1887,6 @@ rte_vhost_async_get_infligh

[PATCH v4 0/1] integrate dmadev in vhost

2022-02-08 Thread Jiayu Hu
several bugs - fix typo and coding style issues - replace "while" with "for" - update programmer guide - support share dma among vhost in vhost example - remove "--dma-type" in vhost example Jiayu Hu (1): vhost: integrate dmadev in asynchronous data-path doc

[PATCH v4 1/1] vhost: integrate dmadev in asynchronous data-path

2022-02-08 Thread Jiayu Hu
Since dmadev is introduced in 21.11, to avoid the overhead of vhost DMA abstraction layer and simplify application logics, this patch integrates dmadev in asynchronous data path. Signed-off-by: Jiayu Hu Signed-off-by: Sunil Pai G --- doc/guides/prog_guide/vhost_lib.rst | 100

[PATCH v3 1/1] vhost: integrate dmadev in asynchronous data-path

2022-02-07 Thread Jiayu Hu
Since dmadev is introduced in 21.11, to avoid the overhead of vhost DMA abstraction layer and simplify application logics, this patch integrates dmadev in asynchronous data path. Signed-off-by: Jiayu Hu Signed-off-by: Sunil Pai G --- doc/guides/prog_guide/vhost_lib.rst | 97

[PATCH v3 0/1] integrate dmadev in vhost

2022-02-07 Thread Jiayu Hu
"for" - update programmer guide - support share dma among vhost in vhost example - remove "--dma-type" in vhost example Jiayu Hu (1): vhost: integrate dmadev in asynchronous data-path doc/guides/prog_guide/vhost_lib.rst | 97 +- examples/vhost/Makefile

[PATCH v2 1/1] vhost: integrate dmadev in asynchronous datapath

2022-01-24 Thread Jiayu Hu
Since dmadev is introduced in 21.11, to avoid the overhead of vhost DMA abstraction layer and simplify application logics, this patch integrates dmadev in asynchronous data path. Signed-off-by: Jiayu Hu Signed-off-by: Sunil Pai G --- doc/guides/prog_guide/vhost_lib.rst | 95

[PATCH v2 0/1] integrate dmadev in vhost

2022-01-24 Thread Jiayu Hu
seless code - support dynamic DMA vchannel ring size (rte_vhost_async_dma_configure) - fix several bugs - fix typo and coding style issues - replace "while" with "for" - update programmer guide - support share dma among vhost in vhost example - remove "--dma-type" i

[PATCH v1 1/1] vhost: integrate dmadev in asynchronous datapath

2021-12-30 Thread Jiayu Hu
Since dmadev is introduced in 21.11, to avoid the overhead of vhost DMA abstraction layer and simplify application logics, this patch integrates dmadev in asynchronous data path. Signed-off-by: Jiayu Hu Signed-off-by: Sunil Pai G --- doc/guides/prog_guide/vhost_lib.rst | 70

[PATCH v1 0/1] integrate dmadev in vhost

2021-12-30 Thread Jiayu Hu
ot; - update programmer guide - support share dma among vhost in vhost example - remove "--dma-type" in vhost example Jiayu Hu (1): vhost: integrate dmadev in asynchronous datapath doc/guides/prog_guide/vhost_lib.rst | 70 - examples/vhost/Makefile

[RFC 1/1] vhost: integrate dmadev in asynchronous datapath

2021-11-21 Thread Jiayu Hu
Since dmadev is introduced in 21.11, to avoid the overhead of vhost DMA abstraction layer and simplify application logics, this patch integrates dmadev in asynchronous data path. Signed-off-by: Jiayu Hu Signed-off-by: Sunil Pai G --- doc/guides/prog_guide/vhost_lib.rst | 63 examples

[RFC 0/1] integrate dmadev in vhost

2021-11-21 Thread Jiayu Hu
IRTIO_QNUM + VIRTIO_RXQ; rte_vhost_poll_enqueue_completed(vid, qid, ...); } Jiayu Hu (1): vhost: integrate dmadev in asynchronous datapath doc/guides/prog_guide/vhost_lib.rst | 63 examples/vhost/ioat.c | 218 examples/vhost/ioat.h |

[PATCH v3] vhost: fix packed ring descriptor update in async enqueue

2021-11-15 Thread Jiayu Hu
apath") Signed-off-by: Jiayu Hu Reviewed-by: Chenbo Xia --- v3: * fix typo v2: * update commit log --- lib/vhost/virtio_net.c | 122 ++--- 1 file changed, 54 insertions(+), 68 deletions(-) diff --git a/lib/vhost/virtio_net.c b/lib/vhost/virtio_n

[dpdk-dev] [PATCH v2] vhost: fix packed ring descriptor update in async enqueue

2021-11-09 Thread Jiayu Hu
apath") Signed-off-by: Jiayu Hu --- v2: * update commit log --- lib/vhost/virtio_net.c | 122 ++--- 1 file changed, 54 insertions(+), 68 deletions(-) diff --git a/lib/vhost/virtio_net.c b/lib/vhost/virtio_net.c index cef4bcf15c..b3d954aab4 100644 --- a

[dpdk-dev] [PATCH] vhost: fix packed ring descriptor update in async enqueue

2021-11-03 Thread Jiayu Hu
49 ("vhost: support packed ring in async datapath") Cc: sta...@dpdk.org Signed-off-by: Jiayu Hu --- lib/vhost/virtio_net.c | 122 ++--- 1 file changed, 54 insertions(+), 68 deletions(-) diff --git a/lib/vhost/virtio_net.c b/lib/vhost/virtio_ne

[dpdk-dev] [PATCH] vhost: remove copy threshold for async vhost

2021-08-19 Thread Jiayu Hu
data path. Signed-off-by: Jiayu Hu Signed-off-by: Cheng Jiang --- doc/guides/prog_guide/vhost_lib.rst | 7 - examples/vhost/main.c | 22 +- lib/vhost/rte_vhost_async.h | 22 +- lib/vhost/vhost.c | 6 +- lib/vhost/vhost.h | 1 - lib

[dpdk-dev] [PATCH v6 3/3] vhost: add thread unsafe async registeration functions

2021-07-19 Thread Jiayu Hu
This patch adds thread unsafe version for async register and unregister functions. Signed-off-by: Jiayu Hu Reviewed-by: Chenbo Xia --- doc/guides/prog_guide/vhost_lib.rst | 16 lib/vhost/rte_vhost_async.h | 41 ++ lib/vhost/version.map | 4 + lib/vhost

[dpdk-dev] [PATCH v6 2/3] vhost: rework async configuration structure

2021-07-19 Thread Jiayu Hu
This patch reworks the async configuration structure to improve code readability. In addition, add preserved padding fields on the structure for future usage. Signed-off-by: Jiayu Hu Reviewed-by: Chenbo Xia --- doc/guides/prog_guide/vhost_lib.rst | 21 ++ examples/vhost/main.c

[dpdk-dev] [PATCH v6 1/3] vhost: fix lock on device readiness notification

2021-07-19 Thread Jiayu Hu
.@dpdk.org Signed-off-by: Jiayu Hu Reviewed-by: Maxime Coquelin --- lib/vhost/vhost_user.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/vhost/vhost_user.c b/lib/vhost/vhost_user.c index 031c578..31300e1 100644 --- a/lib/vhost/vhost_user.c +++ b/lib/vhost/vh

[dpdk-dev] [PATCH v6 0/3] provide thread unsafe async registration functions

2021-07-19 Thread Jiayu Hu
field async_inorder * change async_threshold from uint16_t to uint32_t v4: * remove brace {} in single statement block v3: * rename and use enum to define async device features * change padding fields to 8 bytes v2: * rework async feature structure * fix typo in commit log Jiayu Hu (3): vhost

[dpdk-dev] [PATCH v5 3/3] vhost: add thread unsafe async registeration functions

2021-07-16 Thread Jiayu Hu
This patch adds thread unsafe version for async register and unregister functions. Signed-off-by: Jiayu Hu --- doc/guides/prog_guide/vhost_lib.rst | 14 lib/vhost/rte_vhost_async.h | 41 ++ lib/vhost/version.map | 4 + lib/vhost/vhost.c

[dpdk-dev] [PATCH v5 2/3] vhost: rework async configuration structure

2021-07-16 Thread Jiayu Hu
This patch reworks the async configuration structure to improve code readability. In addition, add preserved padding fields on the structure for future usage. Signed-off-by: Jiayu Hu --- doc/guides/prog_guide/vhost_lib.rst | 21 + examples/vhost/main.c | 8

[dpdk-dev] [PATCH v5 1/3] vhost: fix lock on device readiness notification

2021-07-16 Thread Jiayu Hu
.@dpdk.org Signed-off-by: Jiayu Hu Reviewed-by: Maxime Coquelin --- lib/vhost/vhost_user.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/vhost/vhost_user.c b/lib/vhost/vhost_user.c index 031c578..31300e1 100644 --- a/lib/vhost/vhost_user.c +++ b/lib/vhost/vh

[dpdk-dev] [PATCH v5 0/3] provide thread unsafe async registration functions

2021-07-16 Thread Jiayu Hu
v4: * remove brace {} in single statement block v3: * rename and use enum to define async device features * change padding fields to 8 bytes v2: * rework async feature structure * fix typo in commit log Jiayu Hu (3): vhost: fix lock on device readiness notification vhost: rework async

[dpdk-dev] [PATCH v4 3/3] vhost: add thread unsafe async registeration functions

2021-07-12 Thread Jiayu Hu
This patch adds thread unsafe version for async register and unregister functions. Signed-off-by: Jiayu Hu --- doc/guides/prog_guide/vhost_lib.rst | 12 +++ lib/vhost/rte_vhost_async.h | 39 ++ lib/vhost/version.map | 4 + lib/vhost/vhost.c

[dpdk-dev] [PATCH v4 2/3] vhost: rework async configuration struct

2021-07-12 Thread Jiayu Hu
This patch reworks the async configuration structure to improve code readability. In addition, add preserved padding fields on the structure for future usage. Signed-off-by: Jiayu Hu --- doc/guides/prog_guide/vhost_lib.rst | 19 +++ examples/vhost/main.c | 8

[dpdk-dev] [PATCH v4 1/3] vhost: fix lock on device readiness notification

2021-07-12 Thread Jiayu Hu
.@dpdk.org Signed-off-by: Jiayu Hu Reviewed-by: Maxime Coquelin --- lib/vhost/vhost_user.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/vhost/vhost_user.c b/lib/vhost/vhost_user.c index 031c578..31300e1 100644 --- a/lib/vhost/vhost_user.c +++ b/lib/vhost/vh

[dpdk-dev] [PATCH v4 0/3] provide thread unsafe async registration functions

2021-07-12 Thread Jiayu Hu
: * rework async feature structure * fix typo in commit log Jiayu Hu (3): vhost: fix lock on device readiness notification vhost: rework async configuration struct vhost: add thread unsafe async registeration functions doc/guides/prog_guide/vhost_lib.rst | 31 +-- examples/vhost/main.c

[dpdk-dev] [PATCH v3 3/3] vhost: add thread unsafe async registeration functions

2021-07-08 Thread Jiayu Hu
This patch adds thread unsafe version for async register and unregister functions. Signed-off-by: Jiayu Hu --- doc/guides/prog_guide/vhost_lib.rst | 12 +++ lib/vhost/rte_vhost_async.h | 39 + lib/vhost/version.map | 4 + lib/vhost/vhost.c

[dpdk-dev] [PATCH v3 2/3] vhost: rework async configuration struct

2021-07-08 Thread Jiayu Hu
This patch reworks the async configuration structure to improve code readability. In addition, add preserved padding fields on the structure for future usage. Signed-off-by: Jiayu Hu --- doc/guides/prog_guide/vhost_lib.rst | 19 +++ examples/vhost/main.c | 8

[dpdk-dev] [PATCH v3 1/3] vhost: fix lock on device readiness notification

2021-07-08 Thread Jiayu Hu
.@dpdk.org Signed-off-by: Jiayu Hu Reviewed-by: Maxime Coquelin --- lib/vhost/vhost_user.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/vhost/vhost_user.c b/lib/vhost/vhost_user.c index 031c578..31300e1 100644 --- a/lib/vhost/vhost_user.c +++ b/lib/vhost/vhost_user.c

[dpdk-dev] [PATCH v3 0/3] provide thread unsafe async registration functions

2021-07-08 Thread Jiayu Hu
log Jiayu Hu (3): vhost: fix lock on device readiness notification vhost: rework async configuration struct vhost: add thread unsafe async registeration functions doc/guides/prog_guide/vhost_lib.rst | 31 +-- examples/vhost/main.c | 8 +- lib/vhost/rte_vhost_async.h

[dpdk-dev] [PATCH v3] vhost: allow to check in-flight packets for async vhost

2021-07-07 Thread Jiayu Hu
This patch allows to check the amount of in-flight packets for the vhost queue using async acceleration. Signed-off-by: Jiayu Hu Reviewed-by: Maxime Coquelin --- v3: * update commit log and doc v2: * use DEBUG log level * return -1 when async is not registered doc/guides/prog_guide

[dpdk-dev] [PATCH v2] vhost: allow to check in-flight packets for async vhost

2021-07-06 Thread Jiayu Hu
This patch allows to check the amount of in-flight packets for vhost queues which register async channel acceleration. Signed-off-by: Jiayu Hu --- v2: * use DEBUG log level * return -1 when async is not registered doc/guides/prog_guide/vhost_lib.rst | 5 + lib/vhost/rte_vhost_async.h

[dpdk-dev] [PATCH v2 3/3] vhost: add thread unsafe async registeration functions

2021-07-06 Thread Jiayu Hu
This patch adds thread unsafe version for async register and unregister functions. Signed-off-by: Jiayu Hu --- doc/guides/prog_guide/vhost_lib.rst | 12 +++ lib/vhost/rte_vhost_async.h | 39 + lib/vhost/version.map | 4 + lib/vhost/vhost.c

[dpdk-dev] [PATCH v2 2/3] vhost: rework async feature struct

2021-07-06 Thread Jiayu Hu
No need to use bitfields in the structure rte_vhost_async_features. This patch reworks the structure to improve code readability. In addition, add preserved padding fields on the structure for future usage. Signed-off-by: Jiayu Hu --- examples/vhost/main.c | 4 ++-- lib/vhost

[dpdk-dev] [PATCH v2 1/3] vhost: fix lock on device readiness notification

2021-07-06 Thread Jiayu Hu
.@dpdk.org Signed-off-by: Jiayu Hu Reviewed-by: Maxime Coquelin --- lib/vhost/vhost_user.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/vhost/vhost_user.c b/lib/vhost/vhost_user.c index 031c578..31300e1 100644 --- a/lib/vhost/vhost_user.c +++ b/lib/vhost/vhost_user.c

[dpdk-dev] [PATCH v2 0/3] provide thread unsafe async registration functions

2021-07-06 Thread Jiayu Hu
deadlock, as they acquire lock too. The last patch provides thread unsafe registration functions to support calling within vhost callback functions. v2: * rework async feature structure * fix typo in commit log Jiayu Hu (3): vhost: fix lock on device readiness notification vhost: rework async

[dpdk-dev] [PATCH] vhost: allow to check in-flight packets for async vhost

2021-06-02 Thread Jiayu Hu
This patch allows to check the amount of in-flight packets for vhost queues which register async channel acceleration. Signed-off-by: Jiayu Hu --- doc/guides/prog_guide/vhost_lib.rst | 5 + lib/vhost/rte_vhost_async.h | 14 ++ lib/vhost/version.map | 3

[dpdk-dev] [PATCH 2/2] vhost: add thread unsafe async registration functions

2021-05-27 Thread Jiayu Hu
This patch is to add thread unsafe version for async register and unregister functions. Signed-off-by: Jiayu Hu --- doc/guides/prog_guide/vhost_lib.rst | 12 +++ lib/vhost/rte_vhost_async.h | 42 ++ lib/vhost/version.map | 4 + lib/vhost/vhost.c

[dpdk-dev] [PATCH 1/2] vhost: fix lock on device readiness notification

2021-05-27 Thread Jiayu Hu
.@dpdk.org Signed-off-by: Jiayu Hu --- lib/vhost/vhost_user.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/vhost/vhost_user.c b/lib/vhost/vhost_user.c index 8f0eba6..dabce26 100644 --- a/lib/vhost/vhost_user.c +++ b/lib/vhost/vhost_user.c @@ -2915

[dpdk-dev] [PATCH 0/2] provide thread unsafe async registration functions

2021-05-27 Thread Jiayu Hu
registration functions to support calling within vhost callback functions. Jiayu Hu (2): vhost: fix lock on device readiness notification vhost: add thread unsafe async registration functions doc/guides/prog_guide/vhost_lib.rst | 12 +++ lib/vhost/rte_vhost_async.h | 42 ++ lib

[dpdk-dev] [PATCH v3 4/4] doc: update async vhost register/unregister

2021-04-19 Thread Jiayu Hu
This patch is to update programmer guide for register/unregister copy devices in vhost. Signed-off-by: Jiayu Hu --- doc/guides/prog_guide/vhost_lib.rst | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/doc/guides/prog_guide/vhost_lib.rst b/doc/guides

[dpdk-dev] [PATCH v3 3/4] vhost: fix unnecessary vring_state_changed call

2021-04-19 Thread Jiayu Hu
("vhost: fix silent queue enabling with legacy guests") Cc: sta...@dpdk.org Signed-off-by: Jiayu Hu Tested-by: Yinan Wang --- lib/librte_vhost/vhost_user.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c index fa8929f..611f

[dpdk-dev] [PATCH v3 2/4] vhost: remove unnecessary free

2021-04-19 Thread Jiayu Hu
This patch removes unnecessary rte_free() for async_pkts_info and async_descs_split. Signed-off-by: Jiayu Hu Reviewed-by: Maxime Coquelin Tested-by: Yinan Wang --- lib/librte_vhost/vhost_user.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/lib/librte_vhost/vhost_user.c b/lib

[dpdk-dev] [PATCH v3 1/4] vhost: fix uninitialized vhost queue

2021-04-19 Thread Jiayu Hu
This patch allocates vhost queue by rte_zmalloc() to avoid undefined values. Fixes: a277c7159876 ("vhost: refactor code structure") Cc: sta...@dpdk.org Signed-off-by: Jiayu Hu Reviewed-by: Maxime Coquelin Tested-by: Yinan Wang --- lib/librte_vhost/vhost.c | 2 +- 1 file changed, 1

[dpdk-dev] [PATCH v3 0/4] Refactor async vhost control path

2021-04-19 Thread Jiayu Hu
This patch set refactors async vhost control path. Change log == v3: - correct fix commit - update doc and commit log v2: - correct fix commit - update commit lo Jiayu Hu (4): vhost: fix uninitialized vhost queue vhost: remove unnecessary free vhost: fix unnecessary

[dpdk-dev] [PATCH v2 4/4] doc: update async vhost register/unregister

2021-04-01 Thread Jiayu Hu
Signed-off-by: Jiayu Hu --- doc/guides/prog_guide/vhost_lib.rst | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/doc/guides/prog_guide/vhost_lib.rst b/doc/guides/prog_guide/vhost_lib.rst index dc29229..333bd0a 100644 --- a/doc/guides/prog_guide/vhost_lib.rst

[dpdk-dev] [PATCH v2 3/4] vhost: avoid deadlock on async register

2021-04-01 Thread Jiayu Hu
ing vhost_user_set_vring_kick(). This patch avoids async register deadlock by removing calling vring_state_changed() in vhost_user_set_vring_kick(). It's safe as vhost_user_msg_handler() will call vring_state_changed() anyway. Signed-off-by: Jiayu Hu --- lib/librte_vhost/vhost_user.c | 3 --- 1 file ch

[dpdk-dev] [PATCH v2 2/4] vhost: remove unnecessary free

2021-04-01 Thread Jiayu Hu
This patch removes unnecessary rte_free() for async_pkts_info and async_descs_split. Signed-off-by: Jiayu Hu Reviewed-by: Maxime Coquelin --- lib/librte_vhost/vhost_user.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c

[dpdk-dev] [PATCH v2 1/4] vhost: fix uninitialized vhost queue

2021-04-01 Thread Jiayu Hu
This patch allocates vhost queue by rte_zmalloc() to avoid undefined values. Fixes: a277c7159876 ("vhost: refactor code structure") Cc: sta...@dpdk.org Signed-off-by: Jiayu Hu --- lib/librte_vhost/vhost.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/li

[dpdk-dev] [PATCH v2 0/4] Refactor async vhost control path

2021-04-01 Thread Jiayu Hu
This patch set refactors async vhost control path. Change log == v2: - correct fix commit - update commit log Jiayu Hu (4): vhost: fix uninitialized vhost queue vhost: remove unnecessary free vhost: avoid deadlock on async register doc: update async vhost register/unregister

[dpdk-dev] [PATCH 4/4] doc: update async vhost register/unregister

2021-03-16 Thread Jiayu Hu
Signed-off-by: Jiayu Hu --- doc/guides/prog_guide/vhost_lib.rst | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/doc/guides/prog_guide/vhost_lib.rst b/doc/guides/prog_guide/vhost_lib.rst index dc29229..333bd0a 100644 --- a/doc/guides/prog_guide/vhost_lib.rst

[dpdk-dev] [PATCH 3/4] vhost: avoid deadlock on async register

2021-03-16 Thread Jiayu Hu
age. This patch removes calling vring_state_changed() in vhost_user_set_vring_kick() to avoid deadlock on async register. Signed-off-by: Jiayu Hu --- lib/librte_vhost/vhost_user.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c in

[dpdk-dev] [PATCH 2/4] vhost: remove unnecessary free

2021-03-16 Thread Jiayu Hu
This patch removes unnecessary rte_free() for async_pkts_info and async_descs_split. Signed-off-by: Jiayu Hu --- lib/librte_vhost/vhost_user.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c index a60bb94..399675c 100644

[dpdk-dev] [PATCH 1/4] vhost: fix uninitialized vhost queue

2021-03-16 Thread Jiayu Hu
This patch allocates vhost queue by rte_zmalloc() to avoid undefined values. Fixes: 8acd7c213353 ("vhost: fix virtqueues metadata allocation") Signed-off-by: Jiayu Hu --- lib/librte_vhost/vhost.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_vhost/vho

[dpdk-dev] [PATCH 0/4] Refactor async vhost control path

2021-03-16 Thread Jiayu Hu
This patch set refactors async vhost control path. Jiayu Hu (4): vhost: fix uninitialized vhost queue vhost: remove unnecessary free vhost: avoid deadlock on async register doc: update async vhost register/unregister doc/guides/prog_guide/vhost_lib.rst | 13 ++--- lib

[dpdk-dev] [PATCH v4 2/2] vhost: enhance async enqueue for small packets

2021-01-10 Thread Jiayu Hu
incurs extra overheads of tracking completed pktmbufs and function calls, thus degrading performance on small packets. This patch enhances async enqueue for small packets by enabling rte_vhost_submit_enqueue_burst() to return completed packets. Signed-off-by: Jiayu Hu Tested-by: Yinan Wang

[dpdk-dev] [PATCH v4 1/2] vhost: cleanup async enqueue

2021-01-10 Thread Jiayu Hu
This patch removes unnecessary check and function calls, and it changes appropriate types for internal variables and fixes typos. Signed-off-by: Jiayu Hu Tested-by: Yinan Wang --- lib/librte_vhost/rte_vhost_async.h | 8 lib/librte_vhost/virtio_net.c | 16 2

[dpdk-dev] [PATCH v4 0/2] Enhance Async Enqueue for Small Packets

2021-01-10 Thread Jiayu Hu
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

[dpdk-dev] [PATCH v3 2/2] vhost: enhance async enqueue for small packets

2020-12-24 Thread Jiayu Hu
incurs extra overheads of tracking completed pktmbufs and function calls, thus degrading performance on small packets. This patch enhances async enqueue for small packets by enabling rte_vhost_submit_enqueue_burst() to return completed packets. Signed-off-by: Jiayu Hu --- doc/guides/prog_guide

[dpdk-dev] [PATCH v3 1/2] vhost: cleanup async enqueue

2020-12-24 Thread Jiayu Hu
This patch removes unnecessary check and function calls, and it changes appropriate types for internal variables and fixes typos. Signed-off-by: Jiayu Hu --- lib/librte_vhost/rte_vhost_async.h | 6 +++--- lib/librte_vhost/virtio_net.c | 16 2 files changed, 11 insertions

[dpdk-dev] [PATCH v3 0/2] Enhance Async Enqueue for Small Packets

2020-12-24 Thread Jiayu Hu
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

[dpdk-dev] [Patch v2 2/2] vhost: enhance async enqueue for small packets

2020-12-21 Thread Jiayu Hu
incurs extra overheads of tracking completed pktmbufs and function calls, thus degrading performance on small packets. This patch enhances async enqueue for small packets by enabling rte_vhost_submit_enqueue_burst() to return completed packets. Signed-off-by: Jiayu Hu --- doc/guides/prog_guide

[dpdk-dev] [Patch v2 1/2] vhost: cleanup async enqueue

2020-12-21 Thread Jiayu Hu
This patch removes unnecessary check and function calls, and it changes appropriate types for internal variables and fixes typos. Signed-off-by: Jiayu Hu --- lib/librte_vhost/rte_vhost_async.h | 6 +++--- lib/librte_vhost/virtio_net.c | 16 2 files changed, 11 insertions

[dpdk-dev] [Patch v2 0/2] Enhance Async Enqueue for Small Packets

2020-12-21 Thread Jiayu Hu
- 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 | 7 +- lib/librte_vhost/rte_vhost_async.h | 24 ++-- lib/librte_vhost/vhost.c| 14 +- lib/librte_vhost

[dpdk-dev] [PATCH 2/2] vhost: enhance async enqueue for small packets

2020-12-10 Thread Jiayu Hu
incurs extra overheads of tracking completed pktmbufs and function calls, thus degrading performance on small packets. This patch enhances async enqueue for small packets by enabling rte_vhost_submit_enqueue_burst() to return completed packets. Signed-off-by: Jiayu Hu --- lib/librte_vhost

[dpdk-dev] [PATCH 1/2] vhost: cleanup async enqueue

2020-12-10 Thread Jiayu Hu
This patch removes unncessary check and function calls, and it changes appropriate types for internal variables and fixes typos. Signed-off-by: Jiayu Hu --- lib/librte_vhost/rte_vhost_async.h | 6 +++--- lib/librte_vhost/virtio_net.c | 16 2 files changed, 11 insertions

[dpdk-dev] [PATCH 0/2] Enhance Async Enqueue for Small Packets

2020-12-10 Thread Jiayu Hu
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

Re: [dpdk-dev] [PATCH v1] gso: add VXLAN UDP GSO support

2020-11-05 Thread Jiayu Hu
On Thu, Oct 29, 2020 at 02:47:43PM +0800, yang_y...@163.com wrote: > From: Yi Yang > > Many NICs can't offload VXLAN UFO, so it is very important > to do VXLAN UDP GSO by software to improve VM-to-VM UDP > performance, especially for the case that VM MTU is just > 1500 but not 9000. > > With thi

Re: [dpdk-dev] [PATCH v2] gso: fix free issue of mbuf gso segments attach to

2020-10-25 Thread Jiayu Hu
On Mon, Oct 26, 2020 at 10:12:24AM +0800, yang_y_yi wrote: > At 2020-10-26 10:06:09, "Jiayu Hu" wrote: > > >On Mon, Oct 26, 2020 at 08:57:30AM +0800, yang_y_yi wrote: > >> At 2020-10-23 22:46:42, "Ananyev, Konstantin" > >> > >> wrote:

Re: [dpdk-dev] [PATCH v2] gso: fix free issue of mbuf gso segments attach to

2020-10-25 Thread Jiayu Hu
On Mon, Oct 26, 2020 at 08:57:30AM +0800, yang_y_yi wrote: > At 2020-10-23 22:46:42, "Ananyev, Konstantin" > wrote: > > >> From: yang_y_yi > >> Sent: Friday, October 23, 2020 2:18 PM > >> To: Ananyev, Konstantin > >> Cc: dev@dpdk.org; Hu, Jiayu ; techbo...@dpdk.org; > >> tho...@monjalon.net; y

Re: [dpdk-dev] [PATCH v7 2/3] gro: add VXLAN UDP/IPv4 GRO support

2020-09-26 Thread Jiayu Hu
On Sun, Sep 27, 2020 at 11:14:44AM +0800, yang_y_yi wrote: > Ok, thanks Jiayu, but I don't know before which "}" whitespace should be > inserted, can you paste your check report here? > > BTW, I used chekpatch.pl in Linux 5.5.9, it doesn't report this,I also tried > checkpatch.pl in Linus kernel g

Re: [dpdk-dev] [PATCH v6 2/3] gro: add VXLAN UDP/IPv4 GRO support

2020-09-22 Thread Jiayu Hu
ing packets once find one whose timestamp is greater than flush_timestamp. > > At 2020-09-23 10:15:12, "Jiayu Hu" wrote: > >On Tue, Sep 22, 2020 at 03:38:29PM +0800, yang_y_yi wrote: > >> The problem is timestamp of which one item in a flow we should use as > >

Re: [dpdk-dev] [PATCH v6 2/3] gro: add VXLAN UDP/IPv4 GRO support

2020-09-22 Thread Jiayu Hu
> I'm not sure what inconsistentcy you're saying mean. > > At 2020-09-22 14:55:46, "Jiayu Hu" wrote: > >On Tue, Sep 22, 2020 at 02:23:39PM +0800, yang_y_yi wrote: > >> Not a question, in next flush, they will be flushed, we have to check > >> t

Re: [dpdk-dev] [PATCH v6 2/3] gro: add VXLAN UDP/IPv4 GRO support

2020-09-21 Thread Jiayu Hu
On Tue, Sep 22, 2020 at 02:23:39PM +0800, yang_y_yi wrote: > Not a question, in next flush, they will be flushed, we have to check > timestamp > in the first time unless we don't strictly follow this time limitation. who will check the timestamp? I did't get the point. IMO, this will cause incon

Re: [dpdk-dev] [PATCH v6 2/3] gro: add VXLAN UDP/IPv4 GRO support

2020-09-21 Thread Jiayu Hu
On Tue, Sep 22, 2020 at 09:29:38AM +0800, yang_y_yi wrote: > Thanks Jiayu, I have fixed other comments except this one: > > > >The items of a flow are ordered by frag_oft, and start_time > >of these items is not always in ascending order. Therefore, > >you cannot skip checking the items after the

Re: [dpdk-dev] [PATCH v5 2/2] gro: add VXLAN UDP GRO support

2020-09-15 Thread Jiayu Hu
t; key.outer_ip_src_addr = outer_ipv4_hdr->src_addr; > key.outer_ip_dst_addr = outer_ipv4_hdr->dst_addr; > - key.outer_src_port = udp_hdr->src_port; > + /* Note: It is unnecessary to save outer_src_port here because it > can > +* be different for Vx

Re: [dpdk-dev] [PATCH v5 2/2] gro: add VXLAN UDP GRO support

2020-09-13 Thread Jiayu Hu
frag_offset, ip_dl); > if (cmp) { > if (merge_two_vxlan_udp4_packets( > @@ -481,12 +481,10 @@ > INVALID_ARRAY_INDEX); > tbl->items[start_idx].inner_item.next_pkt_idx >

Re: [dpdk-dev] [PATCH v4 1/2] gro: add UDP GRO support

2020-09-07 Thread Jiayu Hu
Some comments are inline. Thanks, Jiayu On Fri, Sep 04, 2020 at 04:37:39PM +0800, yang_y...@163.com wrote: > From: Yi Yang > > UDP GRO can help improve VM-to-VM UDP performance when > VM is enabled UFO or GSO, GRO must be supported if GSO > or UFO is enabled, otherwise, performance gain will be

[dpdk-dev] [PATCH 4/4] doc: add I/OAT acceleration support for vhost-user PMD

2020-03-16 Thread Jiayu Hu
Signed-off-by: Jiayu Hu --- doc/guides/nics/vhost.rst | 14 ++ 1 file changed, 14 insertions(+) diff --git a/doc/guides/nics/vhost.rst b/doc/guides/nics/vhost.rst index 912f4bd..f0d9520 100644 --- a/doc/guides/nics/vhost.rst +++ b/doc/guides/nics/vhost.rst @@ -25,6 +25,15

[dpdk-dev] [PATCH 3/4] net/vhost: leverage DMA engines to accelerate Tx operations

2020-03-16 Thread Jiayu Hu
evice of a queue. Here is an example: $ ./testpmd -c f -n 4 \ --vdev 'net_vhost0,iface=/tmp/s0,queues=1,dmas=[txq0@00:04.0]' Signed-off-by: Jiayu Hu --- drivers/net/vhost/Makefile| 2 +- drivers/net/vhost/internal.h | 19 + drivers/net/vhost/meson.

[dpdk-dev] [PATCH 2/4] net/vhost: setup vrings for DMA-accelerated datapath

2020-03-16 Thread Jiayu Hu
This patch gets vrings' addresses and sets up GPA and HPA mappings for offloading large data movement from the CPU to DMA engines in vhost-user PMD. Signed-off-by: Jiayu Hu --- drivers/Makefile | 2 +- drivers/net/vhost/Makefile| 4 +- drivers/net/vhost/inter

[dpdk-dev] [PATCH 1/4] vhost: populate guest memory for DMA-accelerated vhost-user

2020-03-16 Thread Jiayu Hu
rated vhost-user to populate guest's memory. Signed-off-by: Jiayu Hu --- lib/librte_vhost/rte_vhost.h | 1 + lib/librte_vhost/socket.c | 20 lib/librte_vhost/vhost.h | 2 ++ lib/librte_vhost/vhost_user.c | 3 ++- 4 files changed, 25 insertions(+), 1 deletio

[dpdk-dev] [PATCH 0/4] Support DMA-accelerated Tx operations for vhost-user PMD

2020-03-16 Thread Jiayu Hu
roughput improvement will be higher. Jiayu Hu (4): vhost: populate guest memory for DMA-accelerated vhost-user net/vhost: setup vrings for DMA-accelerated datapath net/vhost: leverage DMA engines to accelerate Tx operations doc: add I/OAT acceleration support for vhost-user PMD doc/g

[dpdk-dev] [RFC v2 1/2] vhost: populate guest memory for DMA-accelerated vhost-user

2019-10-31 Thread Jiayu Hu
rated vhost-user to populate guest's memory. Signed-off-by: Jiayu Hu --- lib/librte_vhost/rte_vhost.h | 1 + lib/librte_vhost/socket.c | 11 +++ lib/librte_vhost/vhost.h | 2 ++ lib/librte_vhost/vhost_user.c | 3 ++- 4 files changed, 16 insertions(+), 1 deletion(-) diff -

[dpdk-dev] [RFC v2 0/2] Add a PMD for DMA-accelerated vhost-user

2019-10-31 Thread Jiayu Hu
st-dma can improve the throughput for host testpmd around 20%~30% in the VM2VM and PVP cases; with larger packets, the throughput improvement will be higher. Change log == v2: - provide DMA-accelerated vhost-user PMD to support various DMA engines. Jiayu Hu (2): vhost: populate gues

[dpdk-dev] [RFC v2 2/2] net/vhost_dma: add vHost DMA driver

2019-10-31 Thread Jiayu Hu
0:04.0,client=0' Signed-off-by: Jiayu Hu --- config/common_base |2 + config/common_linux|1 + drivers/Makefile |2 +- drivers/net/Makefile |1 + d

[dpdk-dev] [RFC 2/2] net/vhost_ioat: add vhost I/OAT driver

2019-09-26 Thread Jiayu Hu
md -c f -n 4 \ --vdev 'ioat_vhost0,iface=/tmp/sock0,queues=2,ioats=(txq0@00:04.0;txq1@00:04.1),client=0' Signed-off-by: Jiayu Hu --- config/common_base |2 + config/common_linux |1 + drivers/Makefile|

[dpdk-dev] [RFC 0/2] Add a PMD for I/OAT accelerated vhost-user

2019-09-26 Thread Jiayu Hu
currently, one I/OAT device can only be used by one queue and a queue can use one I/OAT device at a time. In addition, the PMD supports multiqueue and both client and server modes. Users can specify the queue number and client/server mode by 'queues' and 'client' param

[dpdk-dev] [RFC 1/2] vhost: populate guest memory for DMA-accelerated vhost-user

2019-09-26 Thread Jiayu Hu
rated vhost-user to populate guest's memory. Signed-off-by: Jiayu Hu --- lib/librte_vhost/rte_vhost.h | 1 + lib/librte_vhost/socket.c | 10 ++ lib/librte_vhost/vhost.h | 2 ++ lib/librte_vhost/vhost_user.c | 3 ++- 4 files changed, 15 insertions(+), 1 deletion(-) diff -

[dpdk-dev] [PATCH v2] vhost: fix interrupt suppression for the split ring

2019-03-16 Thread Jiayu Hu
split ring match kernel backend to suppress more interrupts. Fixes: e37ff954405a ("vhost: support virtqueue interrupt/notification suppression") Cc: sta...@dpdk.org Signed-off-by: Jiayu Hu --- change in v2: - fix virtio-net driver reload lib/librte_vhost/vhost.h | 12 +++

[dpdk-dev] [PATCH] vhost: fix interrupt suppression for the split ring

2019-02-22 Thread Jiayu Hu
kernel backend to suppress more interrupts. Fixes: e37ff954405a ("vhost: support virtqueue interrupt/notification suppression") Cc: sta...@dpdk.org Signed-off-by: Jiayu Hu --- lib/librte_vhost/vhost.h | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/li

[dpdk-dev] [PATCH v6] doc: add GRO limitations in prog_guide

2019-01-15 Thread Jiayu Hu
This patch adds GRO limitations in the programmer guide. Fixes: 2c900d09055e ("doc: add GRO guide") Cc: sta...@dpdk.org Signed-off-by: Jiayu Hu --- changes in v6: - add VLAN limitation changes in v5: - remove fix commit 9e0b9d2ec0f4 changes in v4: - update MBUF->l2_len/... requir

[dpdk-dev] [PATCH v3] gro: add missing invalid TCP header length check

2019-01-15 Thread Jiayu Hu
memory accesses. Fixes: 0d2cbe59b719 ("lib/gro: support TCP/IPv4") Fixes: 9e0b9d2ec0f4 ("gro: support VxLAN GRO") Cc: sta...@dpdk.org Signed-off-by: Jiayu Hu Tested-by: Yinan Wang --- changes in v3: - remove l2 and l3 length checks - rename macro changes in v2: - fix VxLAN hea

[dpdk-dev] [PATCH v2] gro: add missing invalid packet checks

2019-01-10 Thread Jiayu Hu
CP/IPv4") Fixes: 9e0b9d2ec0f4 ("gro: support VxLAN GRO") Cc: sta...@dpdk.org Signed-off-by: Jiayu Hu --- changes in v2: - fix VxLAN header length check bug for VxLAN GRO; - fix ethernet header length check bug; - use sizeof() and macro to present valid header length; - add VLAN rel

[dpdk-dev] [PATCH v5] doc: add GRO API limitations in prog_guide

2019-01-09 Thread Jiayu Hu
This patch adds GRO API limitations in the programmer guide. Fixes: 2c900d09055e ("doc: add GRO guide") Cc: sta...@dpdk.org Signed-off-by: Jiayu Hu --- changes in v5: - remove fix commit 9e0b9d2ec0f4 changes in v4: - update MBUF->l2_len/... requirement changes in v3: - add MB

  1   2   3   4   >