[PATCH v2] dma/idxd: fix failure to configure a device instance for DSA

2024-06-28 Thread Wenwu Ma
In ubuntu 24.04, DSA's workqueue has a new driver_name file in sysfs, DPDK needs to write a correct value to this file when configuring a device instance using the dpdk_idxd_cfg.py script, otherwise it will fail to be configured, this patch fixes the issue. Signed-off-by: Wenwu Ma -

[PATCH] dma/idxd: fix failure to configure a device instance for DSA

2024-06-27 Thread Wenwu Ma
In ubuntu 24.04, DSA's workqueue has a new driver_name file in sysfs, DPDK needs to write a correct value to this file when configuring a device instance using the dpdk_idxd_cfg.py script, otherwise it will fail to be configured, this patch fixes the issue. Signed-off-by: Wenwu Ma --- dr

[PATCH v3] dmadev: fix structure alignment

2024-03-20 Thread Wenwu Ma
nment. The patch chooses the former option to fix the issue. Fixes: b36970f2e13e ("dmadev: introduce DMA device library") Cc: sta...@dpdk.org Signed-off-by: Wenwu Ma --- v2: - Because of performance drop, adjust the code to no longer demand cache line alignment v3: - back to v1 pa

[PATCH v2] dmadev: fix structure alignment

2024-03-14 Thread Wenwu Ma
The structure rte_dma_dev needs only 8 byte alignment. This patch replaces __rte_cache_aligned of rte_dma_dev with __rte_aligned(8). Fixes: b36970f2e13e ("dmadev: introduce DMA device library") Cc: sta...@dpdk.org Signed-off-by: Wenwu Ma --- v2: - Because of performance drop, adjus

[PATCH] net/igc: fix disabling timesync

2024-03-14 Thread Wenwu Ma
When disabling timesync, we should clear the IGC_RXPBS_CFG_TS_EN bit of IGC_RXPBS, the patch fixes this. Fixes: 4f6fbbf6f17d ("net/igc: support IEEE 1588 PTP") Cc: sta...@dpdk.org Signed-off-by: Wenwu Ma --- drivers/net/igc/igc_ethdev.c | 2 +- 1 file changed, 1 insertion(+),

[PATCH] dmadev: fix structure alignment

2024-03-07 Thread Wenwu Ma
The structure rte_dma_dev needs cacheline alignment, but the return value of malloc may not be aligned to the cacheline. Therefore, extra memory is applied for realignment. Fixes: b36970f2e13e ("dmadev: introduce DMA device library") Cc: sta...@dpdk.org Signed-off-by: Wenwu Ma ---

[PATCH v2] net/ice: fix null pointer dereferences

2024-03-03 Thread Wenwu Ma
This patch fixes two null pointer dereferences detected by coverity scan. Coverity issue: 414096 Fixes: 6ccef90ff5d3 ("net/ice: support VSI level bandwidth config") Cc: sta...@dpdk.org Signed-off-by: Wenwu Ma --- v2: - deleting rather than modifying the prints that cause nu

[PATCH] net/ice: fix null pointer dereferences

2024-02-29 Thread Wenwu Ma
This patch fixes two null pointer dereferences detected by coverity scan. Coverity issue: 414096 Fixes: 6ccef90ff5d3 ("net/ice: support VSI level bandwidth config") Signed-off-by: Wenwu Ma --- drivers/net/ice/ice_tm.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-)

[PATCH v5] bus/pci: fix legacy device IO port map in secondary process

2023-10-23 Thread Wenwu Ma
When doing IO port mapping for legacy device in secondary process, the region information is missing, so, we need to refill it. Fixes: 4b741542ecde ("bus/pci: avoid depending on private kernel value") Cc: sta...@dpdk.org Signed-off-by: Wenwu Ma --- v5: - adding checks to vfi

[PATCH v2] net/virtio: fix link state interrupt vector setting

2023-10-22 Thread Wenwu Ma
The settings of the vector for link state interrupts should be done before the initialization of the device is completed. Fixes: ee85024cf5f7 ("net/virtio: complete init stage at the right place") Cc: sta...@dpdk.org Signed-off-by: Wenwu Ma Tested-by: Wei Ling Reviewed-by: Maxim

[PATCH v4] bus/pci: fix legacy device IO port map in secondary process

2023-08-29 Thread Wenwu Ma
When doing IO port mapping for legacy device in secondary process, the region information is missing, so, we need to refill it. Fixes: 4b741542ecde ("bus/pci: avoid depending on private kernel value") Cc: sta...@dpdk.org Signed-off-by: Wenwu Ma --- v4: - adjusting commit log v3: -

[PATCH v3] bus/pci: fix legacy device IO port map in secondary process

2023-08-21 Thread Wenwu Ma
When doing IO port mapping for legacy device in secondary process, the region information is missing, so, we need to refill it. Fixes: 4b741542ecde ("bus/pci: avoid depending on private kernel value") Cc: sta...@dpdk.org Signed-off-by: Wenwu Ma --- v3: - adjusting variable settings

[PATCH v2] bus/pci: fix legacy device IO port map in secondary process

2023-08-20 Thread Wenwu Ma
When doing IO port mapping for legacy device in secondary process, the region information is missing, so, we need to refill it. Fixes: 4b741542ecde ("bus/pci: avoid depending on private kernel value") Cc: sta...@dpdk.org Signed-off-by: Wenwu Ma --- v2: add release of

[PATCH] net/virtio: fix the setting of the vector for link state interrupt

2023-08-06 Thread Wenwu Ma
The settings of the vector for link state interrupts should be done before the initialization of the device is completed. Fixes: ee85024cf5f7 ("net/virtio: complete init stage at the right place") Cc: sta...@dpdk.org Signed-off-by: Wenwu Ma --- drivers/net/virtio/virtio_eth

[PATCH] bus/pci: fix legacy device IO port map in secondary process

2023-08-06 Thread Wenwu Ma
When doing IO port mapping for legacy device in secondary process, the region information is missing, so, we need to refill it. Fixes: 4b741542ecde ("bus/pci: avoid depending on private kernel value") Cc: sta...@dpdk.org Signed-off-by: Wenwu Ma --- drivers/bus/pci/linux/pci_v

[PATCH] vhost: fix net header settings in vhost datapath

2023-01-03 Thread Wenwu Ma
In vhost sync batch enqueue, the "num_buffers" of virtio net header is not be set, but it should be set to 1 if the mrg_rxbuf feature is turned on, This patch fix the issue. Fixes: ef861692c398 ("vhost: add packed ring batch enqueue") Cc: sta...@dpdk.org Signed-off-by: Wenw

[PATCH v4] vhost: support CPU copy for small packets

2022-08-28 Thread Wenwu Ma
timeout like TCP handshake packets. Therefore, this patch use CPU to perform small copies in vhost. Signed-off-by: Wenwu Ma --- v4: * fix coding style issues v3: * compare threshold with entire packet length v2: * fix CI build error --- lib/vhost/vhost.h | 7 ++-- lib/vhost/virtio_net.c | 73

[PATCH v3] vhost: support CPU copy for small packets

2022-08-25 Thread Wenwu Ma
timeout like TCP handshake packets. Therefore, this patch use CPU to perform small copies in vhost. Signed-off-by: Wenwu Ma --- v3: * compare threshold with entire packet length v2: * fix CI build error --- lib/vhost/vhost.h | 7 ++-- lib/vhost/virtio_net.c | 72

[PATCH v2] vhost: support CPU copy for small packets

2022-08-12 Thread Wenwu Ma
timeout like TCP handshake packets. Therefore, this patch use CPU to perform small copies in vhost. Signed-off-by: Wenwu Ma --- v2: * fix CI build error --- lib/vhost/vhost.h | 6 ++- lib/vhost/virtio_net.c | 87 +++--- 2 files changed, 61 insertions(+), 32

[PATCH] vhost: support CPU copy for small packets

2022-08-11 Thread Wenwu Ma
timeout like TCP handshake packets. Therefore, this patch use CPU to perform small copies in vhost. Signed-off-by: Wenwu Ma --- lib/vhost/vhost.h | 6 ++- lib/vhost/virtio_net.c | 87 +++--- 2 files changed, 61 insertions(+), 32 deletions(-) diff --git a

[PATCH] examples/vhost: fix use after free

2022-07-13 Thread Wenwu Ma
In async_enqueue_pkts(), the failed pkts will be freed before return, but, the failed pkts may be retried later, it will cause use after free. So, we free the failed pkts after retry. Fixes: 1907ce4baec3 ("examples/vhost: fix retry logic on Rx path") Cc: sta...@dpdk.org Signed-off-by

[PATCH v3] app/testpmd: perform SW IP checksum for GRO/GSO packets

2022-05-11 Thread Wenwu Ma
users may perform a SW IP checksum. This patch add the code about it. Fixes: b7091f1dcfbc ("app/testpmd: enable the heavyweight mode TCP/IPv4 GRO") Fixes: 52f38a2055ed ("app/testpmd: enable TCP/IPv4 VxLAN and GRE GSO") Cc: sta...@dpdk.org Signed-off-by: Wenwu Ma ---

[PATCH v2] app/testpmd: perform SW IP checksum for GRO/GSO packets

2022-05-11 Thread Wenwu Ma
users may perform a SW IP checksum. This patch add the code about it. Fixes: b7091f1dcfbc ("app/testpmd: enable the heavyweight mode TCP/IPv4 GRO") Fixes: 52f38a2055ed ("app/testpmd: enable TCP/IPv4 VxLAN and GRE GSO") Cc: sta...@dpdk.org Signed-off-by: Wenwu Ma ---

[PATCH] app/testpmd: perform SW IP checksum for GRO packets

2022-05-10 Thread Wenwu Ma
users may perform a SW IP checksum. This patch add the code about it. Signed-off-by: Wenwu Ma --- app/test-pmd/csumonly.c | 12 1 file changed, 12 insertions(+) diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c index 8b6665d6f3..76ce58f6d0 100644 --- a/app/test-pmd/csumonly.c

[PATCH v3] vhost: fix deadlock when message handling failed

2022-05-06 Thread Wenwu Ma
In vhost_user_msg_handler(), if vhost message handling failed, we should check whether the queue is locked and release the lock before returning. Or, it will cause a deadlock later. Fixes: 7f31d4ea05ca ("vhost: fix lock on device readiness notification") Cc: sta...@dpdk.org Signed-off

[PATCH v2] vhost: fix deadlock when handling user messages

2022-05-05 Thread Wenwu Ma
In vhost_user_msg_handler(), if vhost message handling failed, we should check whether the queue is locked and release the lock before returning. Or, it will cause a deadlock later. Fixes: 7f31d4ea05ca ("vhost: fix lock on device readiness notification") Cc: sta...@dpdk.org Signed-off

[PATCH] vhost: fix deadlock when handling user messages

2022-05-04 Thread Wenwu Ma
In vhost_user_msg_handler(), if vhost message handling failed, we should check whether the queue is locked and release the lock before returning. Or, it will cause a deadlock later. Signed-off-by: Wenwu Ma --- lib/vhost/vhost_user.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib

[PATCH] vhost: support sync copy when data buffer is small

2022-04-10 Thread Wenwu Ma
In async datapath, if the length of data buffer is less than 256, the data will be copied by CPU instead of DMA. Signed-off-by: Wenwu Ma --- lib/vhost/vhost.h | 6 ++- lib/vhost/virtio_net.c | 96 ++ 2 files changed, 73 insertions(+), 29 deletions

[PATCH v2] examples/vhost: fix launch failure with physical port

2022-03-04 Thread Wenwu Ma
;) Cc: sta...@dpdk.org Signed-off-by: Wenwu Ma --- examples/vhost/main.c | 83 +++ 1 file changed, 29 insertions(+), 54 deletions(-) diff --git a/examples/vhost/main.c b/examples/vhost/main.c index 68afd398bb..d94fabb060 100644 --- a/examples/vhost/main.c +++

[PATCH v3] examples/multi_process: reconfigure port when rss or csum isn't supported

2022-02-21 Thread Wenwu Ma
The default values of rx mq_mode and rx offloads for port will cause symmetric_mp startup failure if the port do not support rss or csum. This Patch make the app to reconfigure the NIC without them. Only quit the app if the second reconfiguration fails. Signed-off-by: Wenwu Ma --- examples

[PATCH v2] examples/multi_process: reconfigure port when rss or csum isn't supported

2022-02-20 Thread Wenwu Ma
The default values of rx mq_mode and rx offloads for port will cause symmetric_mp startup failure if the port do not support rss or csum. This Patch make the app to reconfigure the NIC without them. Only quit the app if the second reconfiguration fails. Signed-off-by: Wenwu Ma --- examples

[PATCH] examples/multi_process: add options to control port configuration

2022-02-16 Thread Wenwu Ma
app startup normally. Signed-off-by: Wenwu Ma --- examples/multi_process/symmetric_mp/main.c | 18 -- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/examples/multi_process/symmetric_mp/main.c b/examples/multi_process/symmetric_mp/main.c index 050337765f..df41abe682

[PATCH] examples/vhost: add option to control mbuf pool size

2022-02-16 Thread Wenwu Ma
dpdk-vhost will fail to launch with a 40G i40e port because there are not enough mbufs. This patch adds a new option --total-num-mbufs, through which the user can set larger mbuf pool to avoid this problem. Signed-off-by: Wenwu Ma --- examples/vhost/main.c | 83

[PATCH] net/vhost: get csum offload capabilities of vhost backend

2022-02-16 Thread Wenwu Ma
The current vhost backend lacks csum offloads information, which will cause testpmd command such as "csum set tcp hw " to fail. This patch adds the information according to the device features. Signed-off-by: Wenwu Ma --- drivers/net/vhost/rte_eth_vhost.c | 18 ++ 1 fi

[dpdk-dev] [PATCH v4] examples/vhost: fix failure to launch dpdk-vhost

2021-11-02 Thread Wenwu Ma
mples/vhost: import userspace vhost application") Cc: sta...@dpdk.org Signed-off-by: Wenwu Ma Reviewed-by: Maxime Coquelin --- examples/vhost/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/vhost/main.c b/examples/vhost/main.c index bc3d71c898..36969a4

[dpdk-dev] [PATCH v3] examples/vhost: change the default value of NIC's max queues

2021-10-15 Thread Wenwu Ma
vswitch can't launch with a 40G i40e port due to device start fails if NIC’s max queues > the default number of 128, so, we changed the default value from 128 to 512. Fixes: 4796ad63ba1f ("examples/vhost: import userspace vhost application") Cc: sta...@dpdk.org Signe

[dpdk-dev] [PATCH v2] examples/vhost: change the default value of NIC's max queues

2021-10-15 Thread Wenwu Ma
vswitch can't launch with a 40G i40e port due to device start fails if NIC’s max queues > the default number of 128, so, we changed the default value from 128 to 512. Signed-off-by: Wenwu Ma --- examples/vhost/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/

[dpdk-dev] [PATCH v3 4/4] examples/vhost: support vhost async dequeue data path

2021-09-28 Thread Wenwu Ma
This patch is to add vhost async dequeue data-path in vhost sample. vswitch can leverage IOAT to accelerate vhost async dequeue data-path. Signed-off-by: Wenwu Ma Reviewed-by: Maxime Coquelin Tested-by: Yvonne Yang --- doc/guides/sample_app_ug/vhost.rst | 9 +- examples/vhost/ioat.c

[dpdk-dev] [PATCH v3 3/4] examples/vhost: use a new API to query remaining ring space

2021-09-28 Thread Wenwu Ma
A new API for querying the remaining descriptor ring capacity is available, so we use the new one instead of the old one. Signed-off-by: Wenwu Ma Reviewed-by: Maxime Coquelin Reviewed-by: Chenbo Xia Tested-by: Yvonne Yang --- examples/vhost/ioat.c | 6 +- 1 file changed, 1 insertion

[dpdk-dev] [PATCH v3 2/4] examples/vhost: refactor vhost enqueue and dequeue datapaths

2021-09-28 Thread Wenwu Ma
Previously, by judging the flag, we call different enqueue/dequeue functions in data path. Now, we use an ops that was initialized when Vhost was created, so that we can call ops directly in Vhost data path without any more flag judgment. Signed-off-by: Wenwu Ma Reviewed-by: Maxime Coquelin

[dpdk-dev] [PATCH v3 1/4] vhost: support async dequeue for split ring

2021-09-28 Thread Wenwu Ma
. Signed-off-by: Yuan Wang Signed-off-by: Jiayu Hu Signed-off-by: Wenwu Ma Tested-by: Yinan Wang Tested-by: Yvonne Yang --- doc/guides/prog_guide/vhost_lib.rst| 9 + doc/guides/rel_notes/release_21_11.rst | 3 + lib/vhost/rte_vhost_async.h| 34 +- lib/vhost/version.map

[dpdk-dev] [PATCH v3 0/4] support async dequeue for split ring

2021-09-28 Thread Wenwu Ma
note. - Update function comments. v2: - Removed struct async_nethdr in 1/4. - Removed a useless function declaration in 2/4, and fixed some coding style in 4/4. Wenwu Ma (3): examples/vhost: refactor vhost enqueue and dequeue datapaths examples/vhost: use a new API to query remaining ring space

[dpdk-dev] [PATCH v2] examples/vhost: fix use-after-free on drain vhost

2021-09-23 Thread Wenwu Ma
the vdev has been removed, if so, let's skip this vdev. Fixes: a68ba8e0a6b6 ("examples/vhost: refactor vhost data path") Cc: sta...@dpdk.org Signed-off-by: Wenwu Ma --- examples/vhost/main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/vhost/main.c b/examples/vho

[dpdk-dev] [PATCH] examples/vhost: fix use-after-free on drain vhost

2021-09-23 Thread Wenwu Ma
;vid], we need to check whether the vdev has been removed, if so, let's skip this vdev. Signed-off-by: Wenwu Ma --- examples/vhost/main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/vhost/main.c b/examples/vhost/main.c index d0bf1f31e3..1f6f7be8e3 100644 --- a/examples/vhos

[dpdk-dev] [PATCH v2 4/4] examples/vhost: support vhost async dequeue data path

2021-09-17 Thread Wenwu Ma
This patch is to add vhost async dequeue data-path in vhost sample. vswitch can leverage IOAT to accelerate vhost async dequeue data-path. Signed-off-by: Wenwu Ma Reviewed-by: Maxime Coquelin Tested-by: Yvonne Yang --- doc/guides/sample_app_ug/vhost.rst | 9 +- examples/vhost/ioat.c

[dpdk-dev] [PATCH v2 3/4] examples/vhost: use a new API to query remaining ring space

2021-09-17 Thread Wenwu Ma
A new API for querying the remaining descriptor ring capacity is available, so we use the new one instead of the old one. Signed-off-by: Wenwu Ma Reviewed-by: Maxime Coquelin Reviewed-by: Chenbo Xia Tested-by: Yvonne Yang --- examples/vhost/ioat.c | 6 +- 1 file changed, 1 insertion

[dpdk-dev] [PATCH v2 2/4] examples/vhost: refactor vhost enqueue and dequeue datapaths

2021-09-17 Thread Wenwu Ma
Previously, by judging the flag, we call different enqueue/dequeue functions in data path. Now, we use an ops that was initialized when Vhost was created, so that we can call ops directly in Vhost data path without any more flag judgment. Signed-off-by: Wenwu Ma Reviewed-by: Maxime Coquelin

[dpdk-dev] [PATCH v2 1/4] vhost: support async dequeue for split ring

2021-09-17 Thread Wenwu Ma
. Signed-off-by: Yuan Wang Signed-off-by: Jiayu Hu Signed-off-by: Wenwu Ma Tested-by: Yinan Wang Tested-by: Yvonne Yang --- doc/guides/prog_guide/vhost_lib.rst | 9 + lib/vhost/rte_vhost_async.h | 33 +- lib/vhost/version.map | 3 + lib/vhost/vhost.h

[dpdk-dev] [PATCH v2 0/4] support async dequeue for split ring

2021-09-17 Thread Wenwu Ma
async_nethdr in 1/4. - Removed a useless function declaration in 2/4, and fixed some coding style in 4/4. Wenwu Ma (3): examples/vhost: refactor vhost enqueue and dequeue datapaths examples/vhost: use a new API to query remaining ring space examples/vhost: support vhost async dequeue data path

[dpdk-dev] [PATCH] examples/vhost: change the default value of NIC's max queues

2021-09-09 Thread Wenwu Ma
vswitch can't launch with 40G FTV due to Device start fails if NIC’s max queues > the default number of 128, so, we changed the default value from 128 to 512. Signed-off-by: Wenwu Ma --- examples/vhost/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exampl

[dpdk-dev] [PATCH 4/4] examples/vhost: support vhost async dequeue data path

2021-09-06 Thread Wenwu Ma
This patch is to add vhost async dequeue data-path in vhost sample. vswitch can leverage IOAT to accelerate vhost async dequeue data-path. Signed-off-by: Wenwu Ma Reviewed-by: Maxime Coquelin --- doc/guides/sample_app_ug/vhost.rst | 9 +- examples/vhost/ioat.c | 61

[dpdk-dev] [PATCH 3/4] examples/vhost: use a new API to query remaining ring space

2021-09-06 Thread Wenwu Ma
A new API for querying the remaining descriptor ring capacity is available, so we use the new one instead of the old one. Signed-off-by: Wenwu Ma Reviewed-by: Maxime Coquelin --- examples/vhost/ioat.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/examples/vhost

[dpdk-dev] [PATCH 2/4] examples/vhost: refactor vhost enqueue and dequeue datapaths

2021-09-06 Thread Wenwu Ma
Previously, by judging the flag, we call different enqueue/dequeue functions in data path. Now, we use an ops that was initialized when Vhost was created, so that we can call ops directly in Vhost data path without any more flag judgment. Signed-off-by: Wenwu Ma Reviewed-by: Maxime Coquelin

[dpdk-dev] [PATCH 1/4] vhost: support async dequeue for split ring

2021-09-06 Thread Wenwu Ma
. Signed-off-by: Yuan Wang Signed-off-by: Jiayu Hu Signed-off-by: Wenwu Ma Tested-by: Yinan Wang --- doc/guides/prog_guide/vhost_lib.rst | 9 + lib/vhost/rte_vhost_async.h | 36 +- lib/vhost/version.map | 3 + lib/vhost/vhost.h | 3 +- lib/vhost

[dpdk-dev] [PATCH 0/4] support async dequeue for split ring

2021-09-06 Thread Wenwu Ma
on vhost patch from Jiayu Hu (http://patches.dpdk.org/project/dpdk/patch/1629463466-450012-1-git-send-email-jiayu...@intel.com/) Wenwu Ma (3): examples/vhost: refactor vhost enqueue and dequeue datapaths examples/vhost: use a new API to query remaining ring space examples/vhost: support vhost

[dpdk-dev] [PATCH v2] examples/vhost: fix memory leak on forwarding packets

2021-08-26 Thread Wenwu Ma
") Cc: sta...@dpdk.org v2: - Delete '.' in the title. Signed-off-by: Wenwu Ma --- examples/vhost/main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/vhost/main.c b/examples/vhost/main.c index bc3d71c898..07fd90ec64 100644 --- a/examples/vhost/main.c +++ b/e

[dpdk-dev] [PATCH] examples/vhost: fix memory leak on forwarding packets.

2021-08-16 Thread Wenwu Ma
") Cc: sta...@dpdk.org Signed-off-by: Wenwu Ma --- examples/vhost/main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/vhost/main.c b/examples/vhost/main.c index bc3d71c898..07fd90ec64 100644 --- a/examples/vhost/main.c +++ b/examples/vhost/main.c @@ -965,6 +965,7 @@ virti

[dpdk-dev] [PATCH v7 4/4] examples/vhost: support vhost async dequeue data path

2021-07-20 Thread Wenwu Ma
This patch is to add vhost async dequeue data-path in vhost sample. vswitch can leverage IOAT to accelerate vhost async dequeue data-path. Signed-off-by: Wenwu Ma Reviewed-by: Maxime Coquelin --- doc/guides/sample_app_ug/vhost.rst | 9 +- examples/vhost/ioat.c | 61

[dpdk-dev] [PATCH v7 3/4] vhost: support async dequeue for split ring

2021-07-20 Thread Wenwu Ma
. Signed-off-by: Yuan Wang Signed-off-by: Jiayu Hu Signed-off-by: Wenwu Ma --- doc/guides/prog_guide/vhost_lib.rst | 9 + lib/vhost/rte_vhost_async.h | 39 +- lib/vhost/version.map | 3 + lib/vhost/virtio_net.c | 586 4 files

[dpdk-dev] [PATCH v7 2/4] examples/vhost: use a new API to query remaining ring space

2021-07-20 Thread Wenwu Ma
A new API for querying the remaining descriptor ring capacity is available, so we use the new one instead of the old one. Signed-off-by: Wenwu Ma Reviewed-by: Maxime Coquelin --- examples/vhost/ioat.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/examples/vhost

[dpdk-dev] [PATCH v7 1/4] examples/vhost: refactor vhost enqueue and dequeue datapaths

2021-07-20 Thread Wenwu Ma
Previously, by judging the flag, we call different enqueue/dequeue functions in data path. Now, we use an ops that was initialized when Vhost was created, so that we can call ops directly in Vhost data path without any more flag judgment. Signed-off-by: Wenwu Ma Reviewed-by: Maxime Coquelin

[dpdk-dev] [PATCH v7 0/4] support async dequeue for split ring

2021-07-20 Thread Wenwu Ma
rte_vhost_async_try_dequeue_burst. - The completed package updates the used ring directly. Wenwu Ma (3): examples/vhost: refactor vhost enqueue and dequeue datapaths examples/vhost: use a new API to query remaining ring space examples/vhost: support vhost async dequeue data path Yuan Wang (1): vhost: support async

[dpdk-dev] [PATCH v6 4/4] examples/vhost: support vhost async dequeue data path

2021-07-16 Thread Wenwu Ma
This patch is to add vhost async dequeue data-path in vhost sample. vswitch can leverage IOAT to accelerate vhost async dequeue data-path. Signed-off-by: Wenwu Ma --- doc/guides/sample_app_ug/vhost.rst | 9 +- examples/vhost/ioat.c | 61 ++--- examples/vhost/ioat.h

[dpdk-dev] [PATCH v6 3/4] vhost: support async dequeue for split ring

2021-07-16 Thread Wenwu Ma
. Signed-off-by: Yuan Wang Signed-off-by: Jiayu Hu Signed-off-by: Wenwu Ma --- doc/guides/prog_guide/vhost_lib.rst | 9 + lib/vhost/rte_vhost_async.h | 39 +- lib/vhost/version.map | 3 + lib/vhost/virtio_net.c | 586 4 files

[dpdk-dev] [PATCH v6 2/4] examples/vhost: use a new API to query remaining ring space

2021-07-16 Thread Wenwu Ma
A new API for querying the remaining descriptor ring capacity is available, so we use the new one instead of the old one. Signed-off-by: Wenwu Ma --- examples/vhost/ioat.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/examples/vhost/ioat.c b/examples/vhost/ioat.c

[dpdk-dev] [PATCH v6 1/4] examples/vhost: refactor vhost enqueue and dequeue datapaths

2021-07-16 Thread Wenwu Ma
Previously, by judging the flag, we call different enqueue/dequeue functions in data path. Now, we use an ops that was initialized when Vhost was created, so that we can call ops directly in Vhost data path without any more flag judgment. Signed-off-by: Wenwu Ma --- examples/vhost/main.c

[dpdk-dev] [PATCH v6 0/4] support async dequeue for split ring

2021-07-16 Thread Wenwu Ma
directly. Wenwu Ma (3): examples/vhost: refactor vhost enqueue and dequeue datapaths examples/vhost: use a new API to query remaining ring space examples/vhost: support vhost async dequeue data path Yuan Wang (1): vhost: support async dequeue for split ring doc/guides/prog_guide

[dpdk-dev] [PATCH v5 4/4] examples/vhost: support vhost async dequeue data path

2021-07-04 Thread Wenwu Ma
This patch is to add vhost async dequeue data-path in vhost sample. vswitch can leverage IOAT to accelerate vhost async dequeue data-path. Signed-off-by: Wenwu Ma --- doc/guides/sample_app_ug/vhost.rst | 9 +- examples/vhost/ioat.c | 61 ++--- examples/vhost/ioat.h

[dpdk-dev] [PATCH v5 3/4] vhost: support async dequeue for split ring

2021-07-04 Thread Wenwu Ma
. Signed-off-by: Yuan Wang Signed-off-by: Jiayu Hu Signed-off-by: Wenwu Ma --- doc/guides/prog_guide/vhost_lib.rst | 10 + lib/vhost/rte_vhost_async.h | 44 +- lib/vhost/version.map | 3 + lib/vhost/virtio_net.c | 601 4 files

[dpdk-dev] [PATCH v5 2/4] examples/vhost: use a new API to query remaining ring space

2021-07-04 Thread Wenwu Ma
A new API for querying the remaining descriptor ring capacity is available, so we use the new one instead of the old one. Signed-off-by: Wenwu Ma --- examples/vhost/ioat.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/examples/vhost/ioat.c b/examples/vhost/ioat.c

[dpdk-dev] [PATCH v5 1/4] examples/vhost: refactor vhost enqueue and dequeue datapaths.

2021-07-04 Thread Wenwu Ma
Previously, by judging the flag, we call different enqueue/dequeue functions in data path. Now, we use an ops that was initialized when Vhost was created, so that we can call ops directly in Vhost data path without any more flag judgment. Signed-off-by: Wenwu Ma --- examples/vhost/main.c

[dpdk-dev] [PATCH v5 0/4] support async dequeue for split ring

2021-07-04 Thread Wenwu Ma
from rte_vhost_try_dequeue_burst to rte_vhost_async_try_dequeue_burst. - The completed package updates the used ring directly. Wenwu Ma (3): examples/vhost: refactor vhost enqueue and dequeue datapaths. examples/vhost: use a new API to query remaining ring space examples/vhost: support vhost

[dpdk-dev] [PATCH v4 4/4] examples/vhost: support vhost async dequeue data path

2021-06-30 Thread Wenwu Ma
This patch is to add vhost async dequeue data-path in vhost sample. vswitch can leverage IOAT to accelerate vhost async dequeue data-path. Signed-off-by: Wenwu Ma --- doc/guides/sample_app_ug/vhost.rst | 9 +- examples/vhost/ioat.c | 61 ++--- examples/vhost/ioat.h

[dpdk-dev] [PATCH v4 3/4] vhost: support async dequeue for split ring

2021-06-30 Thread Wenwu Ma
. Signed-off-by: Yuan Wang Signed-off-by: Jiayu Hu Signed-off-by: Wenwu Ma --- doc/guides/prog_guide/vhost_lib.rst | 10 + lib/vhost/rte_vhost_async.h | 44 ++- lib/vhost/version.map | 3 + lib/vhost/virtio_net.c | 579 4 files

[dpdk-dev] [PATCH v4 2/4] examples/vhost: use a new API to query remaining ring space

2021-06-30 Thread Wenwu Ma
A new API for querying the remaining descriptor ring capacity is available, so we use the new one instead of the old one. Signed-off-by: Wenwu Ma --- examples/vhost/ioat.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/examples/vhost/ioat.c b/examples/vhost/ioat.c

[dpdk-dev] [PATCH v4 1/4] examples/vhost: refactor vhost enqueue and dequeue datapaths.

2021-06-30 Thread Wenwu Ma
Previously, by judging the flag, we call different enqueue/dequeue functions in data path. Now, we use an ops that was initialized when Vhost was created, so that we can call ops directly in Vhost data path without any more flag judgment. Signed-off-by: Wenwu Ma --- examples/vhost/main.c

[dpdk-dev] [PATCH v4 0/4] support async dequeue for split ring

2021-06-30 Thread Wenwu Ma
performance enhancement. 160% performance improvement for v2 vs. v1. - Async dequeue API name change from rte_vhost_try_dequeue_burst to rte_vhost_async_try_dequeue_burst. - The completed package updates the used ring directly. Wenwu Ma (3): examples/vhost: refactor vhost enqueue and dequeue

[dpdk-dev] [PATCH v3 4/4] examples/vhost: support vhost async dequeue data path

2021-06-22 Thread Wenwu Ma
This patch is to add vhost async dequeue data-path in vhost sample. vswitch can leverage IOAT to accelerate vhost async dequeue data-path. Signed-off-by: Wenwu Ma --- doc/guides/sample_app_ug/vhost.rst | 9 +- examples/vhost/ioat.c | 61 ++--- examples/vhost/ioat.h

[dpdk-dev] [PATCH v3 3/4] vhost: support async dequeue for split ring

2021-06-22 Thread Wenwu Ma
. Signed-off-by: Yuan Wang Signed-off-by: Jiayu Hu Signed-off-by: Wenwu Ma --- doc/guides/prog_guide/vhost_lib.rst | 10 + lib/vhost/rte_vhost_async.h | 44 ++- lib/vhost/version.map | 3 + lib/vhost/virtio_net.c | 579 4 files

[dpdk-dev] [PATCH v3 2/4] examples/vhost: use a new API to query remaining ring space

2021-06-22 Thread Wenwu Ma
A new API for querying the remaining descriptor ring capacity is available, so we use the new one instead of the old one. Signed-off-by: Wenwu Ma --- examples/vhost/ioat.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/examples/vhost/ioat.c b/examples/vhost/ioat.c

[dpdk-dev] [PATCH v3 1/4] examples/vhost: refactor vhost enqueue and dequeue datapaths.

2021-06-22 Thread Wenwu Ma
Previously, by judging the flag, we call different enqueue/dequeue functions in data path. Now, we use an ops that was initialized when Vhost was created, so that we can call ops directly in Vhost data path without any more flag judgment. Signed-off-by: Wenwu Ma --- examples/vhost/main.c

[dpdk-dev] [PATCH v3 0/4] vhost: support async dequeue for split ring

2021-06-22 Thread Wenwu Ma
queue_id value before using it. - Async dequeue performance enhancement. 160% performance improvement for v2 vs. v1. - Async dequeue API name change from rte_vhost_try_dequeue_burst to rte_vhost_async_try_dequeue_burst. - The completed package updates the used ring directly. Wenwu Ma (3

[dpdk-dev] [PATCH v2 4/4] examples/vhost: support vhost async dequeue data path

2021-06-18 Thread Wenwu Ma
This patch is to add vhost async dequeue data-path in vhost sample. vswitch can leverage IOAT to accelerate vhost async dequeue data-path. Signed-off-by: Wenwu Ma --- doc/guides/sample_app_ug/vhost.rst | 9 +- examples/vhost/ioat.c | 34 +-- examples/vhost/ioat.h

[dpdk-dev] [PATCH v2 3/4] vhost: support async dequeue for split ring

2021-06-18 Thread Wenwu Ma
. Signed-off-by: Yuan Wang Signed-off-by: Jiayu Hu Signed-off-by: Wenwu Ma --- doc/guides/prog_guide/vhost_lib.rst | 10 + lib/vhost/rte_vhost_async.h | 44 ++- lib/vhost/version.map | 3 + lib/vhost/virtio_net.c | 553 4 files

[dpdk-dev] [PATCH v2 2/4] examples/vhost: use a new API to query remaining ring space

2021-06-18 Thread Wenwu Ma
A new API for querying the remaining descriptor ring capacity is available, so we use the new one instead of the old one. Signed-off-by: Wenwu Ma --- examples/vhost/ioat.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/examples/vhost/ioat.c b/examples/vhost/ioat.c

[dpdk-dev] [PATCH v2 0/4] vhost: support async dequeue for split ring

2021-06-18 Thread Wenwu Ma
rte_vhost_try_dequeue_burst to rte_vhost_async_try_dequeue_burst. - The completed package updates the used ring directly. Wenwu Ma (3): examples/vhost: refactor vhost enqueue and dequeue datapaths. examples/vhost: use a new API to query remaining ring space examples/vhost: support vhost async

[dpdk-dev] [PATCH v2 1/4] examples/vhost: refactor vhost enqueue and dequeue datapaths.

2021-06-18 Thread Wenwu Ma
Previously, by judging the flag, we call different enqueue/dequeue functions in data path. Now, we use an ops that was initialized when Vhost was created, so that we can call ops directly in Vhost data path without any more flag judgment. Signed-off-by: Wenwu Ma --- examples/vhost/main.c

[dpdk-dev] [v2] test/mempool: fix heap buffer overflow

2021-04-13 Thread Wenwu Ma
Amount of allocated memory was not enough for mempool which cause buffer overflow when access fields of mempool private structure in the rte_pktmbuf_priv_size function. Fixes: 923ceaeac140 ("test/mempool: add unit test cases") Cc: sta...@dpdk.org Signed-off-by: Wenwu Ma --- v2: - ref

[dpdk-dev] [v2] test/mempool: fix heap buffer overflow

2021-04-13 Thread Wenwu Ma
Amount of allocated memory was not enough for mempool which cause buffer overflow when access fields of mempool private structure in the rte_pktmbuf_priv_size function. Fixes: 923ceaeac140 ("test/mempool: add unit test cases") Cc: sta...@dpdk.org Signed-off-by: Wenwu Ma --- v2: - ref

[dpdk-dev] [PATCH] net/ice: fix illegal pointer access when removing mac filter

2021-04-01 Thread Wenwu Ma
When removing the mac filter in ice_remove_all_mac_vlan_filters(), TAILQ_FOREACH_SAFE should be used instead of TAILQ_FOREACH, Otherwise, it will result in a illegal pointer access. Fixes: e0dcf94a0d7f ("net/ice: support VLAN ops") Cc: sta...@dpdk.org Signed-off-by: Wenwu Ma --- d

[dpdk-dev] [PATCH] net/ice: fix illegal pointer access in dev init

2021-03-31 Thread Wenwu Ma
mac_addrs in dev data should be allocated more memory space, Otherwise, traversing mac_addrs in function eth_dev_mac_restore() will result heap-buffer-overflow. Signed-off-by: Wenwu Ma --- drivers/net/ice/ice_ethdev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a

[dpdk-dev] [PATCH] net/ice: fix illegal pointer access in releasing vsi

2021-03-31 Thread Wenwu Ma
When deleting the mac filter in ice_remove_all_mac_vlan_filters(), TAILQ_FOREACH_SAFE should be used instead of TAILQ_FOREACH, Otherwise, it will result in a illegal pointer access. Signed-off-by: Wenwu Ma --- drivers/net/ice/ice_ethdev.c | 7 +-- 1 file changed, 5 insertions(+), 2

[dpdk-dev] [PATCH] net/ice: fix illegal pointer access in releasing vsi

2021-03-31 Thread Wenwu Ma
From: wenwu ma When deleting the mac filter in ice_remove_all_mac_vlan_filters(), TAILQ_FOREACH_SAFE should be used instead of TAILQ_FOREACH, Otherwise, it will result in a null pointer access. Signed-off-by: wenwu ma --- drivers/net/ice/ice_ethdev.c | 7 +-- 1 file changed, 5 insertions

[dpdk-dev] [PATCH] net/ice: fix illegal pointer access in releasing vsi

2021-03-31 Thread Wenwu Ma
When deleting the mac filter in ice_remove_all_mac_vlan_filters(), TAILQ_FOREACH_SAFE should be used instead of TAILQ_FOREACH, Otherwise, it will result in a illegal pointer access. Signed-off-by: Wenwu Ma --- drivers/net/ice/ice_ethdev.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions

[dpdk-dev] [PATCH] net/ice: fix illegal pointer access in dev init

2021-03-31 Thread Wenwu Ma
mac_addrs in dev data should be allocated more memory space, Otherwise, traversing mac_addrs in function eth_dev_mac_restore() will result heap-buffer-overflow. Signed-off-by: Wenwu Ma --- drivers/net/ice/ice_ethdev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a

[dpdk-dev] [PATCH] test/mempool: Fix illegal pointer access in mempool test

2021-03-31 Thread Wenwu Ma
The value of parameter private_data_size of function rte_mempool_create() called in test_mempool() should not be 0, Otherwise, the function rte_pktmbuf_priv_size() called in rte_pktmbuf_init() will cause heap-buffer-overflow. Signed-off-by: Wenwu Ma --- app/test/test_mempool.c | 3 ++- 1 file

[dpdk-dev] [PATCH] mbuf: Fix illegal pointer access to mempool members

2021-03-31 Thread Wenwu Ma
Before accessing the private data of mempool in function rte_pktmbuf_priv_size() and rte_pktmbuf_data_room_size(), it is necessary to determine whether the private data exists, otherwise it will cause heap-buffer-overflow. Signed-off-by: Wenwu Ma --- lib/librte_mbuf/rte_mbuf.h | 6 ++ 1

[dpdk-dev] [PATCH] mbuf: Fix illegal pointer access to mempool members

2021-03-30 Thread Wenwu Ma
Before accessing the private data of mempool in function rte_pktmbuf_priv_size() and rte_pktmbuf_data_room_size(), it is necessary to determine whether the private data exists, otherwise it will cause null pointer access. Signed-off-by: Wenwu Ma --- lib/librte_mbuf/rte_mbuf.h | 6 ++ 1 file