[PATCH] eal: allow both allow and block options coexistence

2023-07-06 Thread Marvin Liu
nored Signed-off-by: Marvin Liu --- .mailmap| 2 +- lib/eal/common/eal_common_options.c | 14 -- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/.mailmap b/.mailmap index 0443e461a9..d256696485 100644 --- a/.mailmap +++ b/.mailmap @@ -1548,7 +1

[PATCH] eal: allow both allow and block options coexistence

2023-05-18 Thread Marvin Liu
be ignored Signed-off-by: Marvin Liu --- .mailmap| 2 +- lib/eal/common/eal_common_options.c | 14 -- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/.mailmap b/.mailmap index 0443e461a9..d256696485 100644 --- a/.mailmap +++ b/.mailmap

[PATCH] net/virtio: fix incorrect slots number when indirect feature on

2022-01-19 Thread Marvin Liu
Virtio driver only occupies one slot for enqueuing chained mbufs when indirect feature is on. Required slots calculation should depend on indirect feature status at the end. Fixes: 0eaf7fc2fe8e ("net/virtio: separate AVX Rx/Tx") Cc: sta...@dpdk.org Signed-off-by: Marvin Liu di

[dpdk-dev] [PATCH] net/virtio: fix vectorized path receive oversized packets

2021-09-25 Thread Marvin Liu
before batch operation. Fixes: 77d66da83834 ("net/virtio: add vectorized packed ring Rx") Cc: sta...@dpdk.org Signed-off-by: Marvin Liu diff --git a/drivers/net/virtio/virtio_rxtx_packed.c b/drivers/net/virtio/virtio_rxtx_packed.c index ab489a58af..45cf39df22 100644 --- a/drivers/

[dpdk-dev] [PATCH 2/2] vhost: fix async enqueue accessing uninitialized variables

2021-04-06 Thread Marvin Liu
This patch fixs coverity issue in async enqueue function by adding initialization step before using temporary virtio header. Coverity issue: 366123 Fixes: cd6760da1076 ("vhost: introduce async enqueue for split ring") Cc: sta...@dpdk.org Signed-off-by: Marvin Liu diff --git a/lib/li

[dpdk-dev] [PATCH 1/2] vhost: fix accessing uninitialized variables

2021-04-06 Thread Marvin Liu
This patch fixs coverity issue by adding initialization step before using temporary virtio header. Coverity issue: 366181 Fixes: fb3815cc614d ("vhost: handle virtually non-contiguous buffers in Rx-mrg") Cc: sta...@dpdk.org Signed-off-by: Marvin Liu Reviewed-by: Maxime Coquelin di

[dpdk-dev] [PATCH 3/3] vhost: fix potential buffer overflow when batch dequeue

2021-03-30 Thread Marvin Liu
Similar as single dequeue, the multiple accesses of descriptor length will lead to potential risk. One-time access of descriptor length can eliminate this risk. Fixes: 75ed51697820 ("vhost: add packed ring batch dequeue") Cc: sta...@dpdk.org Signed-off-by: Marvin Liu Reviewed-

[dpdk-dev] [PATCH 2/3] vhost: fix packed ring potential buffer overflow

2021-03-30 Thread Marvin Liu
Similar as split ring, the multiple accesses of descriptor length will lead to potential risk. One-time access of descriptor length can eliminate this risk. Fixes: 2f3225a7d69b ("vhost: add vector filling support for packed ring") Cc: sta...@dpdk.org Signed-off-by: Marvin Liu R

[dpdk-dev] [PATCH 1/3] vhost: fix split ring potential buffer overflow

2021-03-30 Thread Marvin Liu
iptor length after vhost calcuated buffer size. Thus may lead to buffer overflow in vhost side. This potential risk can be eliminated by accessing the descriptor length once. Fixes: 1be4ebb1c464 ("vhost: support indirect descriptor in mergeable Rx") Cc: sta...@dpdk.org Signed-off-by: Marvi

[dpdk-dev] [PATCH 3/3] vhost: fix potential buffer overflow when batch dequeue

2021-03-24 Thread Marvin Liu
Similar as single dequeue, the multiple accesses of descriptor length will lead to potential risk. One-time access of descriptor length can eliminate this risk. Fixes: 75ed51697820 ("vhost: add packed ring batch dequeue") Cc: sta...@dpdk.org Signed-off-by: Marvin Liu Reviewed-

[dpdk-dev] [PATCH 1/3] vhost: fix split ring potential buffer overflow

2021-03-24 Thread Marvin Liu
iptor length after vhost calcuated buffer size. Thus may lead to buffer overflow in vhost side. This potential risk can be eliminated by accessing the descriptor length once. Fixes: 1be4ebb1c464 ("vhost: support indirect descriptor in mergeable Rx") Cc: sta...@dpdk.org Signed-off-by: Marvi

[dpdk-dev] [PATCH 2/3] vhost: fix packed ring potential buffer overflow

2021-03-24 Thread Marvin Liu
Similar as split ring, the multiple accesses of descriptor length will lead to potential risk. One-time access of descriptor length can eliminate this risk. Fixes: 2f3225a7d69b ("vhost: add vector filling support for packed ring") Cc: sta...@dpdk.org Signed-off-by: Marvin Liu R

[dpdk-dev] [PATCH] vhost: fix accessing uninitialized variables

2021-03-02 Thread Marvin Liu
This patch fixs coverity issue by adding initialization step before using temporary virtio header. Coverity issue: 366181, 366123 Fixes: fb3815cc614d ("vhost: handle virtually non-contiguous buffers in Rx-mrg") Cc: sta...@dpdk.org Signed-off-by: Marvin Liu diff --git a/lib/li

[dpdk-dev] [PATCH] vhost: fix potential buffer overflow

2021-02-25 Thread Marvin Liu
ctor filling support for packed ring") Fixes: 75ed51697820 ("vhost: add packed ring batch dequeue") Signed-off-by: Marvin Liu Cc: sta...@dpdk.org diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c index 583bf379c6..0a7d008a91 100644 --- a/lib/librte_vhost/

[dpdk-dev] [PATCH] vhost: fix packed ring dequeue offloading

2021-02-04 Thread Marvin Liu
rg Signed-off-by: Marvin Liu diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c index 730b92e478..0a7d008a91 100644 --- a/lib/librte_vhost/virtio_net.c +++ b/lib/librte_vhost/virtio_net.c @@ -2267,7 +2267,6 @@ vhost_reserve_avail_batch_packed(struct virtio_net *dev, {

[dpdk-dev] [PATCH] doc: clarify disclosure time slot when no response

2021-01-24 Thread Marvin Liu
zilla process or send out fix patch to public. Signed-off-by: Marvin Liu Signed-off-by: Qian Xu diff --git a/doc/guides/contributing/vulnerability.rst b/doc/guides/contributing/vulnerability.rst index b6300252ad..cda814fa69 100644 --- a/doc/guides/contributing/vulnerability.rst +++ b/doc/g

[dpdk-dev] [PATCH] net/virtio: enable packet data prefetch on x86

2020-11-11 Thread Marvin Liu
Data prefetch instruction can preload data into cpu’s hierarchical cache before data access. Virtio datapath utilized this feature for data access acceleration. As config RTE_PMD_PACKET_PREFETCH was discarded, now packet data prefetch is enabled based on architecture. Signed-off-by: Marvin Liu

[dpdk-dev] [PATCH v3] drivers/net: enable packet data prefetch on x86

2020-11-02 Thread Marvin Liu
generation. Signed-off-by: Marvin Liu --- v3: replace build config with pre-defined architecture macro v2: move define from meson.build to rte_config.h --- diff --git a/drivers/net/e1000/em_rxtx.c b/drivers/net/e1000/em_rxtx.c index 19e3bffd46..5a9cd04c9c 100644 --- a/drivers/net/e1000/em_rxtx.c +++ b

[dpdk-dev] [PATCH] net/virtio: fix invalid indirect desc length

2020-10-14 Thread Marvin Liu
mbuf segments number for calculating correct desc length. Fixes: de8b3d238074 ("net/virtio: fix indirect descs in packed datapaths") Cc: sta...@dpdk.org Signed-off-by: Marvin Liu diff --git a/drivers/net/virtio/virtqueue.h b/drivers/net/virtio/virtqueue.h index 8c8ab9889..42c4c9882 10

[dpdk-dev] [PATCH v3 5/5] vhost: add packed ring vectorized enqueue

2020-10-09 Thread Marvin Liu
Optimize vhost packed ring enqueue path with SIMD instructions. Four descriptors status and length are batched handled with AVX512 instructions. Address translation operations are also accelerated by AVX512 instructions. Signed-off-by: Marvin Liu diff --git a/lib/librte_vhost/vhost.h b/lib

[dpdk-dev] [PATCH v3 2/5] vhost: reuse packed ring functions

2020-10-09 Thread Marvin Liu
Move parse_ethernet, offload, extbuf functions to header file. These functions will be reused by vhost vectorized path. Signed-off-by: Marvin Liu diff --git a/lib/librte_vhost/vhost.h b/lib/librte_vhost/vhost.h index 87583c0b6..12b7699cf 100644 --- a/lib/librte_vhost/vhost.h +++ b/lib

[dpdk-dev] [PATCH v3 4/5] vhost: add packed ring vectorized dequeue

2020-10-09 Thread Marvin Liu
default path. Signed-off-by: Marvin Liu diff --git a/lib/librte_vhost/meson.build b/lib/librte_vhost/meson.build index cc9aa65c6..5eadcbae4 100644 --- a/lib/librte_vhost/meson.build +++ b/lib/librte_vhost/meson.build @@ -8,6 +8,22 @@ endif if has_libnuma == 1 dpdk_conf.set10

[dpdk-dev] [PATCH v3 3/5] vhost: prepare memory regions addresses

2020-10-09 Thread Marvin Liu
Prepare memory regions guest physical addresses for vectorized data path. These information will be utilized by SIMD instructions to find matched region index. Signed-off-by: Marvin Liu diff --git a/lib/librte_vhost/vhost.h b/lib/librte_vhost/vhost.h index 12b7699cf..a19fe9423 100644 --- a/lib

[dpdk-dev] [PATCH v3 0/5] vhost add vectorized data path

2020-10-09 Thread Marvin Liu
* dynamically allocate memory regions structure * remove unlikely hint for in_order v2: * add vIOMMU support * add dequeue offloading * rebase code Marvin Liu (5): vhost: add vectorized data path vhost: reuse packed ring functions vhost: prepare memory regions addresses vhost: add packed ring

[dpdk-dev] [PATCH v3 1/5] vhost: add vectorized data path

2020-10-09 Thread Marvin Liu
requirements. Otherwise will fallback to original data path. Signed-off-by: Marvin Liu diff --git a/doc/guides/nics/vhost.rst b/doc/guides/nics/vhost.rst index d36f3120b..efdaf4de0 100644 --- a/doc/guides/nics/vhost.rst +++ b/doc/guides/nics/vhost.rst @@ -64,6 +64,11 @@ The user can specify

[dpdk-dev] [PATCH 2/2] net/virtio: use indirect ring in packed datapath

2020-09-28 Thread Marvin Liu
Like split ring, packed ring will utilize indirect ring elements when queuing mbufs need multiple descriptors. Thus each packet will take only one slot when having multiple segments. Signed-off-by: Marvin Liu diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c index

[dpdk-dev] [PATCH 1/2] net/virtio: setup Tx region for packed ring

2020-09-28 Thread Marvin Liu
Add packed indirect descriptors format into virtio Tx region. When initializing vring, packed indirect descriptors will be initialized if ring type is packed. Signed-off-by: Marvin Liu diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c index 013a2904e

[dpdk-dev] [PATCH v2] config: enable packet data prefetch

2020-09-22 Thread Marvin Liu
Data prefetch instruction can preload data into cpu’s hierarchical cache before data access. Virtualized data paths like virtio utilized this feature for acceleration. Since most modern cpus have support prefetch function, we can enable packet data prefetch as default. Signed-off-by: Marvin Liu

[dpdk-dev] [PATCH] build: enable packet data prefetch

2020-09-22 Thread Marvin Liu
Data prefetch instruction can preload data into cpu’s hierarchical cache before data access. Virtualized data paths like virtio utilized this feature for acceleration. Since most modern cpus have support prefetch function, we can enable packet data prefetch as default. Signed-off-by: Marvin Liu

[dpdk-dev] [PATCH v2 4/5] vhost: add packed ring vectorized dequeue

2020-09-20 Thread Marvin Liu
default path. Signed-off-by: Marvin Liu diff --git a/lib/librte_vhost/meson.build b/lib/librte_vhost/meson.build index cc9aa65c67..c1481802d7 100644 --- a/lib/librte_vhost/meson.build +++ b/lib/librte_vhost/meson.build @@ -8,6 +8,22 @@ endif if has_libnuma == 1 dpdk_conf.set10

[dpdk-dev] [PATCH v2 5/5] vhost: add packed ring vectorized enqueue

2020-09-20 Thread Marvin Liu
Optimize vhost packed ring enqueue path with SIMD instructions. Four descriptors status and length are batched handled with AVX512 instructions. Address translation operations are also accelerated by AVX512 instructions. Signed-off-by: Marvin Liu diff --git a/lib/librte_vhost/vhost.h b/lib

[dpdk-dev] [PATCH v2 3/5] vhost: prepare memory regions addresses

2020-09-20 Thread Marvin Liu
Prepare memory regions guest physical addresses for vectorized data path. These information will be utilized by SIMD instructions to find matched region index. Signed-off-by: Marvin Liu diff --git a/lib/librte_vhost/vhost.h b/lib/librte_vhost/vhost.h index 5a5c945551..4a81f18f01 100644 --- a

[dpdk-dev] [PATCH v2 0/5] vhost add vectorized data path

2020-09-20 Thread Marvin Liu
vectorized function, vhost will fallback to use default batch function. There will be no impact in current data path. v2: * add vIOMMU support * add dequeue offloading * rebase code Marvin Liu (5): vhost: add vectorized data path vhost: reuse packed ring functions vhost: prepare memory

[dpdk-dev] [PATCH v2 2/5] vhost: reuse packed ring functions

2020-09-20 Thread Marvin Liu
Move parse_ethernet, offload, extbuf functions to header file. These functions will be reused by vhost vectorized path. Signed-off-by: Marvin Liu diff --git a/lib/librte_vhost/vhost.h b/lib/librte_vhost/vhost.h index b556eb3bf6..5a5c945551 100644 --- a/lib/librte_vhost/vhost.h +++ b/lib

[dpdk-dev] [PATCH v2 1/5] vhost: add vectorized data path

2020-09-20 Thread Marvin Liu
requirements. Otherwise will fallback to original data path. Signed-off-by: Marvin Liu diff --git a/doc/guides/nics/vhost.rst b/doc/guides/nics/vhost.rst index d36f3120b2..efdaf4de09 100644 --- a/doc/guides/nics/vhost.rst +++ b/doc/guides/nics/vhost.rst @@ -64,6 +64,11 @@ The user can specify

[dpdk-dev] [PATCH v1 5/5] vhost: add packed ring vectorized enqueue

2020-08-18 Thread Marvin Liu
Optimize vhost packed ring enqueue path with SIMD instructions. Four descriptors status and length are batched handled with AVX512 instructions. Address translation operations are also accelerated by AVX512 instructions. Signed-off-by: Marvin Liu diff --git a/lib/librte_vhost/vhost.h b/lib

[dpdk-dev] [PATCH v1 4/5] vhost: add packed ring vectorized dequeue

2020-08-18 Thread Marvin Liu
default path. Signed-off-by: Marvin Liu diff --git a/lib/librte_vhost/Makefile b/lib/librte_vhost/Makefile index 4f2f3e47da..c0cd7d498f 100644 --- a/lib/librte_vhost/Makefile +++ b/lib/librte_vhost/Makefile @@ -31,6 +31,13 @@ CFLAGS += -DVHOST_ICC_UNROLL_PRAGMA endif endif +ifneq

[dpdk-dev] [PATCH v1 0/5] vhost add vectorized data path

2020-08-18 Thread Marvin Liu
vectorized function, vhost will fallback to use default batch function. There will be no impact in current data path. Marvin Liu (5): vhost: add vectorized data path vhost: reuse packed ring functions vhost: prepare memory regions addresses vhost: add packed ring vectorized dequeue vhost

[dpdk-dev] [PATCH v1 3/5] vhost: prepare memory regions addresses

2020-08-18 Thread Marvin Liu
Prepare memory regions guest physical addresses for vectorized data path. These information will be utilized by SIMD instructions to find matched region index. Signed-off-by: Marvin Liu diff --git a/lib/librte_vhost/vhost.h b/lib/librte_vhost/vhost.h index 5a5c945551..4a81f18f01 100644 --- a

[dpdk-dev] [PATCH v1 1/5] vhost: add vectorized data path

2020-08-18 Thread Marvin Liu
requirements. Otherwise will fallback to original data path. Signed-off-by: Marvin Liu diff --git a/doc/guides/nics/vhost.rst b/doc/guides/nics/vhost.rst index d36f3120b2..efdaf4de09 100644 --- a/doc/guides/nics/vhost.rst +++ b/doc/guides/nics/vhost.rst @@ -64,6 +64,11 @@ The user can specify

[dpdk-dev] [PATCH v1 2/5] vhost: reuse packed ring functions

2020-08-18 Thread Marvin Liu
Move parse_ethernet, offload, extbuf functions to header file. These functions will be reused by vhost vectorized path. Signed-off-by: Marvin Liu diff --git a/lib/librte_vhost/vhost.h b/lib/librte_vhost/vhost.h index b556eb3bf6..5a5c945551 100644 --- a/lib/librte_vhost/vhost.h +++ b/lib

[dpdk-dev] [PATCH v2] net/virtio: fix unexpected event after reconnect

2020-05-14 Thread Marvin Liu
acked ring server mode") Cc: sta...@dpdk.org Signed-off-by: Marvin Liu --- v2: commit log update and cc stable diff --git a/drivers/net/virtio/virtqueue.c b/drivers/net/virtio/virtqueue.c index 0b4e3bf3e..02c8b9fc5 100644 --- a/drivers/net/virtio/virtqueue.c +++ b/drivers/net/virtio/virtqueue.c

[dpdk-dev] [PATCH] net/virtio: disable event suppression when reconnect

2020-05-14 Thread Marvin Liu
Event suppression should be disabled after virtqueue initialization. It can be enabled by calling rte_eth_dev_rx_intr_enable later. Signed-off-by: Marvin Liu diff --git a/drivers/net/virtio/virtqueue.c b/drivers/net/virtio/virtqueue.c index 408bba236a..2702e120ee 100644 --- a/drivers/net/virtio

[dpdk-dev] [PATCH] net/virtio: remove duplicated runtime check

2020-05-12 Thread Marvin Liu
Runtime checks for vectorized datapath are organized into device configuration function. Remove duplicated check in device init function. Signed-off-by: Marvin Liu diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c index 49ccef12c7..312871cb48 100644 --- a

[dpdk-dev] [PATCH v2] net/virtio: fix crash when device reconnecting

2020-05-06 Thread Marvin Liu
been initialized, there's no need to reset queues. Fixes: 6ebbf4109f35 ("net/virtio-user: fix packed ring server mode") Signed-off-by: Marvin Liu diff --git a/drivers/net/virtio/virtio_user_ethdev.c b/drivers/net/virtio/virtio_user_ethdev.c index c54698ad1..55bd81f0b 100644 ---

[dpdk-dev] [PATCH] net/virtio: fix 32-bit build with clang 6.0.0

2020-05-05 Thread Marvin Liu
'_mm512_maskz_set1_epi64' is invalid in C99 [-Wimplicit-function-declaration] Fixes: 8d35836e4a7c ("net/virtio: add vectorized packed ring Rx path") Signed-off-by: Marvin Liu diff --git a/drivers/net/virtio/virtio_rxtx_packed_avx.c b/drivers/net/virtio/virtio_rxtx_packed_avx.c index

[dpdk-dev] [PATCH v12 6/9] net/virtio: add vectorized packed ring Rx path

2020-04-29 Thread Marvin Liu
Optimize packed ring Rx path with SIMD instructions. Solution of optimization is pretty like vhost, is that split path into batch and single functions. Batch function is further optimized by AVX512 instructions. Signed-off-by: Marvin Liu Reviewed-by: Maxime Coquelin diff --git a/drivers/net

[dpdk-dev] [PATCH v12 9/9] doc: add packed vectorized path

2020-04-29 Thread Marvin Liu
Document packed virtqueue vectorized path selection logic in virtio net PMD. Signed-off-by: Marvin Liu Reviewed-by: Maxime Coquelin diff --git a/doc/guides/nics/virtio.rst b/doc/guides/nics/virtio.rst index fdd0790e0..226f4308d 100644 --- a/doc/guides/nics/virtio.rst +++ b/doc/guides/nics

[dpdk-dev] [PATCH v12 5/9] net/virtio: reuse packed ring functions

2020-04-29 Thread Marvin Liu
Move offload, xmit cleanup and packed xmit enqueue function to header file. These functions will be reused by packed ring vectorized path. Signed-off-by: Marvin Liu Reviewed-by: Maxime Coquelin diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c index 84f4cf946

[dpdk-dev] [PATCH v12 7/9] net/virtio: add vectorized packed ring Tx path

2020-04-29 Thread Marvin Liu
Optimize packed ring Tx path like Rx path. Split Tx path into batch and single Tx functions. Batch function is further optimized by AVX512 instructions. Signed-off-by: Marvin Liu Reviewed-by: Maxime Coquelin diff --git a/drivers/net/virtio/virtio_ethdev.h b/drivers/net/virtio/virtio_ethdev.h

[dpdk-dev] [PATCH v12 8/9] net/virtio: add election for vectorized path

2020-04-29 Thread Marvin Liu
not negotiated LRO offloading is disabled Split ring vectorized rx path need: mergeable and IN_ORDER features are not negotiated LRO, chksum and vlan strip offloadings are disabled Signed-off-by: Marvin Liu Reviewed-by: Maxime Coquelin diff --git a/drivers/net/virtio/virtio_ethdev.c

[dpdk-dev] [PATCH v12 4/9] net/virtio-user: add vectorized devarg

2020-04-29 Thread Marvin Liu
Add new devarg for virtio user device vectorized path selection. By default vectorized path is disabled. Signed-off-by: Marvin Liu Reviewed-by: Maxime Coquelin diff --git a/doc/guides/nics/virtio.rst b/doc/guides/nics/virtio.rst index a67774e91..fdd0790e0 100644 --- a/doc/guides/nics

[dpdk-dev] [PATCH v12 2/9] net/virtio: inorder should depend on feature bit

2020-04-29 Thread Marvin Liu
Ring initialization is different when inorder feature negotiated. This action should dependent on negotiated feature bits. Signed-off-by: Marvin Liu Reviewed-by: Maxime Coquelin diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c index 94ba7a3ec..e450477e8 100644

[dpdk-dev] [PATCH v12 3/9] net/virtio: add vectorized devarg

2020-04-29 Thread Marvin Liu
Previously, virtio split ring vectorized path was enabled by default. This is not suitable for everyone because that path dose not follow virtio spec. Add new devarg for virtio vectorized path selection. By default vectorized path is disabled. Signed-off-by: Marvin Liu Reviewed-by: Maxime

[dpdk-dev] [PATCH v12 0/9] add packed ring vectorized path

2020-04-29 Thread Marvin Liu
nge * add 'packed_vec' option in virtio_user vdev * fix build not check whether AVX512 enabled * doc update Tested-by: Wang, Yinan Marvin Liu (9): net/virtio: add Rx free threshold setting net/virtio: inorder should depend on feature bit net/virtio: add vectorized devarg net/

[dpdk-dev] [PATCH v12 1/9] net/virtio: add Rx free threshold setting

2020-04-29 Thread Marvin Liu
Introduce free threshold setting in Rx queue, its default value is 32. Limit the threshold size to multiple of four as only vectorized packed Rx function will utilize it. Virtio driver will rearm Rx queue when more than rx_free_thresh descs were dequeued. Signed-off-by: Marvin Liu Reviewed-by

[dpdk-dev] [PATCH v4 1/2] vhost: utilize dpdk dynamic memory allocator

2020-04-28 Thread Marvin Liu
Replace dynamic memory allocator with dpdk memory allocator. Signed-off-by: Marvin Liu Reviewed-by: Maxime Coquelin diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c index bd1be0104..79fcb9d19 100644 --- a/lib/librte_vhost/vhost_user.c +++ b/lib/librte_vhost

[dpdk-dev] [PATCH v4 2/2] vhost: binary search address mapping table

2020-04-28 Thread Marvin Liu
If Tx zero copy enabled, gpa to hpa mapping table is updated one by one. This will harm performance when guest memory backend using 2M hugepages. Now utilize binary search to find the entry in mapping table, meanwhile set the threshold to 256 entries for linear search. Signed-off-by: Marvin Liu

[dpdk-dev] [PATCH v4 1/2] vhost: utilize dpdk dynamic memory allocator

2020-04-28 Thread Marvin Liu
Replace dynamic memory allocator with dpdk memory allocator. Signed-off-by: Marvin Liu diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c index bd1be0104..79fcb9d19 100644 --- a/lib/librte_vhost/vhost_user.c +++ b/lib/librte_vhost/vhost_user.c @@ -191,7 +191,7

[dpdk-dev] [PATCH v4 2/2] vhost: utilize dpdk dynamic memory allocator

2020-04-28 Thread Marvin Liu
Replace dynamic memory allocator with dpdk memory allocator. Signed-off-by: Marvin Liu Reviewed-by: Maxime Coquelin diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c index bd1be0104..79fcb9d19 100644 --- a/lib/librte_vhost/vhost_user.c +++ b/lib/librte_vhost

[dpdk-dev] [PATCH v4 2/2] vhost: binary search address mapping table

2020-04-28 Thread Marvin Liu
If Tx zero copy enabled, gpa to hpa mapping table is updated one by one. This will harm performance when guest memory backend using 2M hugepages. Now utilize binary search to find the entry in mapping table, meanwhile set the threshold to 256 entries for linear search. Signed-off-by: Marvin Liu

[dpdk-dev] [PATCH v4 1/2] net/virtio: add support Virtio link speed feature

2020-04-28 Thread Marvin Liu
From: Ivan Dyukov This patch adds a support of VIRTIO_NET_F_SPEED_DUPLEX feature for virtio driver. There are two ways to specify speed of the link: 'speed' devarg negotiate speed from qemu via VIRTIO_NET_F_SPEED_DUPLEX The highest priority is devarg. If devarg is not specified, drivers tr

[dpdk-dev] [PATCH v3 2/2] vhost: binary search address mapping table

2020-04-28 Thread Marvin Liu
If Tx zero copy enabled, gpa to hpa mapping table is updated one by one. This will harm performance when guest memory backend using 2M hugepages. Now utilize binary search to find the entry in mapping table, meanwhile set threshold to 256 entries for linear search. Signed-off-by: Marvin Liu

[dpdk-dev] [PATCH v3 1/2] vhost: utilize dpdk dynamic memory allocator

2020-04-28 Thread Marvin Liu
Replace dynamic memory allocator with dpdk memory allocator. Signed-off-by: Marvin Liu diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c index bd1be0104..79fcb9d19 100644 --- a/lib/librte_vhost/vhost_user.c +++ b/lib/librte_vhost/vhost_user.c @@ -191,7 +191,7

[dpdk-dev] [PATCH v11 9/9] doc: add packed vectorized path

2020-04-28 Thread Marvin Liu
Document packed virtqueue vectorized path selection logic in virtio net PMD. Signed-off-by: Marvin Liu Reviewed-by: Maxime Coquelin diff --git a/doc/guides/nics/virtio.rst b/doc/guides/nics/virtio.rst index fdd0790e0..226f4308d 100644 --- a/doc/guides/nics/virtio.rst +++ b/doc/guides/nics

[dpdk-dev] [PATCH v11 5/9] net/virtio: reuse packed ring functions

2020-04-28 Thread Marvin Liu
Move offload, xmit cleanup and packed xmit enqueue function to header file. These functions will be reused by packed ring vectorized path. Signed-off-by: Marvin Liu Reviewed-by: Maxime Coquelin diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c index 84f4cf946

[dpdk-dev] [PATCH v11 7/9] net/virtio: add vectorized packed ring Tx path

2020-04-28 Thread Marvin Liu
Optimize packed ring Tx path like Rx path. Split Tx path into batch and single Tx functions. Batch function is further optimized by AVX512 instructions. Signed-off-by: Marvin Liu Reviewed-by: Maxime Coquelin diff --git a/drivers/net/virtio/virtio_ethdev.h b/drivers/net/virtio/virtio_ethdev.h

[dpdk-dev] [PATCH v11 6/9] net/virtio: add vectorized packed ring Rx path

2020-04-28 Thread Marvin Liu
one batch. Signed-off-by: Marvin Liu Reviewed-by: Maxime Coquelin diff --git a/drivers/net/virtio/Makefile b/drivers/net/virtio/Makefile index c9edb84ee..102b1deab 100644 --- a/drivers/net/virtio/Makefile +++ b/drivers/net/virtio/Makefile @@ -36,6 +36,41 @@ else ifneq ($(filter y

[dpdk-dev] [PATCH v11 8/9] net/virtio: add election for vectorized path

2020-04-28 Thread Marvin Liu
not negotiated LRO offloading is disabled Split ring vectorized rx path need: mergeable and IN_ORDER features are not negotiated LRO, chksum and vlan strip offloadings are disabled Signed-off-by: Marvin Liu Reviewed-by: Maxime Coquelin diff --git a/drivers/net/virtio/virtio_ethdev.c

[dpdk-dev] [PATCH v11 3/9] net/virtio: add vectorized devarg

2020-04-28 Thread Marvin Liu
Previously, virtio split ring vectorized path was enabled by default. This is not suitable for everyone because that path dose not follow virtio spec. Add new devarg for virtio vectorized path selection. By default vectorized path is disabled. Signed-off-by: Marvin Liu Reviewed-by: Maxime

[dpdk-dev] [PATCH v11 4/9] net/virtio-user: add vectorized devarg

2020-04-28 Thread Marvin Liu
Add new devarg for virtio user device vectorized path selection. By default vectorized path is disabled. Signed-off-by: Marvin Liu Reviewed-by: Maxime Coquelin diff --git a/doc/guides/nics/virtio.rst b/doc/guides/nics/virtio.rst index a67774e91..fdd0790e0 100644 --- a/doc/guides/nics

[dpdk-dev] [PATCH v11 1/9] net/virtio: add Rx free threshold setting

2020-04-28 Thread Marvin Liu
Introduce free threshold setting in Rx queue, its default value is 32. Limit the threshold size to multiple of four as only vectorized packed Rx function will utilize it. Virtio driver will rearm Rx queue when more than rx_free_thresh descs were dequeued. Signed-off-by: Marvin Liu Reviewed-by

[dpdk-dev] [PATCH v11 2/9] net/virtio: inorder should depend on feature bit

2020-04-28 Thread Marvin Liu
Ring initialization is different when inorder feature negotiated. This action should dependent on negotiated feature bits. Signed-off-by: Marvin Liu Reviewed-by: Maxime Coquelin diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c index 94ba7a3ec..e450477e8 100644

[dpdk-dev] [PATCH v11 0/9] add packed ring vectorized path

2020-04-28 Thread Marvin Liu
ix build not check whether AVX512 enabled * doc update Tested-by: Wang, Yinan Marvin Liu (9): net/virtio: add Rx free threshold setting net/virtio: inorder should depend on feature bit net/virtio: add vectorized devarg net/virtio-user: add vectorized devarg net/virtio: reuse packed ring

[dpdk-dev] [PATCH v10 6/9] net/virtio: add vectorized packed ring Rx path

2020-04-25 Thread Marvin Liu
one batch. Signed-off-by: Marvin Liu diff --git a/drivers/net/virtio/Makefile b/drivers/net/virtio/Makefile index c9edb84ee..102b1deab 100644 --- a/drivers/net/virtio/Makefile +++ b/drivers/net/virtio/Makefile @@ -36,6 +36,41 @@ else ifneq ($(filter y,$(CONFIG_RTE_ARCH_ARM

[dpdk-dev] [PATCH v10 9/9] doc: add packed vectorized path

2020-04-25 Thread Marvin Liu
Document packed virtqueue vectorized path selection logic in virtio net PMD. Signed-off-by: Marvin Liu Reviewed-by: Maxime Coquelin diff --git a/doc/guides/nics/virtio.rst b/doc/guides/nics/virtio.rst index d59add23e..dbcf49ae1 100644 --- a/doc/guides/nics/virtio.rst +++ b/doc/guides/nics

[dpdk-dev] [PATCH v10 5/9] net/virtio: reuse packed ring functions

2020-04-25 Thread Marvin Liu
Move offload, xmit cleanup and packed xmit enqueue function to header file. These functions will be reused by packed ring vectorized path. Signed-off-by: Marvin Liu diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c index 84f4cf946..a549991aa 100644 --- a/drivers

[dpdk-dev] [PATCH v10 8/9] net/virtio: add election for vectorized path

2020-04-25 Thread Marvin Liu
not negotiated LRO offloading is disabled Split ring vectorized rx path need: mergeable and IN_ORDER features are not negotiated LRO, chksum and vlan strip offloadings are disabled Signed-off-by: Marvin Liu Reviewed-by: Maxime Coquelin diff --git a/drivers/net/virtio/virtio_ethdev.c

[dpdk-dev] [PATCH v10 7/9] net/virtio: add vectorized packed ring Tx path

2020-04-25 Thread Marvin Liu
Optimize packed ring Tx path like Rx path. Split Tx path into batch and single Tx functions. Batch function is further optimized by AVX512 instructions. Signed-off-by: Marvin Liu diff --git a/drivers/net/virtio/virtio_ethdev.h b/drivers/net/virtio/virtio_ethdev.h index 5c112cac7..b7d52d497

[dpdk-dev] [PATCH v10 3/9] net/virtio: add vectorized devarg

2020-04-25 Thread Marvin Liu
Previously, virtio split ring vectorized path was enabled by default. This is not suitable for everyone because that path dose not follow virtio spec. Add new devarg for virtio vectorized path selection. By default vectorized path is disabled. Signed-off-by: Marvin Liu Reviewed-by: Maxime

[dpdk-dev] [PATCH v9 0/9] add packed ring vectorized path

2020-04-25 Thread Marvin Liu
formance * disable 'packed_vec' by default v2: * more function blocks replaced by vector instructions * clean virtio_net_hdr by vector instruction * allow header room size change * add 'packed_vec' option in virtio_user vdev * fix build not check whether AVX512 enabled * doc

[dpdk-dev] [PATCH v10 1/9] net/virtio: add Rx free threshold setting

2020-04-25 Thread Marvin Liu
Introduce free threshold setting in Rx queue, its default value is 32. Limit the threshold size to multiple of four as only vectorized packed Rx function will utilize it. Virtio driver will rearm Rx queue when more than rx_free_thresh descs were dequeued. Signed-off-by: Marvin Liu Reviewed-by

[dpdk-dev] [PATCH v10 2/9] net/virtio: inorder should depend on feature bit

2020-04-25 Thread Marvin Liu
Ring initialization is different when inorder feature negotiated. This action should dependent on negotiated feature bits. Signed-off-by: Marvin Liu Reviewed-by: Maxime Coquelin diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c index 94ba7a3ec..e450477e8 100644

[dpdk-dev] [PATCH v10 4/9] net/virtio-user: add vectorized devarg

2020-04-25 Thread Marvin Liu
Add new devarg for virtio user device vectorized path selection. By default vectorized path is disabled. Signed-off-by: Marvin Liu diff --git a/doc/guides/nics/virtio.rst b/doc/guides/nics/virtio.rst index 902a1f0cf..d59add23e 100644 --- a/doc/guides/nics/virtio.rst +++ b/doc/guides/nics

[dpdk-dev] [PATCH v9 9/9] doc: add packed vectorized path

2020-04-23 Thread Marvin Liu
Document packed virtqueue vectorized path selection logic in virtio net PMD. Signed-off-by: Marvin Liu diff --git a/doc/guides/nics/virtio.rst b/doc/guides/nics/virtio.rst index d59add23e..dbcf49ae1 100644 --- a/doc/guides/nics/virtio.rst +++ b/doc/guides/nics/virtio.rst @@ -482,6 +482,13

[dpdk-dev] [PATCH v9 8/9] net/virtio: add election for vectorized path

2020-04-23 Thread Marvin Liu
not negotiated LRO offloading is disabled Split ring vectorized rx path need: mergeable and IN_ORDER features are not negotiated LRO, chksum and vlan strip offloadings are disabled Signed-off-by: Marvin Liu diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio

[dpdk-dev] [PATCH v9 3/9] net/virtio: add vectorized devarg

2020-04-23 Thread Marvin Liu
Previously, virtio split ring vectorized path was enabled by default. This is not suitable for everyone because that path dose not follow virtio spec. Add new devarg for virtio vectorized path selection. By default vectorized path is disabled. Signed-off-by: Marvin Liu diff --git a/doc/guides

[dpdk-dev] [PATCH v9 7/9] net/virtio: add vectorized packed ring Tx path

2020-04-23 Thread Marvin Liu
Optimize packed ring Tx path alike Rx path. Split Tx path into batch and single Tx functions. Batch function is further optimized by AVX512 instructions. Signed-off-by: Marvin Liu diff --git a/drivers/net/virtio/virtio_ethdev.h b/drivers/net/virtio/virtio_ethdev.h index 5c112cac7..b7d52d497

[dpdk-dev] [PATCH v9 4/9] net/virtio-user: add vectorized devarg

2020-04-23 Thread Marvin Liu
Add new devarg for virtio user device vectorized path selection. By default vectorized path is disabled. Signed-off-by: Marvin Liu diff --git a/doc/guides/nics/virtio.rst b/doc/guides/nics/virtio.rst index 902a1f0cf..d59add23e 100644 --- a/doc/guides/nics/virtio.rst +++ b/doc/guides/nics

[dpdk-dev] [PATCH v9 6/9] net/virtio: reuse packed ring xmit functions

2020-04-23 Thread Marvin Liu
Move xmit offload and packed ring xmit enqueue function to header file. These functions will be reused by packed ring vectorized Tx function. Signed-off-by: Marvin Liu diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c index c9b6e7844..cf18fe564 100644 --- a

[dpdk-dev] [PATCH v9 5/9] net/virtio: add vectorized packed ring Rx path

2020-04-23 Thread Marvin Liu
one batch. Signed-off-by: Marvin Liu diff --git a/drivers/net/virtio/Makefile b/drivers/net/virtio/Makefile index c9edb84ee..102b1deab 100644 --- a/drivers/net/virtio/Makefile +++ b/drivers/net/virtio/Makefile @@ -36,6 +36,41 @@ else ifneq ($(filter y,$(CONFIG_RTE_ARCH_ARM

[dpdk-dev] [PATCH v9 2/9] net/virtio: inorder should depend on feature bit

2020-04-23 Thread Marvin Liu
Ring initialization is different when inorder feature negotiated. This action should dependent on negotiated feature bits. Signed-off-by: Marvin Liu Reviewed-by: Maxime Coquelin diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c index 94ba7a3ec..e450477e8 100644

[dpdk-dev] [PATCH v9 1/9] net/virtio: add Rx free threshold setting

2020-04-23 Thread Marvin Liu
Introduce free threshold setting in Rx queue, its default value is 32. Limit the threshold size to multiple of four as only vectorized packed Rx function will utilize it. Virtio driver will rearm Rx queue when more than rx_free_thresh descs were dequeued. Signed-off-by: Marvin Liu Reviewed-by

[dpdk-dev] [PATCH v9 0/9] add packed ring vectorized path

2020-04-23 Thread Marvin Liu
#x27; by default v2: * more function blocks replaced by vector instructions * clean virtio_net_hdr by vector instruction * allow header room size change * add 'packed_vec' option in virtio_user vdev * fix build not check whether AVX512 enabled * doc update Tested-by: Wang, Yinan Marvi

[dpdk-dev] [PATCH v8 8/9] net/virtio: add election for vectorized path

2020-04-22 Thread Marvin Liu
LRO, chksum and vlan strip offloading are disabled Signed-off-by: Marvin Liu diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c index 361c834a9..c700af6be 100644 --- a/drivers/net/virtio/virtio_ethdev.c +++ b/drivers/net/virtio/virtio_ethdev.c @@ -1522,9

[dpdk-dev] [PATCH v8 9/9] doc: add packed vectorized path

2020-04-22 Thread Marvin Liu
Document packed virtqueue vectorized path selection logic in virtio net PMD. Signed-off-by: Marvin Liu diff --git a/doc/guides/nics/virtio.rst b/doc/guides/nics/virtio.rst index 6286286db..4bd46f83e 100644 --- a/doc/guides/nics/virtio.rst +++ b/doc/guides/nics/virtio.rst @@ -417,6 +417,10

[dpdk-dev] [PATCH v8 7/9] net/virtio: add vectorized packed ring Tx path

2020-04-22 Thread Marvin Liu
Optimize packed ring Tx path alike Rx path. Split Tx path into batch and single Tx functions. Batch function is further optimized by vector instructions. Signed-off-by: Marvin Liu diff --git a/drivers/net/virtio/virtio_ethdev.h b/drivers/net/virtio/virtio_ethdev.h index 5c112cac7..b7d52d497

[dpdk-dev] [PATCH v8 6/9] net/virtio: reuse packed ring xmit functions

2020-04-22 Thread Marvin Liu
Move xmit offload and packed ring xmit enqueue function to header file. These functions will be reused by packed ring vectorized Tx function. Signed-off-by: Marvin Liu diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c index 7b65d0b0a..cf18fe564 100644 --- a

[dpdk-dev] [PATCH v8 3/9] net/virtio: inorder should depend on feature bit

2020-04-22 Thread Marvin Liu
Ring initialzation is different when inorder feature negotiated. This action should dependent on negotiated feature bits. Signed-off-by: Marvin Liu diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c index 94ba7a3ec..e450477e8 100644 --- a/drivers/net/virtio

[dpdk-dev] [PATCH v8 5/9] net/virtio: add vectorized packed ring Rx path

2020-04-22 Thread Marvin Liu
16 bytes aligned, thus four elements will be saved in one batch. Signed-off-by: Marvin Liu diff --git a/drivers/net/virtio/Makefile b/drivers/net/virtio/Makefile index 4b69827ab..de0b00e50 100644 --- a/drivers/net/virtio/Makefile +++ b/drivers/net/virtio/Makefile @@ -36,6 +36,41 @@ SRCS

  1   2   3   4   5   >