[dpdk-dev] [PATCH v5 4/9] net/virtio-user: add vectorized path parameter

2020-04-16 Thread Marvin Liu
Add new parameter "vectorized" which can select vectorized path explicitly. This parameter will work when RTE_LIBRTE_VIRTIO_INC_VECTOR option is yes. When "vectorized" is set, driver will check both compiling environment and running environment when selecting path. Signe

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

2020-04-16 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 v5 5/9] net/virtio: add vectorized packed ring Rx path

2020-04-16 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 9ef445bc9..4d20cb61a 100644 --- a/drivers/net/virtio/Makefile +++ b/drivers/net/virtio/Makefile @@ -37,6 +37,40 @@ SRCS

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

2020-04-16 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 10e39670e..c9aaef0af

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

2020-04-16 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 4c7d60ca0..de4cef843 100644 --- a/drivers/net/virtio/virtio_ethdev.c +++ b/drivers/net/virtio/virtio_ethdev.c @@ -1518,9

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

2020-04-16 Thread Marvin Liu
Document packed virtqueue vectorized path selection logic in virtio net PMD. Add packed virtqueue vectorized path features to new ini file. Signed-off-by: Marvin Liu diff --git a/doc/guides/nics/features/virtio-packed_vec.ini b/doc/guides/nics/features/virtio-packed_vec.ini new file mode

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

2020-04-16 Thread Marvin Liu
Introduce free threshold setting in Rx queue, default value of it is 32. Limiated 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 diff --git a

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

2020-04-16 Thread Marvin Liu
3. allow header room size change 4. add 'packed_vec' option in virtio_user vdev 5. fix build not check whether AVX512 enabled 6. doc update Marvin Liu (9): net/virtio: add Rx free threshold setting net/virtio: enable vectorized path net/virtio: inorder should depend on feature bit ne

[dpdk-dev] [PATCH v6 2/9] net/virtio: enable vectorized path

2020-04-16 Thread Marvin Liu
Previously, virtio split ring vectorized path is enabled as default. This is not suitable for everyone because of that path not follow virtio spec. Add new config for virtio vectorized path selection. By default vectorized path is enabled. Signed-off-by: Marvin Liu diff --git a/config

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

2020-04-16 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 v6 4/9] net/virtio-user: add vectorized path parameter

2020-04-16 Thread Marvin Liu
Add new parameter "vectorized" which can select vectorized path explicitly. This parameter will work when RTE_LIBRTE_VIRTIO_INC_VECTOR option is yes. When "vectorized" is set, driver will check both compiling environment and running environment when selecting path. Signe

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

2020-04-16 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 9ef445bc9..4d20cb61a 100644 --- a/drivers/net/virtio/Makefile +++ b/drivers/net/virtio/Makefile @@ -37,6 +37,40 @@ SRCS

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

2020-04-16 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 v6 7/9] net/virtio: add vectorized packed ring Tx path

2020-04-16 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 10e39670e..c9aaef0af

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

2020-04-16 Thread Marvin Liu
Document packed virtqueue vectorized path selection logic in virtio net PMD. Add packed virtqueue vectorized path features to new ini file. Signed-off-by: Marvin Liu diff --git a/doc/guides/nics/features/virtio-packed_vec.ini b/doc/guides/nics/features/virtio-packed_vec.ini new file mode

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

2020-04-16 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 4c7d60ca0..de4cef843 100644 --- a/drivers/net/virtio/virtio_ethdev.c +++ b/drivers/net/virtio/virtio_ethdev.c @@ -1518,9

[dpdk-dev] [PATCH] vhost: fix shadowed descs not flushed

2020-04-16 Thread Marvin Liu
descs directly") Cc: sta...@dpdk.org Signed-off-by: Marvin Liu diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c index 210415904..39afb2b4d 100644 --- a/lib/librte_vhost/virtio_net.c +++ b/lib/librte_vhost/virtio_net.c @@ -43,6 +43,36 @@ is_valid_virt_queue_idx(uint32_t idx,

[dpdk-dev] [PATCH v2] vhost: fix shadow update

2020-04-16 Thread Marvin Liu
te is deferred. That will harm RFC2544 throughput. Appropriate choice is to remove deferred shadowed update method. Now shadowed used descs are flushed at the end of dequeue function. Fixes: 31d6c6a5b820 ("vhost: optimize packed ring dequeue") Cc: sta...@dpdk.org Signed-off-by: Marvin

[dpdk-dev] [PATCH v7 2/9] net/virtio: enable vectorized path

2020-04-21 Thread Marvin Liu
Previously, virtio split ring vectorized path is enabled as default. This is not suitable for everyone because of that path not follow virtio spec. Add new config for virtio vectorized path selection. By default vectorized path is disabled. Signed-off-by: Marvin Liu diff --git a/config

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

2020-04-21 Thread Marvin Liu
w header room size change 4. add 'packed_vec' option in virtio_user vdev 5. fix build not check whether AVX512 enabled 6. doc update Marvin Liu (9): net/virtio: add Rx free threshold setting net/virtio: enable vectorized path net/virtio: inorder should depend on feature bit net/virtio

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

2020-04-21 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 v7 1/9] net/virtio: add Rx free threshold setting

2020-04-21 Thread Marvin Liu
Introduce free threshold setting in Rx queue, default value of it is 32. Limiated 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 diff --git a

[dpdk-dev] [PATCH v7 4/9] net/virtio-user: add vectorized path parameter

2020-04-21 Thread Marvin Liu
Add new parameter "vectorized" which can select vectorized path explicitly. This parameter will work when RTE_LIBRTE_VIRTIO_INC_VECTOR option is yes. When "vectorized" is set, driver will check both compiling environment and running environment when selecting path. Signe

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

2020-04-21 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

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

2020-04-21 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 v7 7/9] net/virtio: add vectorized packed ring Tx path

2020-04-21 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 v7 9/9] doc: add packed vectorized path

2020-04-21 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 v7 8/9] net/virtio: add election for vectorized path

2020-04-21 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 0/9] add packed ring vectorized path

2020-04-22 Thread Marvin Liu
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 Marvin Liu (9): net/virtio: add Rx free threshold setting net/virtio: enable vectorized path net/virtio: inord

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

2020-04-22 Thread Marvin Liu
Introduce free threshold setting in Rx queue, default value of it is 32. Limiated 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 diff --git a

[dpdk-dev] [PATCH v8 2/9] net/virtio: enable vectorized path

2020-04-22 Thread Marvin Liu
Previously, virtio split ring vectorized path is enabled as default. This is not suitable for everyone because of that path not follow virtio spec. Add new config for virtio vectorized path selection. By default vectorized path is disabled. Signed-off-by: Marvin Liu diff --git a/config

[dpdk-dev] [PATCH v8 4/9] net/virtio-user: add vectorized path parameter

2020-04-22 Thread Marvin Liu
Add new parameter "vectorized" which can select vectorized path explicitly. This parameter will work when RTE_LIBRTE_VIRTIO_INC_VECTOR option is yes. When "vectorized" is set, driver will check both compiling environment and running environment when selecting path. Signe

[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

[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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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] 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: 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 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 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 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 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 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 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 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 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] 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 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: 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] 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 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 v2 2/2] vhost: cache gpa to hpa translation

2020-04-01 Thread Marvin Liu
table if no match found. Signed-off-by: Marvin Liu diff --git a/lib/librte_vhost/vhost.h b/lib/librte_vhost/vhost.h index 2087d1400..5cb0e83dd 100644 --- a/lib/librte_vhost/vhost.h +++ b/lib/librte_vhost/vhost.h @@ -368,7 +368,9 @@ struct virtio_net { struct vhost_device_ops const

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

2020-04-01 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] vhost: remove deferred shadow update

2020-04-01 Thread Marvin Liu
deferred. Thus will harm RFC2544 performance. Solution is just remove deferred shadow update, which will help RFC2544 and fix potential issue with virtio net driver. Signed-off-by: Marvin Liu diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c index 37c47c7dc..2ba0575a7 100644

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

2020-04-07 Thread Marvin Liu
Introduce free threshold setting in Rx queue, default value of it is 32. Limiated 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 diff --git a

[dpdk-dev] [PATCH v3 5/7] net/virtio: add vectorized packed ring Tx datapath

2020-04-07 Thread Marvin Liu
Optimize packed ring Tx datapath alike Rx datapath. Split Tx datapath into batch and single Tx functions. Batch function 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 10e39670e

[dpdk-dev] [PATCH v3 4/7] net/virtio: reuse packed ring xmit functions

2020-04-07 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 ac417232b..b8b4d3c25 100644 --- a

[dpdk-dev] [PATCH v3 2/7] net/virtio-user: add vectorized packed ring parameter

2020-04-07 Thread Marvin Liu
Add new parameter "packed_vec" which can disable vectorized packed ring datapath explicitly. When "packed_vec" option is on, driver will check packed ring vectorized datapath prerequisites. If any one of them not matched, vectorized datapath won't be selected. Signed-

[dpdk-dev] [PATCH v3 3/7] net/virtio: add vectorized packed ring Rx function

2020-04-07 Thread Marvin Liu
structure to 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 efdcb0d93..7bdb87c49 100644 --- a/drivers/net/virtio/Makefile +++ b/drivers/net/virtio/Makefile @@ -37,6 +37,34 @@ else

[dpdk-dev] [PATCH v3 6/7] net/virtio: add election for vectorized datapath

2020-04-07 Thread Marvin Liu
datapath Signed-off-by: Marvin Liu diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c index f9d0ea70d..21570e5cf 100644 --- a/drivers/net/virtio/virtio_ethdev.c +++ b/drivers/net/virtio/virtio_ethdev.c @@ -1518,9 +1518,12 @@ set_rxtx_funcs(struct rte_eth_dev *eth_dev

<    1   2   3   4   5   >