[PATCH v11] app/dma-perf: introduce dma-perf application

2023-06-29 Thread Cheng Jiang
different scenarios automatically with a pre-set config file. Memory Copy performance test are supported for now. This patch also updates the documentation and maintainer list for the application. Signed-off-by: Cheng Jiang Signed-off-by: Jiayu Hu Signed-off-by: Yuan Wang Acked-by: Morten Brørup Acked

[PATCH v10] app/dma-perf: introduce dma-perf application

2023-06-27 Thread Cheng Jiang
different scenarios automatically with a pre-set config file. Memory Copy performance test are supported for now. Signed-off-by: Cheng Jiang Signed-off-by: Jiayu Hu Signed-off-by: Yuan Wang Acked-by: Morten Brørup Acked-by: Chenbo Xia --- v10: rebased code from 23.07-rc2; v9: improved error

[PATCH v9] app/dma-perf: introduce dma-perf application

2023-06-26 Thread Cheng Jiang
different scenarios automatically with a pre-set config file. Memory Copy performance test are supported for now. Signed-off-by: Cheng Jiang Signed-off-by: Jiayu Hu Signed-off-by: Yuan Wang Acked-by: Morten Brørup Acked-by: Chenbo Xia --- v9: improved error handling; improved lcore_params

[PATCH v8] app/dma-perf: introduce dma-perf application

2023-06-20 Thread Cheng Jiang
different scenarios automatically with a pre-set config file. Memory Copy performance test are supported for now. Signed-off-by: Cheng Jiang Signed-off-by: Jiayu Hu Signed-off-by: Yuan Wang Acked-by: Morten Brørup Acked-by: Chenbo Xia --- v8: fixed string copy issue in parse_lcore(); improved

[PATCH v7] app/dma-perf: introduce dma-perf application

2023-06-18 Thread Cheng Jiang
different scenarios automatically with a pre-set config file. Memory Copy performance test are supported for now. Signed-off-by: Cheng Jiang Signed-off-by: Jiayu Hu Signed-off-by: Yuan Wang Acked-by: Morten Brørup Acked-by: Chenbo Xia --- v7: fixed some strcpy issues; removed cache setup in

[PATCH v6] app/dma-perf: introduce dma-perf application

2023-06-12 Thread Cheng Jiang
different scenarios automatically with a pre-set config file. Memory Copy performance test are supported for now. Signed-off-by: Cheng Jiang Signed-off-by: Jiayu Hu Signed-off-by: Yuan Wang Acked-by: Morten Brørup Acked-by: Chenbo Xia --- v6: improved code based on Anoob's comments; fixed

[PATCH v5] app/dma-perf: introduce dma-perf application

2023-06-08 Thread Cheng Jiang
different scenarios automatically with a pre-set config file. Memory Copy performance test are supported for now. Signed-off-by: Cheng Jiang Signed-off-by: Jiayu Hu Signed-off-by: Yuan Wang Acked-by: Morten Brørup Acked-by: Chenbo Xia --- v5: fixed some LONG_LINE warnings; v4: fixed inaccuracy of

[PATCH v4] app/dma-perf: introduce dma-perf application

2023-06-07 Thread Cheng Jiang
different scenarios automatically with a pre-set config file. Memory Copy performance test are supported for now. Signed-off-by: Cheng Jiang Signed-off-by: Jiayu Hu Signed-off-by: Yuan Wang Acked-by: Morten Brørup --- v4: fixed inaccuracy of the memory footprint display; v3: fixed some typos; v2

[PATCH v3] app/dma-perf: introduce dma-perf application

2023-05-17 Thread Cheng Jiang
different scenarios automatically with a pre-set config file. Memory Copy performance test are supported for now. Signed-off-by: Cheng Jiang Signed-off-by: Jiayu Hu Signed-off-by: Yuan Wang Acked-by: Morten Brørup --- v3: fixed some typos; v2: added lcore/dmadev designation; added error case

[PATCH v2] app/dma-perf: introduce dma-perf application

2023-05-16 Thread Cheng Jiang
different scenarios automatically with a pre-set config file. Memory Copy performance test are supported for now. Signed-off-by: Cheng Jiang Signed-off-by: Jiayu Hu Signed-off-by: Yuan Wang Acked-by: Morten Brørup --- v2: added lcore/dmadev designation; added error case process; removed

[PATCH 1/2] vhost: add ingress API for port mirroring datapath

2023-04-20 Thread Cheng Jiang
Similar to the port mirroring function on the switch or router, this patch also implements an ingress function on the Vhost lib. When data is sent to a front-end, it will also send the data to its mirror front-end. Signed-off-by: Cheng Jiang Signed-off-by: Yuan Wang Signed-off-by: Wenwu Ma

[PATCH 2/2] vhost: add egress API for port mirroring datapath

2023-04-20 Thread Cheng Jiang
This patch implements egress function on the Vhost lib. When packets are received from a front-end, it will also send the packets to its mirror front-end. Signed-off-by: Cheng Jiang Signed-off-by: Yuan Wang Signed-off-by: Wenwu Ma --- lib/vhost/rte_vhost_async.h | 11 + lib/vhost/version.map

[PATCH 0/2] vhost: add port mirroring function in the vhost lib

2023-04-20 Thread Cheng Jiang
. Cheng Jiang (2): vhost: add ingress API for port mirroring datapath vhost: add egress API for port mirroring datapath lib/vhost/rte_vhost_async.h | 17 + lib/vhost/version.map |3 + lib/vhost/virtio_net.c | 1266 +++ 3 files changed, 1286

[PATCH] app/dma-perf: introduce dma-perf application

2023-04-20 Thread Cheng Jiang
different scenarios automatically with a pre-set config file. Memory Copy performance test are supported for now. Signed-off-by: Cheng Jiang Signed-off-by: Jiayu Hu Signed-off-by: Yuan Wang Acked-by: Morten Brørup --- app/meson.build | 1 + app/test-dma-perf/benchmark.c | 467

[PATCH] vhost: fix slot index in async split virtqueue Tx

2023-02-22 Thread Cheng Jiang
The slot_idx in the asynchronous Vhost split virtqueue dequeue data path is supposed to be decreased by 1 when desc_to_mbuf() fails. Fixes: 84d5204310d7 ("vhost: support async dequeue for split ring") Cc: sta...@dpdk.org Signed-off-by: Cheng Jiang --- lib/vhost/virtio_net.c | 1

[PATCH v3] app/dma-perf: introduce dma-perf application

2023-01-17 Thread Cheng Jiang
different scenarios automatically with a pre-set config file. Memory Copy performance test are supported for now. Signed-off-by: Cheng Jiang Signed-off-by: Jiayu Hu Signed-off-by: Yuan Wang Acked-by: Morten Brørup --- v3: fixed compile issues for loongarch. fixed compile issues for intel. fixed coding

[PATCH v2] app/dma-perf: introduce dma-perf application

2023-01-16 Thread Cheng Jiang
different scenarios automatically with a pre-set config file. Memory Copy performance test are supported for now. Signed-off-by: Cheng Jiang Signed-off-by: Jiayu Hu Signed-off-by: Yuan Wang Acked-by: Morten Brørup --- v2: fixed some CI issues. app/meson.build | 1 + app/test-dma-perf

[PATCH v2 3/3] vhost: add batch dequeue in async vhost packed ring

2023-01-12 Thread Cheng Jiang
Add batch dequeue function in asynchronous vhost packed ring to improve the performance. Chained mbufs are not supported, it will be handled in single dequeue function. Signed-off-by: Cheng Jiang Signed-off-by: Yuan Wang --- lib/vhost/virtio_net.c | 170

[PATCH v2 2/3] vhost: add batch enqueue in async vhost packed ring

2023-01-12 Thread Cheng Jiang
Add batch enqueue function in asynchronous vhost packed ring to improve the performance. Chained mbufs are not supported, it will be handled in single enqueue function. Signed-off-by: Cheng Jiang --- lib/vhost/virtio_net.c | 163 + 1 file changed, 163

[PATCH v2 1/3] vhost: remove redundant copy for packed shadow used ring

2023-01-12 Thread Cheng Jiang
for the shadow used ring. The async shadow used ring will be updated directly. Signed-off-by: Cheng Jiang --- lib/vhost/virtio_net.c | 66 -- 1 file changed, 31 insertions(+), 35 deletions(-) diff --git a/lib/vhost/virtio_net.c b/lib/vhost/virtio_net.c

[PATCH v2 0/3] Async vhost packed ring optimization

2023-01-12 Thread Cheng Jiang
To improve the performance of async vhost packed ring. We remove the unnecessary data copy in async vhost packed ring. And add the batch data path in both enqueue data path and dequeue data path. v2: fixed net header settings. Cheng Jiang (3): vhost: remove redundant copy for packed shadow

[PATCH] app/dma-perf: introduce dma-perf application

2022-12-19 Thread Cheng Jiang
different scenarios automatically with a pre-set config file. Memory Copy performance test are supported for now. Signed-off-by: Cheng Jiang Signed-off-by: Jiayu Hu Signed-off-by: Yuan Wang Acked-by: Morten Brørup --- app/meson.build | 1 + app/test-dma-perf/benchmark.c | 539

[PATCH 3/3] vhost: add batch dequeue in async vhost packed ring

2022-12-19 Thread Cheng Jiang
Add batch dequeue function in asynchronous vhost packed ring to improve the performance. Chained mbufs are not supported, it will be handled in single dequeue function. Signed-off-by: Cheng Jiang Signed-off-by: Yuan Wang --- lib/vhost/virtio_net.c | 170

[PATCH 2/3] vhost: add batch enqueue in async vhost packed ring

2022-12-19 Thread Cheng Jiang
Add batch enqueue function in asynchronous vhost packed ring to improve the performance. Chained mbufs are not supported, it will be handled in single enqueue function. Signed-off-by: Cheng Jiang --- lib/vhost/virtio_net.c | 157 + 1 file changed, 157

[PATCH 1/3] vhost: remove redundant copy for packed shadow used ring

2022-12-19 Thread Cheng Jiang
for the shadow used ring. The async shadow used ring will be updated directly. Signed-off-by: Cheng Jiang --- lib/vhost/virtio_net.c | 66 -- 1 file changed, 31 insertions(+), 35 deletions(-) diff --git a/lib/vhost/virtio_net.c b/lib/vhost/virtio_net.c

[PATCH 0/3] Async vhost packed ring optimization

2022-12-19 Thread Cheng Jiang
To improve the performance of async vhost packed ring. We remove the unnecessary data copy in async vhost packed ring. And add the batch data path in both enqueue data path and dequeue data path. Cheng Jiang (3): vhost: remove redundant copy for packed shadow used ring vhost: add batch

[RFC 3/3] vhost: add batch dequeue in async vhost packed ring

2022-12-16 Thread Cheng Jiang
Add batch dequeue function in asynchronous vhost packed ring to improve the performance. Chained mbufs are not supported, it will be handled in single enqueue function. Signed-off-by: Cheng Jiang Signed-off-by: Yuan Wang --- lib/vhost/virtio_net.c | 170

[RFC 2/3] vhost: add batch enqueue in async vhost packed ring

2022-12-16 Thread Cheng Jiang
Add batch enqueue function in asynchronous vhost packed ring to improve the performance. Chained mbufs are not supported, it will be handled in single enqueue function. Signed-off-by: Cheng Jiang --- lib/vhost/virtio_net.c | 159 - 1 file changed, 157

[RFC 1/3] vhost: remove redundant copy for packed shadow used ring

2022-12-16 Thread Cheng Jiang
for the shadow used ring. The async shadow used ring will be updated directly. Signed-off-by: Cheng Jiang --- lib/vhost/virtio_net.c | 66 -- 1 file changed, 31 insertions(+), 35 deletions(-) diff --git a/lib/vhost/virtio_net.c b/lib/vhost/virtio_net.c

[RFC 0/3] Async vhost packed ring optimization

2022-12-16 Thread Cheng Jiang
To improve the performance of async vhost packed ring. We remove the unnecessary data copy in async vhost packed ring. And add the batch data path in both enqueue data path and dequeue data path. Cheng Jiang (3): vhost: remove redundant copy for packed shadow used ring vhost: add batch

[RFC v5] app/dma-perf: introduce dma-perf application

2022-10-24 Thread Cheng Jiang
different scenarios automatically with a pre-set config file. Memory Copy performance test are supported for now. Signed-off-by: Cheng Jiang Signed-off-by: Jiayu Hu Signed-off-by: Yuan Wang Acked-by: Morten Brørup --- v5: fixed some typos. v4: fixed some building issues. v3: improved nr_buf

[RFC v4] app/dma-perf: introduce dma-perf application

2022-10-24 Thread Cheng Jiang
different scenarios automatically with a pre-set config file. Memory Copy performance test are supported for now. Signed-off-by: Cheng Jiang Signed-off-by: Jiayu Hu Signed-off-by: Yuan Wang Acked-by: Morten Brørup --- v4: fixed some building issues. v3: improved nr_buf calculation and added support

[RFC v3] app/dma-perf: introduce dma-perf application

2022-10-18 Thread Cheng Jiang
different scenarios automatically with a pre-set config file. Memory Copy performance test are supported for now. Signed-off-by: Cheng Jiang Signed-off-by: Jiayu Hu Signed-off-by: Yuan Wang Acked-by: Morten Brørup --- v3: improved nr_buf calculation and added support for getting subprocess exit

[PATCH v2 2/2] vhost: fix slot index calculation in async vhost

2022-10-10 Thread Cheng Jiang
. Fixes: 84d5204310d7 ("vhost: support async dequeue for split ring") Fixes: fe8477ebbd94 ("vhost: support async packed ring dequeue") Cc: sta...@dpdk.org Signed-off-by: Cheng Jiang --- lib/vhost/virtio_net.c | 16 ++-- 1 file changed, 14 insertions(+), 2 deletions(

[PATCH v2 1/2] vhost: fix descs count in async vhost packed ring

2022-10-10 Thread Cheng Jiang
. Fixes: fe8477ebbd94 ("vhost: support async packed ring dequeue") Cc: sta...@dpdk.org Signed-off-by: Cheng Jiang --- lib/vhost/virtio_net.c | 24 +++- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/lib/vhost/virtio_net.c b/lib/vhost/virtio_net.c index

[PATCH v2 0/2] vhost: fix some async vhost index calculation issues

2022-10-10 Thread Cheng Jiang
Fix some async vhost index calculation issues. v2: fixed fixes tag and replaced some words in commit message. Cheng Jiang (2): vhost: fix descs count in async vhost packed ring vhost: fix slot index calculation in async vhost lib/vhost/virtio_net.c | 40

[RFC v2] app/dma-perf: introduce dma-perf application

2022-09-19 Thread Cheng Jiang
different scenarios automatically with a pre-set config file. Memory Copy performance test are supported for now. Signed-off-by: Cheng Jiang Signed-off-by: Jiayu Hu Signed-off-by: Yuan Wang Acked-by: Morten Brørup --- v2: fixed some CI issues. app/meson.build | 1 + app/test-dma-perf

[RFC] app/dma-perf: introduce dma-perf application

2022-09-15 Thread Cheng Jiang
different scenarios automatically with a pre-set config file. Memory Copy performance test are supported for now. Signed-off-by: Cheng Jiang Signed-off-by: Jiayu Hu Signed-off-by: Yuan Wang --- app/meson.build | 1 + app/test-dma-perf/benchmark.c | 537

[PATH 2/2] vhost: fix slot index calculation in async vhost

2022-08-21 Thread Cheng Jiang
. Signed-off-by: Cheng Jiang --- lib/vhost/virtio_net.c | 16 ++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/lib/vhost/virtio_net.c b/lib/vhost/virtio_net.c index bfc6d65b7c..f804bce0bd 100644 --- a/lib/vhost/virtio_net.c +++ b/lib/vhost/virtio_net.c @@ -3462,6 +3462,7

[PATH 1/2] vhost: fix descs count in async vhost packed ring

2022-08-21 Thread Cheng Jiang
. Signed-off-by: Cheng Jiang --- lib/vhost/virtio_net.c | 24 +++- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/lib/vhost/virtio_net.c b/lib/vhost/virtio_net.c index 35fa4670fd..bfc6d65b7c 100644 --- a/lib/vhost/virtio_net.c +++ b/lib/vhost/virtio_net.c @@ -3553,14

[PATH 0/2] vhost: fix some async vhost index calculation issues

2022-08-21 Thread Cheng Jiang
Fix some async vhost index calculation issues. Cheng Jiang (2): vhost: fix descs count in async vhost packed ring vhost: fix slot index calculation in async vhost lib/vhost/virtio_net.c | 40 +--- 1 file changed, 29 insertions(+), 11 deletions

[RFC 2/2] vhost: add egress API for port mirroring datapath

2022-08-14 Thread Cheng Jiang
This patch implements such an egress function on the Vhost lib. When data is received from a front-end, it will also send the data to its mirrorfront-end. Signed-off-by: Cheng Jiang Signed-off-by: Wenwu Ma --- lib/vhost/rte_vhost_async.h | 12 +- lib/vhost/version.map | 3 + lib/vhost

[RFC 1/2] vhost: add ingress API for port mirroring datapath

2022-08-14 Thread Cheng Jiang
From: Wenwu Ma Similar to the port mirroring function on the switch or router, this patch also implements an ingress function on the Vhost lib. When data is sent to a front-end, it will also send the data to its mirror front-end. Signed-off-by: Cheng Jiang Signed-off-by: Wenwu Ma --- lib

[RFC 0/2] vhost: add port mirroring function in the vhost lib

2022-08-14 Thread Cheng Jiang
-end. Cheng Jiang (1): vhost: add egress API for port mirroring datapath Wenwu Ma (1): vhost: add ingress API for port mirroring datapath lib/vhost/rte_vhost_async.h | 26 +- lib/vhost/version.map |5 + lib/vhost/vhost.h |3 +- lib/vhost/virtio_net.c | 2755

[PATCH v3] doc: add release notes for async vhost dequeue data-path

2022-06-27 Thread Cheng Jiang
Add release notes for asynchronous vhost dequeue data-path. Emphasize that split virtqueue and packed virtqueue are both supported in asynchronous vhost dequeue data-path. Signed-off-by: Cheng Jiang --- v3: code rebased. v2: fixed a full stop missing in the commit message. doc/guides/rel_notes

[PATCH v2] doc: add release notes for async vhost dequeue data-path

2022-06-26 Thread Cheng Jiang
Add release notes for asynchronous vhost dequeue data-path. Emphasize that split virtqueue and packed virtqueue are both supported in asynchronous vhost dequeue data-path. Signed-off-by: Cheng Jiang --- v2: fixed a full stop missing in the commit message. doc/guides/rel_notes/release_22_07.rst

[PATCH] doc: add release notes for async vhost dequeue data-path

2022-06-26 Thread Cheng Jiang
Add release notes for asynchronous vhost dequeue data-path. Emphasize that split virtqueue and packed virtqueue are both supported in asynchronous vhost dequeue data-path Signed-off-by: Cheng Jiang --- doc/guides/rel_notes/release_22_07.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion

[PATCH] add support for async vhost packed ring dequeue

2022-06-13 Thread Cheng Jiang
This patch implements packed ring dequeue data path for asynchronous vhost. Signed-off-by: Cheng Jiang Reviewed-by: Maxime Coquelin --- lib/vhost/virtio_net.c | 218 - 1 file changed, 192 insertions(+), 26 deletions(-) diff --git a/lib/vhost

[RFC v3] add support for async vhost packed ring dequeue

2022-05-29 Thread Cheng Jiang
This RFC patch implements packed ring dequeue data path for asynchronous vhost. Signed-off-by: Cheng Jiang --- lib/vhost/virtio_net.c | 217 - 1 file changed, 191 insertions(+), 26 deletions(-) diff --git a/lib/vhost/virtio_net.c b/lib/vhost/virtio_net.c

[RFC v2] add support for async vhost packed ring dequeue

2022-04-19 Thread Cheng Jiang
This RFC patch implements packed ring dequeue data path for asynchronous vhost. Signed-off-by: Cheng Jiang --- It's based on the patch set: http://patchwork.dpdk.org/project/dpdk/cover/20220419034323.92820-1-xuan.d...@intel.com/ lib/vhost/virtio_net.c

[RFC] add support for async packed ring dequeue

2022-04-07 Thread Cheng Jiang
This RFC patch implements packed ring dequeue data path for asynchronous vhost. It's based on the RFC patch: http://patchwork.dpdk.org/project/dpdk/cover/20220310065407.17145-1-xuan.d...@intel.com/ Signed-off-by: Cheng Jiang --- lib/vhost/virtio_net.c

[dpdk-dev] [RFC v2] vhost: add support async dequeue for packed ring

2021-09-14 Thread Cheng Jiang
This patch implements asynchronous dequeue data path for packed ring. Signed-off-by: Cheng Jiang --- It's based on these 2 patches: 1. vhost: remove copy threshold for async vhost http://patches.dpdk.org/project/dpdk/patch/1629463466-450012-1-git-send-email-jiayu...@intel.com/ 2. vhost: su

[dpdk-dev] [RFC] vhost: add support async dequeue for packed ring

2021-09-09 Thread Cheng Jiang
This patch implements asynchronous dequeue data path for packed ring. Signed-off-by: Cheng Jiang --- It's based on these 2 patches: 1. vhost: remove copy threshold for async vhost http://patches.dpdk.org/project/dpdk/patch/1629463466-450012-1-git-send-email-jiayu...@intel.com/ 2. vhost: su

[dpdk-dev] [PATCH v8 4/4] examples/vhost: handle memory hotplug for async vhost

2021-07-23 Thread Cheng Jiang
. add inflight packets clear process in destroy_device() and vring_state_changed(). Signed-off-by: Cheng Jiang Reviewed-by: Maxime Coquelin --- examples/vhost/main.c | 55 +-- examples/vhost/main.h | 1 + 2 files changed, 54 insertions(+), 2 deletions

[dpdk-dev] [PATCH v8 3/4] vhost: handle memory hotplug for async vhost

2021-07-23 Thread Cheng Jiang
From: Jiayu Hu When the guest memory is hotplugged, the vhost application which enables DMA acceleration must stop DMA transfers before the vhost re-maps the guest memory. This patch is to notify the vhost application of stopping DMA transfers. Signed-off-by: Jiayu Hu Reviewed-by: Maxime Coque

[dpdk-dev] [PATCH v8 2/4] vhost: add unsafe API to clear packets in async vhost

2021-07-23 Thread Cheng Jiang
notes for virtqueue inflight packets clear API in vhost lib. Signed-off-by: Cheng Jiang Reviewed-by: Maxime Coquelin --- doc/guides/prog_guide/vhost_lib.rst| 5 ++ doc/guides/rel_notes/release_21_08.rst | 5 ++ lib/vhost/rte_vhost_async.h| 22 ++ lib/vhost/version.map

[dpdk-dev] [PATCH v8 1/4] vhost: fix async vhost ops return type

2021-07-23 Thread Cheng Jiang
"vhost: support packed ring in async datapath") Cc: sta...@dpdk.org Signed-off-by: Cheng Jiang Reviewed-by: Maxime Coquelin --- examples/vhost/ioat.c | 4 +-- examples/vhost/ioat.h | 8 ++--- lib/vhost/rte_vhost_async.h | 8 ++--- lib/vhost/virtio_net.c | 61 +

[dpdk-dev] [PATCH v8 0/4] vhost: handle memory hotplug for async vhost

2021-07-23 Thread Cheng Jiang
eturn type * fixed async ops fail handler * updated the doc v2: * changed the patch structure Cheng Jiang (3): vhost: fix async vhost ops return type vhost: add unsafe API to clear packets in async vhost examples/vhost: handle memory hotplug for async vhost Jiayu Hu (1): vhost: handle memory h

[dpdk-dev] [PATCH v7 5/5] doc: update doc for queue clear API in vhost lib

2021-07-21 Thread Cheng Jiang
Update the program guide and release notes for virtqueue inflight packets clear API in vhost lib. Signed-off-by: Cheng Jiang Reviewed-by: Maxime Coquelin --- doc/guides/prog_guide/vhost_lib.rst| 5 + doc/guides/rel_notes/release_21_08.rst | 5 + 2 files changed, 10 insertions

[dpdk-dev] [PATCH v7 4/5] examples/vhost: handle memory hotplug for async vhost

2021-07-21 Thread Cheng Jiang
. add inflight packets clear process in destroy_device() and vring_state_changed(). Signed-off-by: Cheng Jiang Reviewed-by: Maxime Coquelin --- examples/vhost/main.c | 55 +-- examples/vhost/main.h | 1 + 2 files changed, 54 insertions(+), 2 deletions

[dpdk-dev] [PATCH v7 3/5] vhost: handle memory hotplug for async vhost

2021-07-21 Thread Cheng Jiang
From: Jiayu Hu When the guest memory is hotplugged, the vhost application which enables DMA acceleration must stop DMA transfers before the vhost re-maps the guest memory. This patch is to notify the vhost application of stopping DMA transfers. Signed-off-by: Jiayu Hu Reviewed-by: Maxime Coque

[dpdk-dev] [PATCH v7 2/5] vhost: add unsafe API to clear packets in async vhost

2021-07-21 Thread Cheng Jiang
Applications need to stop DMA transfers and finish all the inflight packets when in VM memory hot-plug case and async vhost is used. This patch is to provide an unsafe API to clear inflight packets which are submitted to DMA engine in vhost async data path. Signed-off-by: Cheng Jiang Reviewed-by

[dpdk-dev] [PATCH v7 1/5] vhost: fix async vhost ops return type

2021-07-21 Thread Cheng Jiang
26 ("vhost: fix async callback return type") Fixes: 6b3c81db8bb7 ("vhost: simplify async copy completion") Fixes: abec60e7115d ("examples/vhost: support vhost async data path") Fixes: 873e8dad6f49 ("vhost: support packed ring in async datapath") Cc: sta...

[dpdk-dev] [PATCH v7 0/5] vhost: handle memory hotplug for async vhost

2021-07-21 Thread Cheng Jiang
structure Cheng Jiang (4): vhost: fix async vhost ops return type vhost: add unsafe API to clear packets in async vhost examples/vhost: handle memory hotplug for async vhost doc: update doc for queue clear API in vhost lib Jiayu Hu (1): vhost: handle memory hotplug for async vhost

[dpdk-dev] [PATCH v6 5/5] doc: update doc for inflight packets clear API in vhost lib

2021-07-19 Thread Cheng Jiang
Update the program guide and release notes for inflight packets clear API in vhost lib. Signed-off-by: Cheng Jiang --- doc/guides/prog_guide/vhost_lib.rst| 5 + doc/guides/rel_notes/release_21_08.rst | 5 + 2 files changed, 10 insertions(+) diff --git a/doc/guides/prog_guide

[dpdk-dev] [PATCH v6 4/5] examples/vhost: handle memory hotplug for async vhost

2021-07-19 Thread Cheng Jiang
. add inflight packets clear process in destroy_device() and vring_state_changed(). Signed-off-by: Cheng Jiang --- examples/vhost/main.c | 55 +-- examples/vhost/main.h | 1 + 2 files changed, 54 insertions(+), 2 deletions(-) diff --git a/examples/vhost

[dpdk-dev] [PATCH v6 3/5] vhost: handle memory hotplug for async vhost

2021-07-19 Thread Cheng Jiang
From: Jiayu Hu When the guest memory is hotplugged, the vhost application which enables DMA acceleration must stop DMA transfers before the vhost re-maps the guest memory. This patch is to notify the vhost application of stopping DMA transfers. Signed-off-by: Jiayu Hu --- lib/vhost/vhost_user

[dpdk-dev] [PATCH v6 2/5] vhost: add unsafe API to clear packets in async vhost

2021-07-19 Thread Cheng Jiang
Applications need to stop DMA transfers and finish all the inflight packets when in VM memory hot-plug case and async vhost is used. This patch is to provide an unsafe API to clear inflight packets which are submitted to DMA engine in vhost async data path. Signed-off-by: Cheng Jiang --- lib

[dpdk-dev] [PATCH v6 1/5] vhost: fix async vhost ops return type

2021-07-19 Thread Cheng Jiang
26 ("vhost: fix async callback return type") Fixes: 6b3c81db8bb7 ("vhost: simplify async copy completion") Fixes: abec60e7115d ("examples/vhost: support vhost async data path") Fixes: 873e8dad6f49 ("vhost: support packed ring in async datapath") Cc: sta...@d

[dpdk-dev] [PATCH v6 0/5] vhost: handle memory hotplug for async vhost

2021-07-19 Thread Cheng Jiang
: fix async vhost ops return type' * improved git log, variable names and logs v4: * rebased on the latest codess v3: * added a patch to fix async ops return type * fixed async ops fail handler * updated the doc v2: * changed the patch structure Cheng Jiang (4): vhost: fix async vhost ops r

[dpdk-dev] [PATCH v5 5/5] doc: update doc for try drain API in vhost lib

2021-07-16 Thread Cheng Jiang
update the program guide and release notes for try drain API in vhost lib. Signed-off-by: Cheng Jiang --- doc/guides/prog_guide/vhost_lib.rst| 5 + doc/guides/rel_notes/release_21_08.rst | 5 + 2 files changed, 10 insertions(+) diff --git a/doc/guides/prog_guide/vhost_lib.rst b

[dpdk-dev] [PATCH v5 4/5] examples/vhost: handle memory hotplug for async vhost

2021-07-16 Thread Cheng Jiang
. add inflight pkt drain process in destroy_device() and vring_state_changed(). Signed-off-by: Cheng Jiang --- examples/vhost/main.c | 48 +-- examples/vhost/main.h | 1 + 2 files changed, 47 insertions(+), 2 deletions(-) diff --git a/examples/vhost/main.c b

[dpdk-dev] [PATCH v5 3/5] vhost: handle memory hotplug for async vhost

2021-07-16 Thread Cheng Jiang
From: Jiayu Hu When the guest memory is hotplugged, the vhost application which enables DMA acceleration must stop DMA transfers before the vhost re-maps the guest memory. This patch is to notify the vhost application of stopping DMA transfers. Signed-off-by: Jiayu Hu --- lib/vhost/vhost_user

[dpdk-dev] [PATCH v5 2/5] vhost: add unsafe API to drain pkts in async vhost

2021-07-16 Thread Cheng Jiang
Applications need to stop DMA transfers and finish all the in-flight pkts when in VM memory hot-plug case and async vhost is used. This patch is to provide an unsafe API to drain in-flight pkts which are submitted to DMA engine in vhost async data path. Signed-off-by: Cheng Jiang --- lib/vhost

[dpdk-dev] [PATCH v5 1/5] vhost: fix async vhost ops return type

2021-07-16 Thread Cheng Jiang
26 ("vhost: fix async callback return type") Fixes: 6b3c81db8bb7 ("vhost: simplify async copy completion") Fixes: abec60e7115d ("examples/vhost: support vhost async data path") Fixes: 873e8dad6f49 ("vhost: support packed ring in async datapath") Cc: sta...@d

[dpdk-dev] [PATCH v5 0/5] vhost: handle memory hotplug for async vhost

2021-07-16 Thread Cheng Jiang
c ops fail handler * updated the doc v2: * changed the patch structure Cheng Jiang (4): vhost: fix async vhost ops return type vhost: add unsafe API to drain pkts in async vhost examples/vhost: handle memory hotplug for async vhost doc: update doc for try drain API in vhost lib Jiayu Hu (1

[dpdk-dev] [PATCH v4 5/5] doc: update doc for try drain API in vhost lib

2021-07-15 Thread Cheng Jiang
update the program guide and release notes for try drain API in vhost lib. Signed-off-by: Cheng Jiang --- doc/guides/prog_guide/vhost_lib.rst| 5 + doc/guides/rel_notes/release_21_08.rst | 5 + 2 files changed, 10 insertions(+) diff --git a/doc/guides/prog_guide/vhost_lib.rst b

[dpdk-dev] [PATCH v4 4/5] examples/vhost: handle memory hotplug for async vhost

2021-07-15 Thread Cheng Jiang
. add inflight pkt drain process in destroy_device() and vring_state_changed(). Signed-off-by: Cheng Jiang --- examples/vhost/main.c | 48 +-- examples/vhost/main.h | 1 + 2 files changed, 47 insertions(+), 2 deletions(-) diff --git a/examples/vhost/main.c b

[dpdk-dev] [PATCH v4 3/5] vhost: handle memory hotplug for async vhost

2021-07-15 Thread Cheng Jiang
From: Jiayu Hu When the guest memory is hotplugged, the vhost application which enables DMA acceleration must stop DMA transfers before the vhost re-maps the guest memory. This patch is to notify the vhost application of stopping DMA transfers. Signed-off-by: Jiayu Hu --- lib/vhost/vhost_user

[dpdk-dev] [PATCH v4 2/5] vhost: add unsafe API to drain pkts in async vhost

2021-07-15 Thread Cheng Jiang
Applications need to stop DMA transfers and finish all the in-flight pkts when in VM memory hot-plug case and async vhost is used. This patch is to provide an unsafe API to drain in-flight pkts which are submitted to DMA engine in vhost async data path. Signed-off-by: Cheng Jiang --- lib/vhost

[dpdk-dev] [PATCH v4 1/5] vhost: fix async vhost ops return type

2021-07-15 Thread Cheng Jiang
The async vhost ops callback should return -1 when there are something wrong in the callback, so the return type should be changed into int32_t. The issue in vhost example is also fixed in this patch. Signed-off-by: Cheng Jiang --- examples/vhost/ioat.c | 4 +-- examples/vhost/ioat.h

[dpdk-dev] [PATCH v4 0/5] vhost: handle memory hotplug for async vhost

2021-07-15 Thread Cheng Jiang
the vhost application of stopping DMA transfers. And enable it in vhost example. v4: * rebased on the latest codess v3: * added a patch to fix async ops return type * fixed async ops fail handler * updated the doc v2: * changed the patch structure Cheng Jiang (4): vhost: fix async vhost ops

[dpdk-dev] [PATCH v2] vhost: fix index overflow for packed ring in async vhost

2021-07-15 Thread Cheng Jiang
") Cc: sta...@dpdk.org Signed-off-by: Cheng Jiang --- lib/vhost/virtio_net.c | 21 ++--- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/lib/vhost/virtio_net.c b/lib/vhost/virtio_net.c index f4a2c88d8b..bfb2bf8fc4 100644 --- a/lib/vhost/virtio_net.c +++ b

[dpdk-dev] [PATCH v3 5/5] doc: update doc for try drain API in vhost lib

2021-07-14 Thread Cheng Jiang
update the program guide and release notes for try drain API in vhost lib. Signed-off-by: Cheng Jiang --- doc/guides/prog_guide/vhost_lib.rst| 5 + doc/guides/rel_notes/release_21_08.rst | 5 + 2 files changed, 10 insertions(+) diff --git a/doc/guides/prog_guide/vhost_lib.rst b

[dpdk-dev] [PATCH v3 4/5] examples/vhost: handle memory hotplug for async vhost

2021-07-14 Thread Cheng Jiang
. add inflight pkt drain process in destroy_device() and vring_state_changed(). Signed-off-by: Cheng Jiang --- examples/vhost/main.c | 48 +-- examples/vhost/main.h | 1 + 2 files changed, 47 insertions(+), 2 deletions(-) diff --git a/examples/vhost/main.c b

[dpdk-dev] [PATCH v3 3/5] vhost: handle memory hotplug for async vhost

2021-07-14 Thread Cheng Jiang
From: Jiayu Hu When the guest memory is hotplugged, the vhost application which enables DMA acceleration must stop DMA transfers before the vhost re-maps the guest memory. This patch is to notify the vhost application of stopping DMA transfers. Signed-off-by: Jiayu Hu --- lib/vhost/vhost_user

[dpdk-dev] [PATCH v3 2/5] vhost: add unsafe API to drain pkts in async vhost

2021-07-14 Thread Cheng Jiang
Applications need to stop DMA transfers and finish all the in-flight pkts when in VM memory hot-plug case and async vhost is used. This patch is to provide an unsafe API to drain in-flight pkts which are submitted to DMA engine in vhost async data path. Signed-off-by: Cheng Jiang --- lib/vhost

[dpdk-dev] [PATCH v3 1/5] vhost: fix async vhost ops return type

2021-07-14 Thread Cheng Jiang
The async vhost ops callback should return -1 when there are something wrong in the callback, so the return type should be changed into int32_t. The issue in vhost example is also fixed in this patch. Signed-off-by: Cheng Jiang --- examples/vhost/ioat.c | 4 +-- examples/vhost/ioat.h

[dpdk-dev] [PATCH v3 0/5] vhost: handle memory hotplug for async vhost

2021-07-14 Thread Cheng Jiang
the vhost application of stopping DMA transfers. And enable it in vhost example. v3: * added a patch to fix async ops return type * fixed async ops fail handler * updated the doc v2: * changed the patch structure Cheng Jiang (4): vhost: fix async vhost ops return type vhost: add unsafe API

[dpdk-dev] [PATCH] vhost: fix index overflow issue in async vhost

2021-07-08 Thread Cheng Jiang
g in async datapath") Cc: sta...@dpdk.org Signed-off-by: Cheng Jiang --- lib/vhost/virtio_net.c | 22 +++--- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/lib/vhost/virtio_net.c b/lib/vhost/virtio_net.c index f4a2c88d8b..61cb5a126c 100644 --- a/lib/vhost/virtio_

[dpdk-dev] [PATCH] vhost: fix async packed ring batch datapath

2021-07-08 Thread Cheng Jiang
processed by the DMA device. This patch refactors the batch copy code and adds used ring buffer wrap check as a batch copy condition to fix this issue. Fixes: 873e8dad6f49 ("vhost: support packed ring in async datapath") Cc: sta...@dpdk.org Signed-off-by: Cheng Jiang --- lib/vhost/virtio_n

[dpdk-dev] [PATCH] net/virtio: fix refill order in packed ring datapath

2021-07-08 Thread Cheng Jiang
. Fixes: a76290c8f1cf ("net/virtio: implement Rx path for packed queues") Cc: sta...@dpdk.org Signed-off-by: Cheng Jiang Signed-off-by: Marvin Liu diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c index 3ac847317f..d35875d9ce 100644 --- a/drivers/

[dpdk-dev] [PATCH v2 3/3] vhost: handle memory hotplug for async vhost

2021-06-15 Thread Cheng Jiang
From: Jiayu Hu When the guest memory is hotplugged, the vhost application which enables DMA acceleration must stop DMA transfers before the vhost re-maps the guest memory. This patch is to notify the vhost application of stopping DMA transfers. Signed-off-by: Jiayu Hu --- lib/vhost/vhost_user

[dpdk-dev] [PATCH v2 2/3] examples/vhost: handle memory hotplug for async vhost

2021-06-15 Thread Cheng Jiang
. add inflight pkt drain process in destroy_device() and vring_state_changed(). Signed-off-by: Cheng Jiang --- examples/vhost/main.c | 48 +-- examples/vhost/main.h | 1 + 2 files changed, 47 insertions(+), 2 deletions(-) diff --git a/examples/vhost/main.c b

[dpdk-dev] [PATCH v2 1/3] vhost: add unsafe API to drain pkts in async vhost

2021-06-15 Thread Cheng Jiang
Applications need to stop DMA transfers and finish all the in-flight pkts when in VM memory hot-plug case and async vhost is used. This patch is to provide an unsafe API to drain in-flight pkts which are submitted to DMA engine in vhost async data path. Signed-off-by: Cheng Jiang --- lib/vhost

[dpdk-dev] [PATCH v2 0/3] vhost: handle memory hotplug for async vhost

2021-06-15 Thread Cheng Jiang
the vhost application of stopping DMA transfers. And enable it in vhost example. v2: * changed the patch structure Cheng Jiang (2): vhost: add unsafe API to drain pkts in async vhost examples/vhost: handle memory hotplug for async vhost Jiayu Hu (1): vhost: handle memory hotplug for async

[dpdk-dev] [PATCH 2/2] vhost: handle memory hotplug for async vhost

2021-06-01 Thread Cheng Jiang
From: Jiayu Hu When the guest memory is hotplugged, the vhost application which enables DMA acceleration must stop DMA transfers before the vhost re-maps the guest memory. This patch is to notify the vhost application of stopping DMA transfers. Signed-off-by: Jiayu Hu --- lib/vhost/vhost_user

[dpdk-dev] [PATCH 0/2] vhost: handle memory hotplug for async vhost

2021-06-01 Thread Cheng Jiang
the vhost application of stopping DMA transfers. Cheng Jiang (1): vhost: add unsafe API to drain pkts in async vhost Jiayu Hu (1): vhost: handle memory hotplug for async vhost examples/vhost/main.c | 48 +++- examples/vhost/main.h | 1 + lib/vhost/rte_vhost_async.h

[dpdk-dev] [PATCH 1/2] vhost: add unsafe API to drain pkts in async vhost

2021-06-01 Thread Cheng Jiang
-by: Cheng Jiang --- examples/vhost/main.c | 48 +++- examples/vhost/main.h | 1 + lib/vhost/rte_vhost_async.h | 22 + lib/vhost/version.map | 3 ++ lib/vhost/virtio_net.c | 90 +++-- 5 files changed, 139 insertions

[dpdk-dev] [PATCH] vhost: fix unintended sign extension in async split ring

2021-05-11 Thread Cheng Jiang
Change the variable type in store_dma_desc_info_split() to fix suspicious implicit sign extension. Coverity issue: 370604, 370607, 370609 Fixes: 3d6cb86b0de5 (vhost: refactor async split ring functions) Signed-off-by: Cheng Jiang --- lib/vhost/virtio_net.c | 2 +- 1 file changed, 1 insertion

  1   2   3   >