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

2021-09-28 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 v6 2/2] examples/vhost: use API to check inflight packets

2021-09-28 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 | 31 +-- examples/vhost/main.h | 1 - 2 files

[PATCH v4] vhost: fix physical address mapping

2021-11-15 Thread Xuan Ding
nable IOMMU for async vhost") Signed-off-by: Xuan Ding --- v4: * Remove unnessary ENOSUP check. * Adjust return type. v3: * Fix commit title. v2: * Fix a format issue. --- lib/vhost/vhost.h | 1 + lib/vhost/vhost_user.c | 111 - 2 files c

[PATCH] doc: update recommended IOVA mode for async vhost

2021-11-22 Thread Xuan Ding
DPDK 21.11 adds vfio support for DMA device in vhost. This patch updates recommended IOVA mode in async datapath. Signed-off-by: Xuan Ding --- doc/guides/prog_guide/vhost_lib.rst | 9 + 1 file changed, 9 insertions(+) diff --git a/doc/guides/prog_guide/vhost_lib.rst b/doc/guides

[PATCH] vhost: fix physical address mapping

2021-12-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] vhost: rename field in guest page struct

2021-12-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

[RFC 0/2] vhost: support async dequeue data path

2021-12-31 Thread xuan . ding
From: Xuan Ding Hi everyone, The presence of an 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 is a draft implementation for split ring in vhost async dequeue data path. The code is based on

[RFC 1/2] vhost: support async dequeue for split ring

2021-12-31 Thread xuan . ding
From: Xuan Ding This patch implements asynchronous dequeue data path for vhost split ring, with dmadev library integrated. Signed-off-by: Yuan Wang Signed-off-by: Xuan Ding --- lib/vhost/rte_vhost_async.h | 29 +++ lib/vhost/version.map | 1 + lib/vhost/vhost.h | 1

[RFC 2/2] examples/vhost: support async dequeue data path

2021-12-31 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

[dpdk-dev] [PATCH] net/ice: fix symmetric rule creating

2021-01-20 Thread Xuan Ding
Only allow to create symmetric rule for L3/L4. Fixes: 38d632cbdc88("net/ice: refactor PF RSS") Cc: sta...@dpdk.org Signed-off-by: Xuan Ding --- drivers/net/ice/ice_hash.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/net/ice/ice_hash.c b/drivers/net/ice/ice_ha

[dpdk-dev] [PATCH] net/iavf: fix symmetric rule creating

2021-01-21 Thread Xuan Ding
Only allow to create symmetric rule for L3/L4. Fixes: 91f27b2e39ab("net/iavf: refactor RSS") Cc: sta...@dpdk.org Signed-off-by: Xuan Ding --- drivers/net/iavf/iavf_hash.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/net/iavf/iavf_hash.c b/drivers/net/iavf/i

[dpdk-dev] [PATCH] net/iavf: fix default RSS configuration

2021-01-31 Thread Xuan Ding
Add advanced RSS offloads check due to some legacy driver(kernel/DPDK PF) does not support virtual channel command VIRTCHNL_OP_RSS_HENA with hena = 0 and VIRTCHNL_OP_ADD_RSS_CFG. Fixes: 95f2f0e9fc2a6("net/iavf: improve default RSS") Signed-off-by: Xuan Ding --- drivers/net/iavf/iav

[dpdk-dev] [PATCH] net/ice: fix eth rss type checking

2021-01-31 Thread Xuan Ding
For pattern MAC_PPPOE_IPV4/6, add ETH_RSS_ETH into insput_set_mask to fix rss rule cannot be created when set eth as rss type. Fixes: 0d84f86c3022("net/ice: fix GTPU header parsing") Signed-off-by: Xuan Ding --- drivers/net/ice/ice_hash.c | 18 +- 1 file changed, 9

[dpdk-dev] [PATCH v2] net/ice: fix rss type checking

2021-01-31 Thread Xuan Ding
For pattern MAC_PPPOE_IPV4/6, add ETH_RSS_ETH into insput_set_mask to fix rss rule cannot be created when set eth as rss type. Fixes: 0d84f86c3022("net/ice: fix GTPU header parsing") Signed-off-by: Xuan Ding --- v2: * Refine the commit title. * Adjust the indentation by addi

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

2022-09-05 Thread xuan . ding
From: Xuan Ding This patchset introduces a new API rte_vhost_async_dma_unconfigure() to help user to manually free the DMA vchannel finished to use. Note: this API should be called after async channel unregister. v2: * Add spinlock protection. * Fix a memory leak issue. * Refine the doc. Xuan

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

2022-09-05 Thread xuan . ding
From: Xuan Ding This patch adds 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

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

2022-09-05 Thread xuan . ding
From: Xuan Ding This patch applies rte_vhost_async_dma_unconfigure() API to manually free 'dma_copy_track' array instead of waiting until the program ends to be released. Signed-off-by: Xuan Ding --- examples/vhost/main.c | 7 +++ 1 file changed, 7 insertions(+) diff --git

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

2021-09-28 Thread Xuan Ding
check the status of region mapping. * 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 | 116

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

2021-09-28 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 v6 2/2] vhost: enable IOMMU for async vhost

2021-09-28 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 v7 0/2] Support IOMMU for DMA device

2021-10-11 Thread Xuan Ding
kernel driver. * Add a flag to check the status of region mapping. * 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

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

2021-10-11 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 v7 2/2] vhost: enable IOMMU for async vhost

2021-10-11 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

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

2022-09-28 Thread xuan . ding
From: Xuan Ding This patchset introduces a new API rte_vhost_async_dma_unconfigure() to help user to manually free the DMA vchannel finished to use. Note: this API should be called after async channel unregister. v3: * Rebase to latest DPDK. * Refine some descriptions in the doc. * Fix one bug

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

2022-09-28 Thread xuan . ding
From: Xuan Ding This patch adds 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

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

2022-09-28 Thread xuan . ding
From: Xuan Ding This patch applies rte_vhost_async_dma_unconfigure() API to manually free DMA vchannels instead of waiting until the program ends to be released. Signed-off-by: Xuan Ding --- examples/vhost/main.c | 45 ++- examples/vhost/main.h | 1

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

2022-10-12 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. v4: * Rebase to 22.11 rc1. * Fix the usage of 'dma_ref_count' to mak

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

2022-10-12 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 v4 2/2] examples/vhost: unconfigure DMA vchannel

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

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

2021-08-18 Thread Xuan Ding
Since packed indirect descriptors are added and initialized when initializing vring, the reconnection path also needs to be considered. Fixes: 381f39ebb78a ("net/virtio: fix packed ring indirect descricptors setup") Cc: sta...@dpdk.org Cc: yong@intel.com Signed-off-by:

[dpdk-dev] [PATCH] doc: announce change in dma mapping/unmapping

2021-08-25 Thread Xuan Ding
-by-page. [1] https://mails.dpdk.org/archives/dev/2021-July/213493.html Signed-off-by: Xuan Ding --- doc/guides/rel_notes/deprecation.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst index 76a4abfd6b..272ffa993e

[dpdk-dev] [PATCH] doc: announce change in vfio dma mapping

2021-08-31 Thread Xuan Ding
-by-page. [1] https://mails.dpdk.org/archives/dev/2021-July/213493.html Signed-off-by: Xuan Ding --- doc/guides/rel_notes/deprecation.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst index 76a4abfd6b..1234420caf

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

2021-08-31 Thread Xuan Ding
This series adds support for DMA device to use vfio. The first patch is to extend current vfio dma mapping API to allow partial unmapping for adjacent memory if the platform does not support partial unmapping. Xuan Ding (2): vfio: allow partially unmapping adjacent memory vhost: enable IOMMU

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

2021-08-31 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 1/2] vfio: allow partially unmapping adjacent memory

2021-08-31 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: Xuan Ding --- lib

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

2021-09-08 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 --- doc/guides/prog_guide/vhost_lib.rst| 5

[PATCH v2] doc: announce header split deprecation

2022-07-15 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 per-port header split offload with the header size controlled using split_hdr_size in the same structure. Right now, no single

[PATCH] ethdev: remove header split Rx offload

2022-08-11 Thread xuan . ding
From: Xuan Ding As announced in the deprecation note, this patch removes the Rx offload flag 'RTE_ETH_RX_OFFLOAD_HEADER_SPLIT' and 'split_hdr_size' field from the structure 'rte_eth_rxmode'. User can still use `RTE_ETH_RX_OFFLOAD_BUFFER_SPLIT` for per-queue

[PATCH v2] ethdev: remove header split Rx offload

2022-08-11 Thread xuan . ding
From: Xuan Ding As announced in the deprecation note, this patch removes the Rx offload flag 'RTE_ETH_RX_OFFLOAD_HEADER_SPLIT' and 'split_hdr_size' field from the structure 'rte_eth_rxmode'. Meanwhile, the place where the examples and apps initialize the 's

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

2022-08-14 Thread xuan . ding
From: Xuan Ding This patchset introduces a new API rte_vhost_async_dma_unconfigure() to help user to manually free the DMA vchannel finished to use. Note: this API should be called after async channel unregister. Xuan Ding (2): vhost: introduce DMA vchannel unconfiguration example/vhost

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

2022-08-14 Thread xuan . ding
From: Xuan Ding This patch adds a new API rte_vhost_async_dma_unconfigure() to unconfigure DMA vchannels in vhost async data path. Signed-off-by: Xuan Ding --- doc/guides/prog_guide/vhost_lib.rst| 5 doc/guides/rel_notes/release_22_11.rst | 2 ++ lib/vhost/rte_vhost_async.h

[PATCH v1 2/2] example/vhost: unconfigure DMA vchannel

2022-08-14 Thread xuan . ding
From: Xuan Ding This patch uses rte_vhost_async_dma_unconfigure() API to manually free 'dma_coy_track' array rather than wait for the program to finish before being freed. Signed-off-by: Xuan Ding --- examples/vhost/main.c | 7 +++ 1 file changed, 7 insertions(+) diff --git

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

2022-02-14 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. v3: * Fix some format issues. v2: * Change the order of patch. Xuan Ding (2): vhost: fix field naming in guest

[PATCH v3 1/2] vhost: fix field naming in guest page struct

2022-02-14 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. Fixes: e246896178e6 ("vhost: get guest/host physical address mappings") Cc: sta...@dpdk.org Signed-off-by: Xuan Ding Reviewed-

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

2022-02-14 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 v4 0/2] vhost: fix async address mapping

2022-02-15 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. v4: * Fix the patch timezone. v3: * Fix some format issues. v2: * Change the order of patch. Xuan Ding (2

[PATCH v4 1/2] vhost: fix field naming in guest page struct

2022-02-15 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. Fixes: e246896178e6 ("vhost: get guest/host physical address mappings") Cc: sta...@dpdk.org Signed-off-by: Xuan Ding Reviewed-

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

2022-02-15 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

[RFC 0/2] add unsafe API to get inflight packets

2022-02-15 Thread xuan . ding
From: Xuan Ding This patchset introduces an unsafe API to get the number of inflight packets in DMA engine in some situations. Like vring state changes or device is destroyed. Compared with rte_vhost_async_get_inflight(), this is a lock free version. Xuan Ding (2): vhost: add unsafe API to

[RFC 1/2] vhost: add unsafe API to check inflight packets

2022-02-15 Thread xuan . ding
From: 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

[RFC 2/2] examples/vhost: use API to check inflight packets

2022-02-15 Thread xuan . ding
From: 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 | 28 +++- examples/vhost/main.h | 1

[PATCH] doc: remove multi-queue reconnection known issue

2022-02-20 Thread xuan . ding
From: Xuan Ding Since QEMU 5.2.0 fixes the vhost multi-queue reconnection issue in commit f66337bdbfda ("vhost-user: save features of multiqueues if chardev is closed"), this patch removes the previous description from known issue. Signed-off-by: Xuan Ding --- doc/guides

[RFC,v2 0/2] vhost: support async dequeue data path

2022-02-23 Thread xuan . ding
From: Xuan Ding The presence of an 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 is a draft implementation for split ring in vhost async dequeue data path. The code is based on latest

[RFC,v2 1/2] vhost: support async dequeue for split ring

2022-02-23 Thread xuan . ding
From: Xuan Ding This patch implements asynchronous dequeue data path for vhost split ring, with dmadev library integrated. Signed-off-by: Xuan Ding Signed-off-by: Yuan Wang --- lib/vhost/rte_vhost_async.h | 37 ++- lib/vhost/version.map | 1 + lib/vhost/vhost.h | 1

[RFC,v2 2/2] examples/vhost: support async dequeue data path

2022-02-23 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 v2] doc: fix vhost multi-queue reconnection

2022-02-23 Thread xuan . ding
From: Xuan Ding Since QEMU 5.2.0 fixes the vhost multi-queue reconnection issue in commit f66337bdbfda ("vhost-user: save features of multiqueues if chardev is closed"), this patch removes the previous description from known issue. Fixes: b37e95507e1b ("doc: add vhost multi-que

[RFC] ethdev: introduce protocol type based header split

2022-03-02 Thread xuan . ding
From: Xuan Ding Header split consists of splitting a received packet into two separate regions based on the packet content. Splitting is usually between the packet header that can be posted to a dedicated buffer and the packet payload that can be posted to a different buffer. This kind of

[RFC 0/2] net/ice: support header split in Rx data path

2022-03-02 Thread xuan . ding
From: Xuan Ding Header split is useful in some scenarios, such as GPU acceleration. The spliting will help to enable true zero copy and hence improve the performance significantly. This patchset enables header split in normal Rx data paths. When Rx queue is configured with header split feature

[RFC 1/2] app/testpmd: add header split configuration

2022-03-02 Thread xuan . ding
From: Xuan Ding This patch adds header split configuration in testpmd. The header split feature is off by default. To enable header split, you need: 1. Configure Rx queue with rx_offload header split on. 2. Set the protocol type of header split. Command for set header split protocol type

[RFC 2/2] net/ice: support header split in Rx data path

2022-03-02 Thread xuan . ding
From: Xuan Ding This patch adds support for header split in normal Rx data paths. When Rx queue is configured with header split feature, packets received will be directly splited into header and payload parts. And the two parts will be put into different mempools. Currently, the vectorized path

[RFC,v3 0/2] vhost: support async dequeue data path

2022-03-09 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 is a draft implementation for split ring in vhost async dequeue data path. The code is based on latest enqueue

[RFC,v3 1/2] vhost: support async dequeue for split ring

2022-03-09 Thread xuan . ding
From: Xuan Ding This patch implements asynchronous dequeue data path for vhost split ring, with dmadev library integrated. Signed-off-by: Xuan Ding Signed-off-by: Yuan Wang --- lib/vhost/rte_vhost_async.h | 37 ++- lib/vhost/version.map | 1 + lib/vhost/vhost.h | 1

[RFC,v3 2/2] examples/vhost: support async dequeue data path

2022-03-09 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

[RFC,v2 0/3] ethdev: introduce protocol type based header split

2022-03-21 Thread xuan . ding
From: Xuan Ding Header split consists of splitting a received packet into two separate regions based on the packet content. It is useful in some scenarios, such as GPU acceleration. The spliting will help to enable true zero copy and hence improve the performance significantly. This patchset

[RFC,v2 1/3] ethdev: introduce protocol type based header split

2022-03-21 Thread xuan . ding
From: Xuan Ding Header split consists of splitting a received packet into two separate regions based on the packet content. The split happens after the packet header and before the packet payload. Splitting is usually between the packet header that can be posted to a dedicated buffer and the

[RFC,v2 2/3] app/testpmd: add header split configuration

2022-03-21 Thread xuan . ding
From: Xuan Ding This patch adds header split configuration in testpmd. The header split feature is off by default. To enable header split, you need: 1. Configure Rx queue with rx_offload header split on. 2. Set the protocol type of header split. Command for set header split protocol type

[RFC,v2 3/3] net/ice: support header split in Rx data path

2022-03-21 Thread xuan . ding
From: Xuan Ding This patch adds support for header split in normal Rx data paths. When the Rx queue is configured with header split for specific protocol type, packets received will be directly splited into header and payload parts. And the two parts will be put into different mempools

[RFC,v3 0/3] ethdev: introduce protocol type based header split

2022-03-28 Thread xuan . ding
From: Xuan Ding Header split consists of splitting a received packet into two separate regions based on the packet content. It is useful in some scenarios, such as GPU acceleration. The spliting will help to enable true zero copy and hence improve the performance significantly. This patchset

[RFC,v3 1/3] ethdev: introduce protocol type based header split

2022-03-28 Thread xuan . ding
From: Xuan Ding Header split consists of splitting a received packet into two separate regions based on the packet content. The split happens after the packet header and before the packet payload. Splitting is usually between the packet header that can be posted to a dedicated buffer and the

[RFC,v3 2/3] app/testpmd: add header split configuration

2022-03-28 Thread xuan . ding
From: Xuan Ding This patch adds header split configuration in testpmd. The header split feature is off by default. To enable header split, you need: 1. Configure Rx queue with rx_offload header split on. 2. Set the protocol type of header split. Command for set header split protocol type

[RFC,v3 3/3] net/ice: support header split in Rx data path

2022-03-28 Thread xuan . ding
From: Xuan Ding This patch adds support for header split in normal Rx data paths. When the Rx queue is configured with header split for specific protocol type, packets received will be directly splited into header and payload parts. And the two parts will be put into different mempools

[dpdk-dev] [PATCH v1] lib/vhost: enable IOMMU for async vhost

2021-05-30 Thread xuan . ding
From: Xuan Ding For async copy, it is unsafe to directly use the physical address. and current address translation from GPA to HPA via SW also takes CPU cycles, these can all benefit from IOMMU. Since the existing DMA engine supports to use platform IOMMU, this patch enables IOMMU for async

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

2021-06-01 Thread xuan . ding
From: Xuan Ding For async copy, it is unsafe to directly use the physical address. and current address translation from GPA to HPA via SW also takes CPU cycles, these can all benefit from IOMMU. Since the existing DMA engine supports to use platform IOMMU, this patch enables IOMMU for async

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

2021-06-03 Thread xuan . ding
From: Xuan Ding For async copy, it is unsafe to directly use the physical address. And current address translation from GPA to HPA via SW also takes CPU cycles, these can all benefit from IOMMU. Since the existing DMA engine supports to use platform IOMMU, this patch enables IOMMU for async

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

2022-04-07 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 implements vhost async dequeue data path for split ring. This patch set is a new design and implementation of [2

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

2022-04-07 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 simplies the code without performance

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

2022-04-07 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 simplies the code without performance degradation. Signed-off-by: Xuan Ding --- lib/vhost/virtio_net.c | 23 +++ 1

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

2022-04-07 Thread xuan . ding
From: Xuan Ding This patches 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 --- lib/vhost/vhost.h | 1 + lib/vhost/virtio_net.c | 47 -- 2 files changed, 37

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

2022-04-07 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 v1 5/5] examples/vhost: support async dequeue data path

2022-04-07 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 v1 0/2] vhost: add unsafe API to get DMA inflight packets

2022-04-08 Thread xuan . ding
From: Xuan Ding This patchset introduces an unsafe API to get the number of inflight packets in DMA engine. It should be only used within the vhost ops which already holds the lock. Like vring state changes or device is destroyed. Compared with rte_vhost_async_get_inflight(), this is a lock free

[PATCH v1 1/2] vhost: add unsafe API to check inflight packets

2022-04-08 Thread xuan . ding
From: 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

[PATCH v1 2/2] examples/vhost: use API to check inflight packets

2022-04-08 Thread xuan . ding
From: 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 Reviewed-by: Maxime Coquelin --- examples/vhost/main.c | 28

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

2022-04-11 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 v2 1/5] vhost: prepare sync for descriptor to mbuf refactoring

2022-04-11 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 v2 2/5] vhost: prepare async for descriptor to mbuf refactoring

2022-04-11 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 --- lib/vhost/virtio_net.c | 23 +++ 1

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

2022-04-11 Thread xuan . ding
From: Xuan Ding This patches 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 --- lib/vhost/vhost.h | 1 + lib/vhost/virtio_net.c | 48 -- 2 files changed, 38

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

2022-04-11 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 v2 5/5] examples/vhost: support async dequeue data path

2022-04-11 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 v3] doc: fix vhost multi-queue reconnection

2022-04-14 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 v3 0/5] vhost: support async dequeue data path

2022-04-18 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 v3 1/5] vhost: prepare sync for descriptor to mbuf refactoring

2022-04-18 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 v3 2/5] vhost: prepare async for descriptor to mbuf refactoring

2022-04-18 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 --- lib/vhost/virtio_net.c | 23 +++ 1

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

2022-04-18 Thread xuan . ding
From: Xuan Ding This patches 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 --- lib/vhost/vhost.h | 1 + lib/vhost/virtio_net.c | 48 -- 2 files changed, 38

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

2022-04-18 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 v3 5/5] examples/vhost: support async dequeue data path

2022-04-18 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

[dpdk-dev] [PATCH v2] net/virtio-user: fix packed ring server mode

2019-12-16 Thread Xuan Ding
: add packed virtqueue defines") Cc: sta...@dpdk.org Signed-off-by: Xuan Ding v2 changes: * Renamed queue reset functions and moved them to virtqueue.c. --- drivers/net/virtio/virtio_ethdev.c | 48 - drivers/net/virtio/virtio_ethdev.h | 2 + drivers/

[dpdk-dev] [PATCH v3] net/virtio-user: fix packed ring server mode

2019-12-17 Thread Xuan Ding
: add packed virtqueue defines") Cc: sta...@dpdk.org Signed-off-by: Xuan Ding v3: * Removed an extra asterisk from a comment. * Renamed device reset function and moved it to virtio_user_ethdev.c. v2: * Renamed queue reset functions and moved them to virtqueue.c. --- drivers/net/virtio/virti

[dpdk-dev] [PATCH v4] net/virtio-user: fix packed ring server mode

2019-12-22 Thread Xuan Ding
: add packed virtqueue defines") Cc: sta...@dpdk.org Signed-off-by: Xuan Ding --- v4: * Moved change log below '---' marker. v3: * Removed an extra asterisk from a comment. * Renamed device reset function and moved it to virtio_user_ethdev.c. v2: * Renamed queue reset functio

[dpdk-dev] [PATCH v5] net/virtio-user: fix packed ring server mode

2020-01-14 Thread Xuan Ding
acked virtqueue defines") Cc: sta...@dpdk.org Signed-off-by: Xuan Ding --- v5: * Fixed two spelling mistakes in the commit log. * Added notice message when resetting vring. v4: * Moved change log below '---' marker. v3: * Removed an extra asterisk from a comment. * Renamed devic

<    1   2   3   >