[dpdk-dev] [PATCH v1] vhost: fix gpa to hpa conversion

2020-10-26 Thread Patrick Fu
gpa_to_first_hpa() to avoid code redundancy. Fixes: e246896178e6 ("vhost: get guest/host physical address mappings") Fixes: faa9867c4da2 ("vhost: use binary search in address conversion") Signed-off-by: Patrick Fu --- lib/librte_vhost/vhost.h | 43 ++--

[dpdk-dev] [PATCH v1] vhost: fix guest/host physical address conversion

2020-10-26 Thread Patrick Fu
gpa_to_first_hpa() to avoid code redundancy. Fixes: e246896178e6 ("vhost: get guest/host physical address mappings") Fixes: faa9867c4da2 ("vhost: use binary search in address conversion") Signed-off-by: Patrick Fu --- v2: - minor rewordings on commit message & title

[dpdk-dev] [PATCH v1] vhost: fix uninitialized local variable

2020-10-27 Thread Patrick Fu
This patch initializes a local parameter in async data path to avoid compiler warnings. Fixes: cd6760da1076 ("vhost: introduce async enqueue for split ring") Signed-off-by: Patrick Fu --- lib/librte_vhost/virtio_net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -

[dpdk-dev] [PATCH v1] vhost: fix async inflight packet counter

2020-11-02 Thread Patrick Fu
Async inflight packet counter should take failed packets into account. Failed packets will be deducted in the error handling logic. Fixes: 6b3c81db8bb7 ("vhost: simplify async copy completion") Fixes: cd6760da1076 ("vhost: introduce async enqueue for split ring") Signe

[dpdk-dev] [PATCH v3 1/2] vhost: introduce async enqueue registration API

2020-07-03 Thread patrick . fu
From: Patrick Fu This patch introduces registration/un-registration APIs for vhost async data enqueue operation. Together with the registration APIs implementations, data structures and async callback functions required for async enqueue data path are also defined. Signed-off-by: Patrick Fu

[dpdk-dev] [PATCH v3 0/2] introduce asynchronous data path for vhost

2020-07-03 Thread patrick . fu
From: Patrick Fu Performing large memory copies usually takes up a major part of CPU cycles and becomes the hot spot in vhost-user enqueue operation. To offload expensive memory operations from the CPU, this patch set proposes to leverage DMA engines, e.g., I/OAT, a DMA engine in the Intel&#

[dpdk-dev] [PATCH v3 2/2] vhost: introduce async enqueue for split ring

2020-07-03 Thread patrick . fu
From: Patrick Fu This patch implements async enqueue data path for split ring. 2 new async data path APIs are defined, by which applications can submit and poll packets to/from async engines. The async enqueue data leverages callback functions registered by applications to work with the async

[dpdk-dev] [PATCH v4 0/2] introduce asynchronous data path for vhost

2020-07-03 Thread patrick . fu
From: Patrick Fu Performing large memory copies usually takes up a major part of CPU cycles and becomes the hot spot in vhost-user enqueue operation. To offload expensive memory operations from the CPU, this patch set proposes to leverage DMA engines, e.g., I/OAT, a DMA engine in the Intel&#

[dpdk-dev] [PATCH v4 2/2] vhost: introduce async enqueue for split ring

2020-07-03 Thread patrick . fu
From: Patrick Fu This patch implements async enqueue data path for split ring. 2 new async data path APIs are defined, by which applications can submit and poll packets to/from async engines. The async enqueue data leverages callback functions registered by applications to work with the async

[dpdk-dev] [PATCH v4 1/2] vhost: introduce async enqueue registration API

2020-07-03 Thread patrick . fu
From: Patrick Fu This patch introduces registration/un-registration APIs for vhost async data enqueue operation. Together with the registration APIs implementations, data structures and async callback functions required for async enqueue data path are also defined. Signed-off-by: Patrick Fu

[dpdk-dev] [PATCH v5 0/2] introduce asynchronous data path for vhost

2020-07-06 Thread patrick . fu
From: Patrick Fu Performing large memory copies usually takes up a major part of CPU cycles and becomes the hot spot in vhost-user enqueue operation. To offload expensive memory operations from the CPU, this patch set proposes to leverage DMA engines, e.g., I/OAT, a DMA engine in the Intel&#

[dpdk-dev] [PATCH v5 1/2] vhost: introduce async enqueue registration API

2020-07-06 Thread patrick . fu
From: Patrick Fu This patch introduces registration/un-registration APIs for vhost async data enqueue operation. Together with the registration APIs implementations, data structures and async callback functions required for async enqueue data path are also defined. Signed-off-by: Patrick Fu

[dpdk-dev] [PATCH v5 2/2] vhost: introduce async enqueue for split ring

2020-07-06 Thread patrick . fu
From: Patrick Fu This patch implements async enqueue data path for split ring. 2 new async data path APIs are defined, by which applications can submit and poll packets to/from async engines. The async enqueue data leverages callback functions registered by applications to work with the async

[dpdk-dev] [PATCH v6 0/2] introduce asynchronous data path for vhost

2020-07-06 Thread patrick . fu
From: Patrick Fu Performing large memory copies usually takes up a major part of CPU cycles and becomes the hot spot in vhost-user enqueue operation. To offload expensive memory operations from the CPU, this patch set proposes to leverage DMA engines, e.g., I/OAT, a DMA engine in the Intel&#

[dpdk-dev] [PATCH v6 1/2] vhost: introduce async enqueue registration API

2020-07-06 Thread patrick . fu
From: Patrick Fu Performing large memory copies usually takes up a major part of CPU cycles and becomes the hot spot in vhost-user enqueue operation. To offload the large copies from CPU to the DMA devices, asynchronous APIs are introduced, with which the CPU just submits copy jobs to the DMA

[dpdk-dev] [PATCH v6 2/2] vhost: introduce async enqueue for split ring

2020-07-06 Thread patrick . fu
From: Patrick Fu This patch implements async enqueue data path for split ring. 2 new async data path APIs are defined, by which applications can submit and poll packets to/from async engines. The async engine is either a physical DMA device or it could also be a software emulated backend. The

[dpdk-dev] [PATCH v1 1/2] vhost: introduce async data path registration API

2020-06-11 Thread patrick . fu
From: Patrick This patch introduces registration/un-registration APIs for async data path together with all required data structures and DMA callback function proto-types. Signed-off-by: Patrick --- lib/librte_vhost/Makefile | 3 +- lib/librte_vhost/rte_vhost.h | 1 + lib/li

[dpdk-dev] [PATCH v1 2/2] vhost: introduce async enqueue for split ring

2020-06-11 Thread patrick . fu
From: Patrick This patch implement async enqueue data path for split ring. Signed-off-by: Patrick --- lib/librte_vhost/rte_vhost_async.h | 38 +++ lib/librte_vhost/virtio_net.c | 538 - 2 files changed, 574 insertions(+), 2 deletions(-) diff --git a/l

[dpdk-dev] [PATCH v1 0/2] introduce asynchronous data path for vhost

2020-06-11 Thread patrick . fu
From: Patrick Fu Performing large memory copies usually takes up a major part of CPU cycles and becomes the hot spot in vhost-user enqueue operation. To offload expensive memory operations from the CPU, this patch set proposes to leverage DMA engines, e.g., I/OAT, a DMA engine in the Intel&#

[dpdk-dev] [PATCH v2 0/2] introduce asynchronous data path for vhost

2020-06-29 Thread patrick . fu
From: Patrick Fu Performing large memory copies usually takes up a major part of CPU cycles and becomes the hot spot in vhost-user enqueue operation. To offload expensive memory operations from the CPU, this patch set proposes to leverage DMA engines, e.g., I/OAT, a DMA engine in the Intel&#

[dpdk-dev] [PATCH v2 1/2] vhost: introduce async enqueue registration API

2020-06-29 Thread patrick . fu
From: Patrick Fu This patch introduces registration/un-registration APIs for vhost async data enqueue operation. Together with the registration APIs implementations, data structures and async callback functions required for async enqueue data path are also defined. Signed-off-by: Patrick Fu

[dpdk-dev] [PATCH v2 2/2] vhost: introduce async enqueue for split ring

2020-06-29 Thread patrick . fu
From: Patrick Fu This patch implements async enqueue data path for split ring. 2 new async data path APIs are defined, by which applications can submit and poll packets to/from async engines. The async enqueue data leverages callback functions registered by applications to work with the async

[dpdk-dev] [PATCH v1] vhost: remove fallback in async enqueue API

2020-10-20 Thread Patrick Fu
By design, async enqueue API should return directly if async device is not registered. This patch removes the corrupted implementation of the enqueue fallback from async mode to sync mode. Fixes: cd6760da1076 ("vhost: introduce async enqueue for split ring") Signed-off-by: Patrick Fu

[dpdk-dev] [PATCH v1] vhost: fix missing null dev pointer check

2020-07-13 Thread patrick . fu
From: Patrick Fu This patch adds the check of dev pointer in vhost async enqueue completion poll. If a NULL dev pointer detected, the poll function returns immediately. Coverity issue: 360839 Fixes: cd6760da10 ("vhost: introduce async enqueue for split ring") Signed-off-by:

[dpdk-dev] [PATCH v1] vhost: set zmbufs to NULL when freed

2020-07-15 Thread patrick . fu
From: Patrick Fu zmbufs should be set to NULL when getting freed to avoid double free on the same buffer pointer Fixes: b0a985d1f340 ("vhost: add dequeue zero copy") Signed-off-by: Patrick Fu --- lib/librte_vhost/vhost_user.c | 1 + 1 file changed, 1 insertion(+) diff -

[dpdk-dev] [PATCH v1] vhost: support async copy free segmentations

2020-07-15 Thread patrick . fu
From: Patrick Fu Vhost async enqueue assumes that all async copies should break at packet boundary. i.e. if a packet is splited into multiple copy segments, the async engine should always report copy completion when entire packet is finished. This patch removes the assumption. Fixes

[dpdk-dev] [PATCH v2] vhost: support async copy free segmentations

2020-07-15 Thread patrick . fu
From: Patrick Fu Vhost async enqueue assumes that all async copies should break at packet boundary. i.e. if a packet is splited into multiple copy segments, the async engine should always report copy completion when entire packet is finished. This patch removes the assumption. Fixes

[dpdk-dev] [PATCH v1] vhost: add vq status check in async enqueue poll

2020-07-16 Thread patrick . fu
From: Patrick Fu Vring should not be touched if vq is disabled. This patch adds the vq status check in async enqueue polling to avoid accessing to a disabled queue. Fixes: cd6760da1076 ("vhost: introduce async enqueue for split ring") Signed-off-by: Patrick Fu --- lib/li

[dpdk-dev] [PATCH v2] vhost: fix missing null dev pointer check

2020-07-16 Thread patrick . fu
From: Patrick Fu This patch adds the check of dev pointer in vhost async enqueue completion poll. If a NULL dev pointer detected, the poll function returns immediately. Coverity issue: 360839 Fixes: cd6760da1076 ("vhost: introduce async enqueue for split ring") Signed-off-by:

[dpdk-dev] [PATCH v1] vhost: support cross page buf in async data path

2020-07-19 Thread patrick . fu
From: Patrick Fu Async copy fails when ring buffer cross two physical pages. This patch fix the failure by letting copies occur in sync mode if crossing page buffers are given. Fixes: cd6760da1076 ("vhost: introduce async enqueue for split ring") Signed-off-by: Patrick Fu

[dpdk-dev] [PATCH v2] vhost: fix double-free with zero-copy

2020-07-20 Thread patrick . fu
From: Patrick Fu zmbufs should be set to NULL when getting freed to avoid double free on the same buffer pointer Fixes: b0a985d1f340 ("vhost: add dequeue zero copy") Signed-off-by: Patrick Fu --- v2: - revise commit message title lib/librte_vhost/vhost_user.c | 1 + 1 file

[dpdk-dev] [PATCH v3] vhost: fix missing device pointer validity check

2020-07-20 Thread patrick . fu
From: Patrick Fu This patch adds the check of dev pointer in vhost async enqueue completion poll. If a NULL dev pointer detected, the poll function returns immediately. Coverity issue: 360839 Fixes: cd6760da1076 ("vhost: introduce async enqueue for split ring") Signed-off-by:

[dpdk-dev] [PATCH v2] vhost: fix missing virtqueue status check in async path

2020-07-20 Thread patrick . fu
From: Patrick Fu Vring should not be touched if vq is disabled. This patch adds the vq status check in async enqueue polling to avoid accessing to a disabled queue. Fixes: cd6760da1076 ("vhost: introduce async enqueue for split ring") Signed-off-by: Patrick Fu --- v2: revise co

[dpdk-dev] [PATCH v3] vhost: fix wrong async completion of multi-seg packets

2020-07-20 Thread patrick . fu
From: Patrick Fu In async enqueue copy, a packet could be split into multiple copy segments. When polling the copy completion status, current async data path assumes the async device callbacks are aware of the packet boundary and return completed segments only if all segments belonging to the

[dpdk-dev] [PATCH v1 0/2] update docs for vhost async API

2020-07-22 Thread patrick . fu
From: Patrick Fu update documentations for vhost async API Patrick Fu (2): doc: update guides for vhost async APIs doc: update release notes for vhost async APIs doc/guides/prog_guide/vhost_lib.rst| 86 +++--- doc/guides/rel_notes/release_20_08.rst | 5 ++ 2 files

[dpdk-dev] [PATCH v1 1/2] doc: update guides for vhost async APIs

2020-07-22 Thread patrick . fu
From: Patrick Fu Update vhost guides to document vhost async APIs Signed-off-by: Patrick Fu --- doc/guides/prog_guide/vhost_lib.rst | 86 ++--- 1 file changed, 77 insertions(+), 9 deletions(-) diff --git a/doc/guides/prog_guide/vhost_lib.rst b/doc/guides/prog_guide

[dpdk-dev] [PATCH v1 2/2] doc: update release notes for vhost async APIs

2020-07-22 Thread patrick . fu
From: Patrick Fu Update 20.08 release notes to include vhost async APIs Signed-off-by: Patrick Fu --- doc/guides/rel_notes/release_20_08.rst | 5 + 1 file changed, 5 insertions(+) diff --git a/doc/guides/rel_notes/release_20_08.rst b/doc/guides/rel_notes/release_20_08.rst index

[dpdk-dev] [PATCH v2 0/2] update docs for vhost async APIs

2020-07-22 Thread patrick . fu
From: Patrick Fu update docs for vhost async APIs v2: - fix typos in vhost_lib.rst - minor rewording in vhost_lib.rst - add more detailed API notes in release notes - rebase the patch to 20.08 rc2 Patrick Fu (2): doc: update guides for vhost async APIs doc: update release notes for

[dpdk-dev] [PATCH v2 2/2] doc: update release notes for vhost async APIs

2020-07-22 Thread patrick . fu
From: Patrick Fu Update 20.08 release notes to include vhost async APIs Signed-off-by: Patrick Fu --- doc/guides/rel_notes/release_20_08.rst | 6 ++ 1 file changed, 6 insertions(+) diff --git a/doc/guides/rel_notes/release_20_08.rst b/doc/guides/rel_notes/release_20_08.rst index

[dpdk-dev] [PATCH v2 1/2] doc: update guides for vhost async APIs

2020-07-22 Thread patrick . fu
From: Patrick Fu Update vhost guides to document vhost async APIs Signed-off-by: Patrick Fu --- doc/guides/prog_guide/vhost_lib.rst | 86 ++--- 1 file changed, 77 insertions(+), 9 deletions(-) diff --git a/doc/guides/prog_guide/vhost_lib.rst b/doc/guides/prog_guide

[dpdk-dev] [PATCH v1] vhost: fix vring disable fail in async transfer

2020-07-22 Thread patrick . fu
From: Patrick Fu Async inflight packets is checked when front end virtio requests to disable vring. If inflight packets exists, vring disabling will fail. However, there is no good way for application to get notified before vring is disabled and properly complete inflight packets. This patch

[dpdk-dev] [PATCH v1] vhost: fix async callback return type define

2020-07-22 Thread patrick . fu
From: Patrick Fu The async copy device callbacks are used by async APIs to transfer data and check completion status. Async APIs return the number of packets successfully processed to the caller applications and no error (negative) value is allowed for API return value. Thus, negative return

[dpdk-dev] [PATCH v2] vhost: fix async copy fail on multi-page buffers

2020-07-24 Thread patrick . fu
From: Patrick Fu Async copy fails when single ring buffer vector is splited on multiple physical pages. This happens because current hpa address translation function doesn't handle multi-page buffers. A new gpa to hpa address conversion function, which returns the hpa on the first hitting

[dpdk-dev] [PATCH v3] vhost: fix async copy fail on multi-page buffers

2020-07-26 Thread patrick . fu
From: Patrick Fu Async copy fails when single ring buffer vector is splited on multiple physical pages. This happens because current hpa address translation function doesn't handle multi-page buffers. A new gpa to hpa address conversion function, which returns the hpa on the first hitting

[dpdk-dev] [PATCH v4] vhost: fix async copy fail on multi-page buffers

2020-07-27 Thread patrick . fu
From: Patrick Fu Async copy fails when single ring buffer vector is splited on multiple physical pages. This happens because current hpa address translation function doesn't handle multi-page buffers. A new gpa to hpa address conversion function, which returns the hpa on the first hitting

[dpdk-dev] [PATCH v5] vhost: fix async copy fail on multi-page buffers

2020-07-28 Thread Patrick Fu
s, is implemented in this patch. Async data path recursively calls this new function to construct a multi-segments async copy descriptor for ring buffers crossing physical page boundaries. Fixes: cd6760da1076 ("vhost: introduce async enqueue for split ring") Signed-off-by: Patrick Fu --- v2:

[dpdk-dev] [RFC] lib: introduce traffic mirroring API

2020-07-29 Thread Patrick Fu
the mirroring APIs as a standalone library in DPDK, but it's also reasonble to place it inside ethdev layer or within the vhost-pmd considering the potential usage scenarios. Signed-off-by: Liang-min Wang Signed-off-by: Patrick Fu Signed-off-by: Timothy Miskell

[dpdk-dev] [PATCH v2 0/4] optimize async data path

2020-09-28 Thread Patrick Fu
improve readability Patrick Fu (4): vhost: simplify async copy completion vhost: dynamically allocate async memory vhost: fix async vector buffer overrun vhost: fix async register/unregister deadlock lib/librte_vhost/rte_vhost_async.h | 15 ++- lib/librte_vhost/vhost.c | 80

[dpdk-dev] [PATCH v2 1/4] vhost: simplify async copy completion

2020-09-28 Thread Patrick Fu
work with new ops define, which provides a clean and simplified processing. Signed-off-by: Patrick Fu --- lib/librte_vhost/rte_vhost_async.h | 15 ++- lib/librte_vhost/vhost.c | 20 ++-- lib/librte_vhost/vhost.h | 8 +- lib/librte_vhost/vhost_user.c | 6 +- lib

[dpdk-dev] [PATCH v2 2/4] vhost: dynamically allocate async memory

2020-09-28 Thread Patrick Fu
Allocate async internal memory buffer by rte_malloc(), replacing array declaration inside vq structure. Dynamic allocation can help to save memory footprint when async path is not registered. Signed-off-by: Patrick Fu --- lib/librte_vhost/vhost.c | 65

[dpdk-dev] [PATCH v2 3/4] vhost: fix async vector buffer overrun

2020-09-28 Thread Patrick Fu
nc enqueue registration API") Signed-off-by: Patrick Fu --- lib/librte_vhost/vhost.h | 2 +- lib/librte_vhost/virtio_net.c | 13 - 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/lib/librte_vhost/vhost.h b/lib/librte_vhost/vhost.h index f0ee00c73..34197ce99 1

[dpdk-dev] [PATCH v2 4/4] vhost: fix async register/unregister deadlock

2020-09-28 Thread Patrick Fu
: 78639d54563a ("vhost: introduce async enqueue registration API") Signed-off-by: Patrick Fu --- lib/librte_vhost/vhost.c | 13 +++-- lib/librte_vhost/vhost_user.c | 4 ++-- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/lib/librte_vhost/vhost.c b/lib/li

[dpdk-dev] [PATCH v3 0/4] optimize async data path

2020-09-29 Thread Patrick Fu
calculation issue - allocate async buffer memory on the same numa with vq - add some comments in data path to improve readability Patrick Fu (4): vhost: simplify async copy completion vhost: dynamically allocate async memory vhost: fix async vector buffer overrun vhost: fix async register

[dpdk-dev] [PATCH v3 1/4] vhost: simplify async copy completion

2020-09-29 Thread Patrick Fu
work with new ops define, which provides a clean and simplified processing. Signed-off-by: Patrick Fu --- lib/librte_vhost/rte_vhost_async.h | 15 ++- lib/librte_vhost/vhost.c | 20 ++-- lib/librte_vhost/vhost.h | 8 +- lib/librte_vhost/vhost_user.c | 6 +- lib

[dpdk-dev] [PATCH v3 2/4] vhost: dynamically allocate async memory

2020-09-29 Thread Patrick Fu
Allocate async internal memory buffer by rte_malloc(), replacing array declaration inside vq structure. Dynamic allocation can help to save memory footprint when async path is not registered. Signed-off-by: Patrick Fu --- lib/librte_vhost/vhost.c | 69

[dpdk-dev] [PATCH v3 3/4] vhost: fix async vector buffer overrun

2020-09-29 Thread Patrick Fu
nc enqueue registration API") Signed-off-by: Patrick Fu --- lib/librte_vhost/vhost.h | 2 +- lib/librte_vhost/virtio_net.c | 13 - 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/lib/librte_vhost/vhost.h b/lib/librte_vhost/vhost.h index f0ee00c73..34197ce99 1

[dpdk-dev] [PATCH v3 4/4] vhost: fix async register/unregister deadlock

2020-09-29 Thread Patrick Fu
: 78639d54563a ("vhost: introduce async enqueue registration API") Signed-off-by: Patrick Fu --- lib/librte_vhost/vhost.c | 13 +++-- lib/librte_vhost/vhost_user.c | 4 ++-- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/lib/librte_vhost/vhost.c b/lib/li

[dpdk-dev] [PATCH v4 0/4] optimize async data path

2020-10-12 Thread Patrick Fu
ning) - fix travis-robot ci build warning on aarch64 v2: - minor rewordings on commit message - minor fix on poll_enenque_completion to correct a packet number calculation issue - allocate async buffer memory on the same numa with vq - add some comments in data path to improve readability Patric

[dpdk-dev] [PATCH v4 3/4] vhost: fix async vector buffer overrun

2020-10-12 Thread Patrick Fu
nc enqueue registration API") Signed-off-by: Patrick Fu --- lib/librte_vhost/vhost.h | 2 +- lib/librte_vhost/virtio_net.c | 13 - 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/lib/librte_vhost/vhost.h b/lib/librte_vhost/vhost.h index 7d1a8d2b7..75d79f80a 1

[dpdk-dev] [PATCH v4 1/4] vhost: simplify async copy completion

2020-10-12 Thread Patrick Fu
work with new ops define, which provides a clean and simplified processing. Signed-off-by: Patrick Fu --- lib/librte_vhost/rte_vhost_async.h | 15 ++- lib/librte_vhost/vhost.c | 20 ++-- lib/librte_vhost/vhost.h | 8 +- lib/librte_vhost/vhost_user.c | 6 +- lib

[dpdk-dev] [PATCH v4 2/4] vhost: dynamically allocate async memory

2020-10-12 Thread Patrick Fu
Allocate async internal memory buffer by rte_malloc(), replacing array declaration inside vq structure. Dynamic allocation can help to save memory footprint when async path is not registered. Signed-off-by: Patrick Fu --- lib/librte_vhost/vhost.c | 69

[dpdk-dev] [PATCH v4 4/4] vhost: fix async unregister deadlock

2020-10-12 Thread Patrick Fu
queue registration API") Signed-off-by: Patrick Fu --- lib/librte_vhost/vhost.c | 9 +++-- lib/librte_vhost/vhost_user.c | 4 ++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/lib/librte_vhost/vhost.c b/lib/librte_vhost/vhost.c index 323565898..6068c38ec 100644 --- a/lib/li

[dpdk-dev] [PATCH v1 0/3] lib: introduce traffic mirroring lib

2020-09-08 Thread Patrick Fu
mirroring APIs as a standalone library in DPDK, but it's also reasonble to place it inside ethdev layer or within the vhost-pmd considering the potential usage scenarios. Patrick Fu (3): lib/mirror: introduce traffic mirror API lib/mirror: add port based mirroring lib/mirror: add flow

[dpdk-dev] [PATCH v1 1/3] lib/mirror: introduce traffic mirror API

2020-09-08 Thread Patrick Fu
when registration succeeds. Signed-off-by: Liang-min Wang Signed-off-by: Patrick Fu Signed-off-by: Timothy Miskell --- config/common_base | 5 + lib/Makefile | 2 + lib/librte_mirror/Makefile | 20 ++ lib/librte_mirror

[dpdk-dev] [PATCH v1 3/3] lib/mirror: add flow based mirroring

2020-09-08 Thread Patrick Fu
-off-by: Patrick Fu Signed-off-by: Timothy Miskell --- lib/librte_mirror/rte_mirror.c | 107 + 1 file changed, 107 insertions(+) diff --git a/lib/librte_mirror/rte_mirror.c b/lib/librte_mirror/rte_mirror.c index d2c0d8eab..523ab37ff 100644 --- a/lib/librte_mirror

[dpdk-dev] [PATCH v1 2/3] lib/mirror: add port based mirroring

2020-09-08 Thread Patrick Fu
This patch add port based mirroring support for the mirror lib. The port based mirroring is unconditional traffic mirroring between 2 ethdev ports. Signed-off-by: Liang-min Wang Signed-off-by: Patrick Fu Signed-off-by: Timothy Miskell --- lib/librte_mirror/rte_mirror.c | 57

[dpdk-dev] [PATCH v1 0/4] optimize async data path

2020-09-10 Thread Patrick Fu
This series applies optimization and fixes to the vhost async data path. Patrick Fu (4): vhost: simplify async copy completion vhost: dynamically alloc async memory vhost: fix async vec buf overrun vhost: fix async register/unregister deadlock lib/librte_vhost/rte_vhost_async.h | 15

[dpdk-dev] [PATCH v1 1/4] vhost: simplify async copy completion

2020-09-10 Thread Patrick Fu
work with new ops define, which provides a clean and simplified processing. Signed-off-by: Patrick Fu --- lib/librte_vhost/rte_vhost_async.h | 15 ++- lib/librte_vhost/vhost.c | 20 ++-- lib/librte_vhost/vhost.h | 8 +- lib/librte_vhost/vhost_user.c | 6 +- lib

[dpdk-dev] [PATCH v1 2/4] vhost: dynamically alloc async memory

2020-09-10 Thread Patrick Fu
alloc async internal memory buffer by rte_malloc(), replacing array declaration inside vq structure. Dynamic allocation can help to save memory footprint when async path is not registered. Signed-off-by: Patrick Fu --- lib/librte_vhost/vhost.c | 49 lib

[dpdk-dev] [PATCH v1 3/4] vhost: fix async vec buf overrun

2020-09-10 Thread Patrick Fu
Signed-off-by: Patrick Fu --- lib/librte_vhost/vhost.h | 2 +- lib/librte_vhost/virtio_net.c | 7 ++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/librte_vhost/vhost.h b/lib/librte_vhost/vhost.h index 0af0ac23d..5e669e28f 100644 --- a/lib/librte_vhost/vhost.h +++ b/l

[dpdk-dev] [PATCH v1 4/4] vhost: fix async register/unregister deadlock

2020-09-10 Thread Patrick Fu
: 78639d54563a ("vhost: introduce async enqueue registration API") Signed-off-by: Patrick Fu --- lib/librte_vhost/vhost.c | 13 +++-- lib/librte_vhost/vhost_user.c | 4 ++-- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/lib/librte_vhost/vhost.c b/lib/li