[PATCH v5 0/2] vhost: introduce DMA vchannel unconfiguration

2022-10-13 Thread xuan . ding
From: Xuan Ding This patchset introduces a new API rte_vhost_async_dma_unconfigure() to help user to manually free DMA vchannels finished to use. Note: this API should be called after async channel unregister. v5: * Use mutex instead of spinlock. * Improve code readability. v4: * Rebase to

[PATCH v5 1/2] vhost: introduce DMA vchannel unconfiguration

2022-10-13 Thread xuan . ding
From: Xuan Ding Add a new API rte_vhost_async_dma_unconfigure() to unconfigure DMA vchannels in vhost async data path. Lock protection are also added to protect DMA vchannels configuration and unconfiguration from concurrent calls. Signed-off-by: Xuan Ding --- doc/guides/prog_guide

[PATCH v5 2/2] examples/vhost: unconfigure DMA vchannel

2022-10-13 Thread xuan . ding
From: Xuan Ding This patch applies rte_vhost_async_dma_unconfigure() to manually free DMA vchannels. Before unconfiguration, make sure the specified DMA device is no longer used by any vhost ports. Signed-off-by: Xuan Ding --- examples/vhost/main.c | 40

[PATCH v6 0/2] vhost: introduce DMA vchannel unconfiguration

2022-10-18 Thread xuan . ding
From: Xuan Ding This patchset introduces a new API rte_vhost_async_dma_unconfigure() to help user to manually free DMA vchannels finished to use. v6: * Move DMA unconfiguration to the end due to DMA devices maybe reused after destroy_device(). * Refine the doc to claim the DMA device should

[PATCH v6 1/2] vhost: introduce DMA vchannel unconfiguration

2022-10-18 Thread xuan . ding
From: Xuan Ding Add a new API rte_vhost_async_dma_unconfigure() to unconfigure DMA vchannels in vhost async data path. Lock protection are also added to protect DMA vchannels configuration and unconfiguration from concurrent calls. Signed-off-by: Xuan Ding --- doc/guides/prog_guide

[PATCH v6 2/2] examples/vhost: unconfigure DMA vchannel

2022-10-18 Thread xuan . ding
From: Xuan Ding This patch applies rte_vhost_async_dma_unconfigure() to manually free DMA vchannels. Before unconfiguration, make sure the specified DMA device is no longer used by any vhost ports. Signed-off-by: Xuan Ding --- examples/vhost/main.c | 8 1 file changed, 8 insertions

[PATCH v7 0/2] vhost: introduce DMA vchannel unconfiguration

2022-10-20 Thread xuan . ding
From: Xuan Ding This patchset introduces a new API rte_vhost_async_dma_unconfigure() to help user to manually free DMA vchannels finished to use. v7: * Add inflight packets processing. * Fix CI error. v6: * Move DMA unconfiguration to the end due to DMA devices maybe reused after

[PATCH v7 1/2] vhost: introduce DMA vchannel unconfiguration

2022-10-20 Thread xuan . ding
From: Xuan Ding Add a new API rte_vhost_async_dma_unconfigure() to unconfigure DMA vchannels in vhost async data path. Lock protection are also added to protect DMA vchannels configuration and unconfiguration from concurrent calls. Signed-off-by: Xuan Ding --- doc/guides/prog_guide

[PATCH v7 2/2] examples/vhost: unconfigure DMA vchannel

2022-10-20 Thread xuan . ding
From: Xuan Ding This patch applies rte_vhost_async_dma_unconfigure() to manually free DMA vchannels. Before unconfiguration, make sure the specified DMA device is no longer used by any vhost ports. Signed-off-by: Xuan Ding --- examples/vhost/main.c | 8 1 file changed, 8 insertions

[PATCH v8 1/2] vhost: introduce DMA vchannel unconfiguration

2022-10-25 Thread xuan . ding
From: Xuan Ding Add a new API rte_vhost_async_dma_unconfigure() to unconfigure DMA vChannels in vhost async data path. Lock protection are also added to protect DMA vChannel configuration and unconfiguration from concurrent calls. Signed-off-by: Xuan Ding --- doc/guides/prog_guide

[PATCH v8 0/2] vhost: introduce DMA vchannel unconfiguration

2022-10-25 Thread xuan . ding
From: Xuan Ding This patchset introduces a new API rte_vhost_async_dma_unconfigure() to help user to manually free DMA vChannels finished to use. v8: * Check inflight packets release virtual channel. v7: * Add inflight packets processing. * Fix CI error. v6: * Move DMA unconfiguration to the

[PATCH v8 2/2] examples/vhost: unconfigure DMA vchannel

2022-10-25 Thread xuan . ding
From: Xuan Ding This patch applies rte_vhost_async_dma_unconfigure() to manually free DMA vChannels. Before unconfiguration, make sure the specified DMA vChannel is no longer used by any vhost ports. Signed-off-by: Xuan Ding --- examples/vhost/main.c | 8 1 file changed, 8 insertions

[dpdk-dev] [PATCH] net/iavf: fix incomplete rss initiation

2021-04-25 Thread Xuan Ding
.@dpdk.org Signed-off-by: Xuan Ding --- drivers/net/iavf/iavf_ethdev.c | 8 1 file changed, 8 deletions(-) diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c index 97a2dc7d76..c06873d26f 100644 --- a/drivers/net/iavf/iavf_ethdev.c +++ b/drivers/net/iavf/iav

[dpdk-dev] [PATCH v4 0/2] vhost: add IOMMU support in async data path

2021-07-05 Thread Xuan Ding
DMA device. * Changed single patch to patchset, added a new flag parsing in example. v3: * Fixed some typos. v2: * Fixed a format issue. * Added the dma unmap logic when device is closed. Xuan Ding (2): vhost: enable IOMMU for async vhost example/vhost: add dma vfio parsing doc/guides

[dpdk-dev] [PATCH v4 1/2] vhost: enable IOMMU for async vhost

2021-07-05 Thread Xuan Ding
The use of IOMMU has many advantages, such as isolation and address translation. This patch extends the capbility of DMA engine to use IOMMU if the DMA device is bound to vfio. When set memory table, the guest memory will be mapped into the default container of DPDK. Signed-off-by: Xuan Ding

[dpdk-dev] [PATCH v4 2/2] example/vhost: add dma vfio parsing

2021-07-05 Thread Xuan Ding
This patch adds the dma-vfio argument parsing for async vhost driver. This argument can help to determine whether IOMMU needs to be programmed for guest memory. Signed-off-by: Xuan Ding --- doc/guides/sample_app_ug/vhost.rst | 7 +++ examples/vhost/main.c | 16

[dpdk-dev] [PATCH v5 0/2] vhost: add IOMMU support in async data path

2021-07-05 Thread Xuan Ding
that the IOMMU capability is added for DMA * device. * Changed single patch to patchset, added a new flag parsing in example. v3: * Fixed some typos. v2: * Fixed a format issue. * Added the dma unmap logic when device is closed. Xuan Ding (2): vhost: enable IOMMU for async vhost example/vhost

[dpdk-dev] [PATCH v5 1/2] vhost: enable IOMMU for async vhost

2021-07-05 Thread Xuan Ding
The use of IOMMU has many advantages, such as isolation and address translation. This patch extends the capbility of DMA engine to use IOMMU if the DMA device is bound to vfio. When set memory table, the guest memory will be mapped into the default container of DPDK. Signed-off-by: Xuan Ding

[dpdk-dev] [PATCH v5 2/2] example/vhost: add dma vfio parsing

2021-07-05 Thread Xuan Ding
This patch adds the dma-vfio argument parsing for async vhost driver. This argument can help to determine whether IOMMU needs to be programmed for guest memory. Signed-off-by: Xuan Ding --- doc/guides/sample_app_ug/vhost.rst | 7 +++ examples/vhost/main.c | 16

[PATCH] vhost: fix missing statistics update

2022-06-16 Thread xuan . ding
From: Xuan Ding This patch adds missing per-virtqueue statistics in async dequeue path. Fixes: 84d5204310d7("vhost: support async dequeue for split ring") Cc: sta...@dpdk.org Signed-off-by: Xuan Ding --- lib/vhost/virtio_net.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a

[PATCH v2] vhost: fix missing statistics update

2022-06-16 Thread xuan . ding
From: Xuan Ding This patch adds missing per-virtqueue statistics in async dequeue path. Fixes: 84d5204310d7("vhost: support async dequeue for split ring") Signed-off-by: Xuan Ding --- v2: * Since this issue was introduced and fixed in same release, no need to add cc stable. ---

[PATCH] doc: update async enqueue API usage

2022-06-17 Thread xuan . ding
From: Xuan Ding This patch updates the correct usage for async enqueue APIs. The rte_vhost_poll_enqueue_completed() needs to be called in time to avoid packet loss due to full dma ring. Signed-off-by: Xuan Ding --- doc/guides/prog_guide/vhost_lib.rst | 9 + 1 file changed, 9

[PATCH v2] doc: update async enqueue API usage

2022-06-21 Thread xuan . ding
From: Xuan Ding This patch updates the correct usage for async enqueue APIs. The rte_vhost_poll_enqueue_completed() needs to be called in time to notify the guest of completed packets and avoid packet loss. Signed-off-by: Xuan Ding --- v2: * refine doc and commit log --- doc/guides/prog_guide

[PATCH] doc: clean vhost async path doc

2022-06-21 Thread xuan . ding
From: Xuan Ding This patch moves the 'Recommended IOVA mode in async datapath' section under 'Vhost asynchronous data path' as a subsection, which make the doc cleaner. Signed-off-by: Xuan Ding --- doc/guides/prog_guide/vhost_lib.rst | 12 ++-- 1 file changed

[PATCH v2] doc: clean vhost async path doc

2022-06-21 Thread xuan . ding
From: Xuan Ding This patch moves the 'Recommended IOVA mode in async datapath' section under 'Vhost asynchronous data path' as a subsection, which makes the doc cleaner. Signed-off-by: Xuan Ding --- v2: * fix a typo in commit log --- doc/guides/prog_guide/vhost_lib.rst

[PATCH v3] doc: clean vhost async path doc

2022-06-21 Thread xuan . ding
From: Xuan Ding This patch moves the 'Recommended IOVA mode in async datapath' section under 'Vhost asynchronous data path' as a sub-section, which makes the doc cleaner. Signed-off-by: Xuan Ding Reviewed-by: Jiayu Hu --- v3: * add Reviewd-by v2: * fix a typo in commit

[PATCH] vhost: fix sync dequeue offload

2022-06-23 Thread xuan . ding
From: Xuan Ding This patch fixes the missing virtio net header copy in sync dequeue path caused by refactoring, which affects dequeue offloading. Fixes: 6d823bb302c7("vhost: prepare sync for descriptor to mbuf refactoring") Signed-off-by: Xuan Ding --- lib/vhost/virtio_

[PATCH] net/vhost: fix compliant offloading flag

2022-06-28 Thread xuan . ding
From: Xuan Ding This patch fixes the check to set compliant offloading flag. Compliant offloading flag should be set when the 'legacy-ol-flags' is true. Fixes: 3a6ee8dafb21("net/vhost: enable compliant offloading mode") Signed-off-by: Xuan Ding --- drivers/net/vhost/rte_e

[PATCH] vhost: fix unnecessary dirty page logging

2022-07-06 Thread xuan . ding
From: Xuan Ding The dirty page logging is only required in vhost enqueue direction for live migration. This patch removes the unnecessary dirty page logging in vhost dequeue direction. Otherwise, it will result in a performance drop. Some if-else judgements are also optimized to improve

[PATCH 1/2] vhost: fix physical address mapping

2022-01-13 Thread xuan . ding
From: Xuan Ding When choosing IOVA as PA mode, IOVA is likely to be discontinuous, which requires page by page mapping for DMA devices. To be consistent, this patch implements page by page mapping instead of mapping at the region granularity for both IOVA as VA and PA mode. Fixes: 7c61fa08b716

[PATCH 0/2] vhost: fix physical address mapping

2022-01-13 Thread xuan . ding
From: Xuan Ding This patchset fixes the issue of incorrect DMA mapping in PA mode. Due to the ambiguity of host_phys_addr naming in the guest page struct, rename it to host_iova. Xuan Ding (2): vhost: fix physical address mapping vhost: rename field in guest page struct lib/vhost/vhost.h

[PATCH 2/2] vhost: rename field in guest page struct

2022-01-13 Thread xuan . ding
From: Xuan Ding This patch renames the host_phys_addr to host_iova in guest_page struct. The host_phys_addr is iova, it depends on the DPDK IOVA mode. Signed-off-by: Xuan Ding --- lib/vhost/vhost.h | 10 +- lib/vhost/vhost_user.c | 24 lib/vhost

[PATCH v2 0/2] vhost: fix async address mapping

2022-01-18 Thread xuan . ding
From: Xuan Ding This patchset fixes the issue of incorrect DMA mapping in PA mode. Due to the ambiguity of host_phys_addr naming in the guest page struct, rename it to host_iova. v2: * Change the order of patch. Xuan Ding (2): vhost: rename field in guest page struct vhost: fix physical

[PATCH v2 1/2] vhost: rename field in guest page struct

2022-01-18 Thread xuan . ding
From: Xuan Ding This patch renames the host_phys_addr to host_iova in guest_page struct. The host_phys_addr is iova, it depends on the DPDK IOVA mode. Signed-off-by: Xuan Ding --- lib/vhost/vhost.h | 10 +- lib/vhost/vhost_user.c | 20 ++-- lib/vhost/virtio_net.c

[PATCH v2 2/2] vhost: fix physical address mapping

2022-01-18 Thread xuan . ding
From: Xuan Ding When choosing IOVA as PA mode, IOVA is likely to be discontinuous, which requires page by page mapping for DMA devices. To be consistent, this patch implements page by page mapping instead of mapping at the region granularity for both IOVA as VA and PA mode. Fixes: 7c61fa08b716

[dpdk-dev] [PATCH v2] net/virtio: fix indirect descriptors reconnection

2021-10-12 Thread Xuan Ding
Add initialization for packed ring indirect descriptors in reconnection path. Fixes: 381f39ebb78a ("net/virtio: fix packed ring indirect descricptors setup") Cc: sta...@dpdk.org Cc: yong@intel.com Signed-off-by: Xuan Ding Tested-by: Yinan Wang --- v2: * Fix the positi

[PATCH v4 0/5] vhost: support async dequeue data path

2022-05-04 Thread xuan . ding
From: Xuan Ding The presence of asynchronous path allows applications to offload memory copies to DMA engine, so as to save CPU cycles and improve the copy performance. This patch set implements vhost async dequeue data path for split ring. The code is based on latest enqueue changes [1]. This

[PATCH v4 2/5] vhost: prepare async for descriptor to mbuf refactoring

2022-05-04 Thread xuan . ding
From: Xuan Ding This patch refactors vhost async enqueue path and dequeue path to use the same function async_fill_seg() for preparing batch elements, which simplifies the code without performance degradation. Signed-off-by: Xuan Ding Reviewed-by: Maxime Coquelin --- lib/vhost/virtio_net.c

[PATCH v4 1/5] vhost: prepare sync for descriptor to mbuf refactoring

2022-05-04 Thread xuan . ding
From: Xuan Ding This patch extracts the descriptors to buffers filling from copy_desc_to_mbuf() into a dedicated function. Besides, enqueue and dequeue path are refactored to use the same function sync_fill_seg() for preparing batch elements, which simplifies the code without performance

[PATCH v4 3/5] vhost: merge sync and async descriptor to mbuf filling

2022-05-04 Thread xuan . ding
From: Xuan Ding This patch refactors copy_desc_to_mbuf() used by the sync path to support both sync and async descriptor to mbuf filling. Signed-off-by: Xuan Ding Reviewed-by: Maxime Coquelin --- lib/vhost/vhost.h | 1 + lib/vhost/virtio_net.c | 48

[PATCH v4 4/5] vhost: support async dequeue for split ring

2022-05-04 Thread xuan . ding
From: Xuan Ding This patch implements asynchronous dequeue data path for vhost split ring, a new API rte_vhost_async_try_dequeue_burst() is introduced. Signed-off-by: Xuan Ding Signed-off-by: Yuan Wang --- doc/guides/prog_guide/vhost_lib.rst| 7 + doc/guides/rel_notes/release_22_07.rst

[PATCH v4 5/5] examples/vhost: support async dequeue data path

2022-05-04 Thread xuan . ding
From: Xuan Ding This patch adds the use case for async dequeue API. Vswitch can leverage DMA device to accelerate vhost async dequeue path. Signed-off-by: Wenwu Ma Signed-off-by: Yuan Wang Signed-off-by: Xuan Ding --- doc/guides/sample_app_ug/vhost.rst | 9 +- examples/vhost/main.c

[PATCH v4] doc: fix vhost multi-queue reconnection

2022-05-08 Thread xuan . ding
From: Xuan Ding Since QEMU 5.2.0 fixes the vhost split ring multi-queue reconnection issue in commit f66337bdbfda ("vhost-user: save features of multiqueues if chardev is closed"), this patch updates known issue to indicate the range of affeacted QEMU versions. Fixes: b37e95507e1b

[PATCH v5 0/5] vhost: support async dequeue data path

2022-05-12 Thread xuan . ding
From: Xuan Ding The presence of asynchronous path allows applications to offload memory copies to DMA engine, so as to save CPU cycles and improve the copy performance. This patch set implements vhost async dequeue data path for split ring. The code is based on latest enqueue changes [1]. This

[PATCH v5 1/5] vhost: prepare sync for descriptor to mbuf refactoring

2022-05-12 Thread xuan . ding
From: Xuan Ding This patch extracts the descriptors to buffers filling from copy_desc_to_mbuf() into a dedicated function. Besides, enqueue and dequeue path are refactored to use the same function sync_fill_seg() for preparing batch elements, which simplifies the code without performance

[PATCH v5 2/5] vhost: prepare async for descriptor to mbuf refactoring

2022-05-12 Thread xuan . ding
From: Xuan Ding This patch refactors vhost async enqueue path and dequeue path to use the same function async_fill_seg() for preparing batch elements, which simplifies the code without performance degradation. Signed-off-by: Xuan Ding Tested-by: Yvonne Yang Reviewed-by: Maxime Coquelin

[PATCH v5 3/5] vhost: merge sync and async descriptor to mbuf filling

2022-05-12 Thread xuan . ding
From: Xuan Ding This patch refactors copy_desc_to_mbuf() used by the sync path to support both sync and async descriptor to mbuf filling. Signed-off-by: Xuan Ding Tested-by: Yvonne Yang Reviewed-by: Maxime Coquelin --- lib/vhost/vhost.h | 1 + lib/vhost/virtio_net.c | 48

[PATCH v5 4/5] vhost: support async dequeue for split ring

2022-05-12 Thread xuan . ding
From: Xuan Ding This patch implements asynchronous dequeue data path for vhost split ring, a new API rte_vhost_async_try_dequeue_burst() is introduced. Signed-off-by: Xuan Ding Signed-off-by: Yuan Wang Tested-by: Yvonne Yang Reviewed-by: Maxime Coquelin --- doc/guides/prog_guide

[PATCH v5 5/5] examples/vhost: support async dequeue data path

2022-05-12 Thread xuan . ding
From: Xuan Ding This patch adds the use case for async dequeue API. Vswitch can leverage DMA device to accelerate vhost async dequeue path. Signed-off-by: Wenwu Ma Signed-off-by: Yuan Wang Signed-off-by: Xuan Ding Tested-by: Yvonne Yang Reviewed-by: Maxime Coquelin --- doc/guides

[PATCH v6 0/5] vhost: support async dequeue data path

2022-05-12 Thread xuan . ding
From: Xuan Ding The presence of asynchronous path allows applications to offload memory copies to DMA engine, so as to save CPU cycles and improve the copy performance. This patch set implements vhost async dequeue data path for split ring. The code is based on latest enqueue changes [1]. This

[PATCH v6 1/5] vhost: prepare sync for descriptor to mbuf refactoring

2022-05-12 Thread xuan . ding
From: Xuan Ding This patch extracts the descriptors to buffers filling from copy_desc_to_mbuf() into a dedicated function. Besides, enqueue and dequeue path are refactored to use the same function sync_fill_seg() for preparing batch elements, which simplifies the code without performance

[PATCH v6 2/5] vhost: prepare async for descriptor to mbuf refactoring

2022-05-12 Thread xuan . ding
From: Xuan Ding This patch refactors vhost async enqueue path and dequeue path to use the same function async_fill_seg() for preparing batch elements, which simplifies the code without performance degradation. Signed-off-by: Xuan Ding Tested-by: Yvonne Yang Reviewed-by: Maxime Coquelin

[PATCH v6 3/5] vhost: merge sync and async descriptor to mbuf filling

2022-05-12 Thread xuan . ding
From: Xuan Ding This patch refactors copy_desc_to_mbuf() used by the sync path to support both sync and async descriptor to mbuf filling. Signed-off-by: Xuan Ding Tested-by: Yvonne Yang Reviewed-by: Maxime Coquelin --- lib/vhost/vhost.h | 1 + lib/vhost/virtio_net.c | 48

[PATCH v6 4/5] vhost: support async dequeue for split ring

2022-05-12 Thread xuan . ding
From: Xuan Ding This patch implements asynchronous dequeue data path for vhost split ring, a new API rte_vhost_async_try_dequeue_burst() is introduced. Signed-off-by: Xuan Ding Signed-off-by: Yuan Wang Tested-by: Yvonne Yang Reviewed-by: Maxime Coquelin --- doc/guides/prog_guide

[PATCH v6 5/5] examples/vhost: support async dequeue data path

2022-05-12 Thread xuan . ding
From: Xuan Ding This patch adds the use case for async dequeue API. Vswitch can leverage DMA device to accelerate vhost async dequeue path. Signed-off-by: Wenwu Ma Signed-off-by: Yuan Wang Signed-off-by: Xuan Ding Tested-by: Yvonne Yang Reviewed-by: Maxime Coquelin --- doc/guides

[PATCH v7 0/5] vhost: support async dequeue data path

2022-05-15 Thread xuan . ding
From: Xuan Ding The presence of asynchronous path allows applications to offload memory copies to DMA engine, so as to save CPU cycles and improve the copy performance. This patch set implements vhost async dequeue data path for split ring. The code is based on latest enqueue changes [1]. This

[PATCH v7 1/5] vhost: prepare sync for descriptor to mbuf refactoring

2022-05-15 Thread xuan . ding
From: Xuan Ding This patch extracts the descriptors to buffers filling from copy_desc_to_mbuf() into a dedicated function. Besides, enqueue and dequeue path are refactored to use the same function sync_fill_seg() for preparing batch elements, which simplifies the code without performance

[PATCH v7 2/5] vhost: prepare async for descriptor to mbuf refactoring

2022-05-15 Thread xuan . ding
From: Xuan Ding This patch refactors vhost async enqueue path and dequeue path to use the same function async_fill_seg() for preparing batch elements, which simplifies the code without performance degradation. Signed-off-by: Xuan Ding Tested-by: Yvonne Yang Reviewed-by: Maxime Coquelin

[PATCH v7 3/5] vhost: merge sync and async descriptor to mbuf filling

2022-05-15 Thread xuan . ding
From: Xuan Ding This patch refactors copy_desc_to_mbuf() used by the sync path to support both sync and async descriptor to mbuf filling. Signed-off-by: Xuan Ding Tested-by: Yvonne Yang Reviewed-by: Maxime Coquelin --- lib/vhost/vhost.h | 1 + lib/vhost/virtio_net.c | 48

[PATCH v7 4/5] vhost: support async dequeue for split ring

2022-05-15 Thread xuan . ding
From: Xuan Ding This patch implements asynchronous dequeue data path for vhost split ring, a new API rte_vhost_async_try_dequeue_burst() is introduced. Signed-off-by: Xuan Ding Signed-off-by: Yuan Wang Tested-by: Yvonne Yang Reviewed-by: Maxime Coquelin --- doc/guides/prog_guide

[PATCH v7 5/5] examples/vhost: support async dequeue data path

2022-05-15 Thread xuan . ding
From: Xuan Ding This patch adds the use case for async dequeue API. Vswitch can leverage DMA device to accelerate vhost async dequeue path. Signed-off-by: Wenwu Ma Signed-off-by: Yuan Wang Signed-off-by: Xuan Ding Tested-by: Yvonne Yang Reviewed-by: Maxime Coquelin --- doc/guides

[PATCH v8 0/5] vhost: support async dequeue data path

2022-05-16 Thread xuan . ding
From: Xuan Ding The presence of asynchronous path allows applications to offload memory copies to DMA engine, so as to save CPU cycles and improve the copy performance. This patch set implements vhost async dequeue data path for split ring. The code is based on latest enqueue changes [1]. This

[PATCH v8 1/5] vhost: prepare sync for descriptor to mbuf refactoring

2022-05-16 Thread xuan . ding
From: Xuan Ding This patch extracts the descriptors to buffers filling from copy_desc_to_mbuf() into a dedicated function. Besides, enqueue and dequeue path are refactored to use the same function sync_fill_seg() for preparing batch elements, which simplifies the code without performance

[PATCH v8 2/5] vhost: prepare async for descriptor to mbuf refactoring

2022-05-16 Thread xuan . ding
From: Xuan Ding This patch refactors vhost async enqueue path and dequeue path to use the same function async_fill_seg() for preparing batch elements, which simplifies the code without performance degradation. Signed-off-by: Xuan Ding Tested-by: Yvonne Yang Reviewed-by: Maxime Coquelin

[PATCH v8 3/5] vhost: merge sync and async descriptor to mbuf filling

2022-05-16 Thread xuan . ding
From: Xuan Ding This patch refactors copy_desc_to_mbuf() used by the sync path to support both sync and async descriptor to mbuf filling. Signed-off-by: Xuan Ding Tested-by: Yvonne Yang Reviewed-by: Maxime Coquelin --- lib/vhost/vhost.h | 1 + lib/vhost/virtio_net.c | 48

[PATCH v8 4/5] vhost: support async dequeue for split ring

2022-05-16 Thread xuan . ding
From: Xuan Ding This patch implements asynchronous dequeue data path for vhost split ring, a new API rte_vhost_async_try_dequeue_burst() is introduced. Signed-off-by: Xuan Ding Signed-off-by: Yuan Wang Tested-by: Yvonne Yang Reviewed-by: Maxime Coquelin --- doc/guides/prog_guide

[PATCH v8 5/5] examples/vhost: support async dequeue data path

2022-05-16 Thread xuan . ding
From: Xuan Ding This patch adds the use case for async dequeue API. Vswitch can leverage DMA device to accelerate vhost async dequeue path. Signed-off-by: Wenwu Ma Signed-off-by: Yuan Wang Signed-off-by: Xuan Ding Tested-by: Yvonne Yang Reviewed-by: Maxime Coquelin --- doc/guides

[PATCH] doc: announce header split deprecation

2022-05-23 Thread xuan . ding
From: Xuan Ding RTE_ETH_RX_OFFLOAD_HEADER_SPLIT offload was introduced some time ago to substitute bit-field header_split in struct rte_eth_rxmode. It allows to enable header split offload with the header size controlled using split_hdr_size in the same structure. Right now, no single PMD

[PATCH v6] ethdev: introduce protocol header based buffer split

2022-05-27 Thread xuan . ding
k memory and external memory, respectively. Signed-off-by: Xuan Ding Signed-off-by: Yuan Wang Signed-off-by: Wenxuan Wu Reviewed-by: Qi Zhang --- lib/ethdev/rte_ethdev.c | 40 +--- lib/ethdev/rte_ethdev.h | 28 +++- 2 files changed, 60 inserti

[PATCH v6 0/1] ethdev: introduce protocol based buffer split

2022-05-27 Thread xuan . ding
From: Xuan Ding Protocol based buffer split consists of splitting a received packet into several separate segments based on the packet content. It is useful in some scenarios, such as GPU acceleration. The splitting will help to enable true zero copy and hence improve the performance

[PATCH v6 1/1] ethdev: introduce protocol header based buffer split

2022-05-27 Thread xuan . ding
k memory and external memory, respectively. Signed-off-by: Xuan Ding Signed-off-by: Yuan Wang Signed-off-by: Wenxuan Wu Reviewed-by: Qi Zhang --- lib/ethdev/rte_ethdev.c | 40 +--- lib/ethdev/rte_ethdev.h | 28 +++- 2 files changed, 60 inserti

[dpdk-dev] [PATCH] net/virtio: fix incorrect avail desc id

2021-10-20 Thread xuan . ding
From: Xuan Ding Vhost will update desc’s Buffer ID advance to next used descriptor when VIRTIO_F_IN_ORDER feature negotiated. When virtio reuses the descriptor, the Buffer ID should be restored even VIRTQ_DESC_F_INDIRECT feature negotiated. Fixes: b473061b0e1d ("net/virtio: fix ind

[dpdk-dev] [PATCH] vhost: remove async dma map status

2021-10-27 Thread Xuan Ding
vfio unmaping API. [1] https://www.mail-archive.com/dev@dpdk.org/msg226464.html Cc: anatoly.bura...@intel.com Signed-off-by: Xuan Ding --- lib/vhost/vhost.h | 3 -- lib/vhost/vhost_user.c | 70 -- 2 files changed, 13 insertions(+), 60 deletions

[dpdk-dev] [PATCH v2] vhost: remove async dma map status

2021-10-27 Thread Xuan Ding
vfio unmapping API. [1] https://www.mail-archive.com/dev@dpdk.org/msg226464.html Cc: anatoly.bura...@intel.com Signed-off-by: Xuan Ding --- v2: * Fix a typo in commit log. --- lib/vhost/vhost.h | 3 -- lib/vhost/vhost_user.c | 70 -- 2 files changed

[dpdk-dev] [PATCH] vhost: fix physical address mapping

2021-11-09 Thread Xuan Ding
nable IOMMU for async vhost") Signed-off-by: Xuan Ding --- lib/vhost/vhost.h | 1 + lib/vhost/vhost_user.c | 104 - 2 files changed, 52 insertions(+), 53 deletions(-) diff --git a/lib/vhost/vhost.h b/lib/vhost/vhost.h index 7085e0885c..d246538

[dpdk-dev] [PATCH] vhost: fix physical address mapping

2021-11-09 Thread Xuan Ding
nable IOMMU for async vhost") Signed-off-by: Xuan Ding --- v2: * Fix a format issue. --- lib/vhost/vhost.h | 1 + lib/vhost/vhost_user.c | 104 - 2 files changed, 52 insertions(+), 53 deletions(-) diff --git a/lib/vhost/vhost.h b/lib/vhost/vho

[dpdk-dev] [PATCH v3] vhost: fix physical address mapping

2021-11-09 Thread Xuan Ding
nable IOMMU for async vhost") Signed-off-by: Xuan Ding --- v3: * Fix commit title. v2: * Fix a format issue. --- lib/vhost/vhost.h | 1 + lib/vhost/vhost_user.c | 105 - 2 files changed, 53 insertions(+), 53 deletions(-) diff --git a/lib/vhost

[dpdk-dev] [PATCH v2 v2] vhost: add unsafe API to check inflight packets

2021-09-15 Thread Xuan Ding
In async data path, when vring state changes, it is necessary to know the number of inflight packets in DMA engine. This patch provides a thread unsafe API to return the number of inflight packets without using any lock. Signed-off-by: Xuan Ding --- v2: * Fixed some format issues. --- doc

[dpdk-dev] [PATCH v3] vhost: add unsafe API to check inflight packets

2021-09-15 Thread Xuan Ding
In async data path, when vring state changes, it is necessary to know the number of inflight packets in DMA engine. This patch provides a thread unsafe API to return the number of inflight packets without using any lock. Signed-off-by: Xuan Ding --- v3: * Fixed one typo. * Revised the doc to be

[dpdk-dev] [PATCH] vhost: Normalize return type and function name

2021-09-15 Thread Xuan Ding
In function definitions, adjust some return types and function names on a separate line to be consistent with DPDK coding style. --- lib/vhost/vhost.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/lib/vhost/vhost.c b/lib/vhost/vhost.c index 24ae1025ea..69e9d2

[dpdk-dev] [PATCH v2] vhost: normalize return type and function name

2021-09-15 Thread Xuan Ding
In some function definitions, adjust return type and function name on a separate line to be consistent with DPDK coding style. Signed-off-by: Xuan Ding --- v2: * Fixed one format issue. --- lib/vhost/vhost.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a

[dpdk-dev] [PATCH v2 0/2] support IOMMU for DMA device

2021-09-16 Thread Xuan Ding
async vhost. v2: * Added rte_errno filtering for some devices bound in the kernel driver. * Added a flag to check the status of region mapping. * Fixed one typo. Xuan Ding (2): vfio: allow partially unmapping adjacent memory vhost: enable IOMMU for async vhost lib/eal/linux/eal_vfio.c | 338

[dpdk-dev] [PATCH v2 1/2] vfio: allow partially unmapping adjacent memory

2021-09-16 Thread Xuan Ding
rt partial unmapping. With this change, we will still be able to merge adjacent segments, but only if they are of the same size. If we keep with our above example, adjacent segments A and B will be stored as separate segments if they are of different sizes. Signed-off-by: Anatoly Burakov Signed-of

[dpdk-dev] [PATCH v2 2/2] vhost: enable IOMMU for async vhost

2021-09-16 Thread Xuan Ding
The use of IOMMU has many advantages, such as isolation and address translation. This patch extends the capbility of DMA engine to use IOMMU if the DMA engine is bound to vfio. When set memory table, the guest memory will be mapped into the default container of DPDK. Signed-off-by: Xuan Ding

[dpdk-dev] [PATCH v3 0/2] support IOMMU for DMA device

2021-09-25 Thread Xuan Ding
async vhost. v3: * Move the async_map_status flag to virtio_net structure to avoid ABI breaking. v2: * Add rte_errno filtering for some devices bound in the kernel driver. * Add a flag to check the status of region mapping. * Fix one typo. Xuan Ding (2): vfio: allow partially unmapping

[dpdk-dev] [PATCH v3 1/2] vfio: allow partially unmapping adjacent memory

2021-09-25 Thread Xuan Ding
rt partial unmapping. With this change, we will still be able to merge adjacent segments, but only if they are of the same size. If we keep with our above example, adjacent segments A and B will be stored as separate segments if they are of different sizes. Signed-off-by: Anatoly Burakov Signed-of

[dpdk-dev] [PATCH v3 2/2] vhost: enable IOMMU for async vhost

2021-09-25 Thread Xuan Ding
The use of IOMMU has many advantages, such as isolation and address translation. This patch extends the capbility of DMA engine to use IOMMU if the DMA engine is bound to vfio. When set memory table, the guest memory will be mapped into the default container of DPDK. Signed-off-by: Xuan Ding

[dpdk-dev] [PATCH v4 0/2] support IOMMU for DMA device

2021-09-25 Thread Xuan Ding
async vhost. v4: * Fix a format issue. v3: * Move the async_map_status flag to virtio_net structure to avoid ABI breaking. v2: * Add rte_errno filtering for some devices bound in the kernel driver. * Add a flag to check the status of region mapping. * Fix one typo. Xuan Ding (2): vfio: allow

[dpdk-dev] [PATCH v4 1/2] vfio: allow partially unmapping adjacent memory

2021-09-25 Thread Xuan Ding
rt partial unmapping. With this change, we will still be able to merge adjacent segments, but only if they are of the same size. If we keep with our above example, adjacent segments A and B will be stored as separate segments if they are of different sizes. Signed-off-by: Anatoly Burakov Signed-of

[dpdk-dev] [PATCH v4 2/2] vhost: enable IOMMU for async vhost

2021-09-25 Thread Xuan Ding
The use of IOMMU has many advantages, such as isolation and address translation. This patch extends the capbility of DMA engine to use IOMMU if the DMA engine is bound to vfio. When set memory table, the guest memory will be mapped into the default container of DPDK. Signed-off-by: Xuan Ding

[dpdk-dev] [PATCH v4 0/2] add unsafe API to get inflight packets

2021-09-26 Thread Xuan Ding
one typo. * Revised the doc to be more accuracy. v2: * Fixed some format issues. Xuan Ding (2): vhost: add unsafe API to check inflight packets examples/vhost: use API to check inflight packets doc/guides/prog_guide/vhost_lib.rst| 5 + doc/guides/rel_notes/release_21_11.rst | 5

[dpdk-dev] [PATCH v4 1/2] vhost: add unsafe API to check inflight packets

2021-09-26 Thread Xuan Ding
In async data path, when vring state changes or device is destroyed, it is necessary to know the number of inflight packets in DMA engine. This patch provides a thread unsafe API to return the number of inflight packets for a vhost queue without using any lock. Signed-off-by: Xuan Ding --- doc

[dpdk-dev] [PATCH v4 2/2] examples/vhost: use API to check inflight packets

2021-09-26 Thread Xuan Ding
In async data path, call rte_vhost_async_get_inflight_thread_unsafe() API to directly return the number of inflight packets instead of maintaining a local variable. Signed-off-by: Xuan Ding --- examples/vhost/main.c | 26 +++--- examples/vhost/main.h | 1 - 2 files changed

[dpdk-dev] [PATCH v5 0/2] support IOMMU for DMA device

2021-09-27 Thread Xuan Ding
. * Fix one typo. Xuan Ding (2): vfio: allow partially unmapping adjacent memory vhost: enable IOMMU for async vhost lib/eal/linux/eal_vfio.c | 338 ++- lib/vhost/vhost.h| 4 + lib/vhost/vhost_user.c | 114 - 3 files changed, 344

[dpdk-dev] [PATCH v5 1/2] vfio: allow partially unmapping adjacent memory

2021-09-27 Thread Xuan Ding
rt partial unmapping. With this change, we will still be able to merge adjacent segments, but only if they are of the same size. If we keep with our above example, adjacent segments A and B will be stored as separate segments if they are of different sizes. Signed-off-by: Anatoly Burakov Signed-of

[dpdk-dev] [PATCH v5 2/2] vhost: enable IOMMU for async vhost

2021-09-27 Thread Xuan Ding
The use of IOMMU has many advantages, such as isolation and address translation. This patch extends the capbility of DMA engine to use IOMMU if the DMA engine is bound to vfio. When set memory table, the guest memory will be mapped into the default container of DPDK. Signed-off-by: Xuan Ding

[dpdk-dev] [PATCH v5 0/2] add unsafe API to get inflight packets

2021-09-27 Thread Xuan Ding
API in vhost example. v3: * Fixed one typo. * Revised the doc to be more accuracy. v2: * Fixed some format issues. Xuan Ding (2): vhost: add unsafe API to check inflight packets examples/vhost: use API to check inflight packets doc/guides/prog_guide/vhost_lib.rst| 5 + doc/guides

[dpdk-dev] [PATCH v5 1/2] vhost: add unsafe API to check inflight packets

2021-09-27 Thread Xuan Ding
In async data path, when vring state changes or device is destroyed, it is necessary to know the number of inflight packets in DMA engine. This patch provides a thread unsafe API to return the number of inflight packets for a vhost queue without using any lock. Signed-off-by: Xuan Ding --- doc

[dpdk-dev] [PATCH v5 2/2] examples/vhost: use API to check inflight packets

2021-09-27 Thread Xuan Ding
In async data path, call rte_vhost_async_get_inflight_thread_unsafe() API to directly return the number of inflight packets instead of maintaining a local variable. Signed-off-by: Xuan Ding --- examples/vhost/main.c | 25 +++-- examples/vhost/main.h | 1 - 2 files changed

[dpdk-dev] [PATCH v6 0/2] add unsafe API to get inflight packets

2021-09-28 Thread Xuan Ding
lastest branch. v4: * Added use case for API in vhost example. v3: * Fixed one typo. * Revised the doc to be more accuracy. v2: * Fixed some format issues. Xuan Ding (2): vhost: add unsafe API to check inflight packets examples/vhost: use API to check inflight packets doc/guides/prog_guide

  1   2   3   >