[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 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 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 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 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

[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] 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] 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] 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 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

[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] 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

[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 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 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] fix bug can not build example application for missing link library

2014-12-17 Thread Marvin Liu
From: Yong Liu main.o: In function `rte_pktmbuf_free': main.c:(.text+0x9c): undefined reference to `per_lcore__lcore_id' Signed-off-by: Marvin liu --- mk/rte.app.mk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mk/rte.app.mk b/mk/rte.app.mk index 5fc311

[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 v3 1/3] examples/ip_reassembly: add parse-ptype option

2017-02-08 Thread Marvin Liu
Add new option parse-ptype in this sample in case of pmd driver not provide packet type info. If this option enabled, packet type will be analyzed in Rx callback function. Signed-off-by: Jianfeng Tan Signed-off-by: Yong Liu diff --git a/examples/ip_reassembly/main.c b/examples/ip_reassembly/mai

[dpdk-dev] [PATCH v3 2/3] examples/ip_fragmentation: add parse-ptype option

2017-02-08 Thread Marvin Liu
Add new option parse-ptype in this sample in case of pmd driver not provide packet type info. If this option enabled, packet type will be analyzed in Rx callback function. Signed-off-by: Jianfeng Tan Signed-off-by: Yong Liu diff --git a/examples/ip_fragmentation/main.c b/examples/ip_fragmentati

[dpdk-dev] [PATCH v3 3/3] examples/l3fwd-acl: add parse-ptype option

2017-02-08 Thread Marvin Liu
Add new option parse-ptype in this sample in case of pmd driver not provide packet type info. If this option enabled, packet type will be analyzed in Rx callback function. Signed-off-by: Jianfeng Tan Signed-off-by: Yong Liu diff --git a/examples/l3fwd-acl/main.c b/examples/l3fwd-acl/main.c inde

[dpdk-dev] [PATCH] net/virtio-user: add unsupported features mask

2018-06-24 Thread Marvin Liu
This patch introduces unsupported features mask for virtio-user device. For virtio-user server mode, when reconnecting virtio-user will retrieve vhost devcie features as base and then unmask unsupported features. Signed-off-by: Marvin Liu diff --git a/drivers/net/virtio/virtio_user

[dpdk-dev] [PATCH v2 1/8] vhost: announce VIRTIO_F_IN_ORDER support

2018-06-25 Thread Marvin Liu
device has supported this feature by default. If vhost dequeue zero is enabled, should disable VIRTIO_F_IN_ORDER as vhost can’t assure that descriptors returned from NIC are in order. Signed-off-by: Marvin Liu diff --git a/lib/librte_vhost/socket.c b/lib/librte_vhost/socket.c index 0399c37bc

[dpdk-dev] [PATCH v2 2/8] net/virtio: add VIRTIO_F_IN_ORDER definition

2018-06-25 Thread Marvin Liu
If VIRTIO_F_IN_ORDER has been negotiated, driver will use descriptors in ring order: starting from offset 0 in the table, and wrapping around at the end of the table. Also introduce use_inorder_[rt]x flag for selection of IN_ORDER [RT]x handlers. Signed-off-by: Marvin Liu diff --git a/drivers

[dpdk-dev] [PATCH v2 0/8] support VIRTIO_F_IN_ORDER feature

2018-06-25 Thread Marvin Liu
l xmit packets - update available ring for each descriptor - clean up IN_ORDER xmit function - unmask feature bits when disabled in_order or mgr_rxbuf - extract common part between IN_ORDER and normal functions - update performance result Marvin Liu (8): vhost: announce VIRTIO_F_IN_ORDER support

[dpdk-dev] [PATCH v2 6/8] net/virtio: support IN_ORDER Rx and Tx

2018-06-25 Thread Marvin Liu
burst list continue } else { xmit inorder burst list xmit mbuf b with normal xmit } } if (inorder burst list not empty) { xmit inorder burst list } update_avail_ring() Signed-off-by: Marvi

[dpdk-dev] [PATCH v2 4/8] net/virtio: free IN_ORDER descriptors before device start

2018-06-25 Thread Marvin Liu
Add new function for freeing IN_ORDER descriptors. As descriptors will be allocated and freed sequentially when IN_ORDER feature was negotiated. There will be no need to utilize chain for freed descriptors management, only index update is enough. Signed-off-by: Marvin Liu diff --git a/drivers

[dpdk-dev] [PATCH v2 5/8] net/virtio: extract common part for IN_ORDER functions

2018-06-25 Thread Marvin Liu
IN_ORDER virtio-user Tx function support Tx checksum offloading and TSO which also support on normal Tx function. So extracts common part into separated function. Signed-off-by: Marvin Liu diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c index 0bca29855

[dpdk-dev] [PATCH v2 7/8] net/virtio: add IN_ORDER Rx/Tx into selection

2018-06-25 Thread Marvin Liu
logic: If IN_ORDER is disabled will select normal Tx path. If IN_ORDER is enabled and merge-able is disabled will select simple Tx path. Otherwise will select IN_ORDER Tx path. Signed-off-by: Marvin Liu diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c index

[dpdk-dev] [PATCH v2 3/8] net/virtio-user: add mrg_rxbuf and in_order vdev parameters

2018-06-25 Thread Marvin Liu
Add parameters for configuring VIRTIO_NET_F_MRG_RXBUF and VIRTIO_F_IN_ORDER feature bits. If feature is disabled, also update corresponding unsupported feature bit. Signed-off-by: Marvin Liu diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.c b/drivers/net/virtio/virtio_user

[dpdk-dev] [PATCH v2 8/8] net/virtio: annouce VIRTIO_F_IN_ORDER support

2018-06-25 Thread Marvin Liu
Signed-off-by: Marvin Liu diff --git a/drivers/net/virtio/virtio_ethdev.h b/drivers/net/virtio/virtio_ethdev.h index 8ab1267b0..69da18d9c 100644 --- a/drivers/net/virtio/virtio_ethdev.h +++ b/drivers/net/virtio/virtio_ethdev.h @@ -36,6 +36,7 @@ 1ULL << VIRTIO_NET_F_GUEST_AN

[dpdk-dev] [PATCH v3 00/11] support in-order feature

2018-06-28 Thread Marvin Liu
_order or mgr_rxbuf - extract common part between IN_ORDER and normal functions - update performance result Marvin Liu (11): vhost: advertise support in-order feature net/virtio: add in-order feature bit definition net/virtio-user: add unsupported features mask net/virtio-user: add mrg_rxb

[dpdk-dev] [PATCH v3 01/11] vhost: advertise support in-order feature

2018-06-28 Thread Marvin Liu
device has supported this feature by default. If vhost dequeue zero is enabled, should disable VIRTIO_F_IN_ORDER as vhost can’t assure that descriptors returned from NIC are in order. Signed-off-by: Marvin Liu diff --git a/lib/librte_vhost/socket.c b/lib/librte_vhost/socket.c index 0399c37bc

[dpdk-dev] [PATCH v3 02/11] net/virtio: add in-order feature bit definition

2018-06-28 Thread Marvin Liu
If VIRTIO_F_IN_ORDER has been negotiated, driver will use descriptors in ring order: starting from offset 0 in the table, and wrapping around at the end of the table. Also introduce use_inorder_[rt]x flag for selection of IN_ORDER [RT]x handlers. Signed-off-by: Marvin Liu diff --git a/drivers

[dpdk-dev] [PATCH v3 04/11] net/virtio-user: add mrg_rxbuf and in_order vdev parameters

2018-06-28 Thread Marvin Liu
Add parameters for configuring VIRTIO_NET_F_MRG_RXBUF and VIRTIO_F_IN_ORDER feature bits. If feature is disabled, also update corresponding unsupported feature bit. Signed-off-by: Marvin Liu diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.c b/drivers/net/virtio/virtio_user

[dpdk-dev] [PATCH v3 07/11] net/virtio: support in-order Rx and Tx

2018-06-28 Thread Marvin Liu
if (inorder burst list not empty) { xmit inorder burst list } update_avail_ring() Signed-off-by: Marvin Liu diff --git a/drivers/net/virtio/virtio_ethdev.h b/drivers/net/virtio/virtio_ethdev.h index bb40064ea..8ab1267b0 100644 --- a/drivers/net/virtio/virtio_ethdev.h

[dpdk-dev] [PATCH v3 06/11] net/virtio: extract common part for in-order functions

2018-06-28 Thread Marvin Liu
IN_ORDER virtio-user Tx function support Tx checksum offloading and TSO which also support on normal Tx function. So extracts common part into separated function for reuse. Signed-off-by: Marvin Liu diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c index 0bca29855

[dpdk-dev] [PATCH v3 05/11] net/virtio: free in-order descriptors before device start

2018-06-28 Thread Marvin Liu
Add new function for freeing IN_ORDER descriptors. As descriptors will be allocated and freed sequentially when IN_ORDER feature was negotiated. There will be no need to utilize chain for freed descriptors management, only index update is enough. Signed-off-by: Marvin Liu diff --git a/drivers

[dpdk-dev] [PATCH v3 03/11] net/virtio-user: add unsupported features mask

2018-06-28 Thread Marvin Liu
This patch introduces unsupported features mask for virtio-user device. For virtio-user server mode, when reconnecting virtio-user will retrieve vhost device features as base and then unmask unsupported features. Signed-off-by: Marvin Liu diff --git a/drivers/net/virtio/virtio_user

[dpdk-dev] [PATCH v3 08/11] net/virtio: add in-order Rx/Tx into selection

2018-06-28 Thread Marvin Liu
logic: If IN_ORDER is disabled will select normal Tx path. If IN_ORDER is enabled and merge-able is disabled will select simple Tx path. Otherwise will select IN_ORDER Tx path. Signed-off-by: Marvin Liu diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c index

[dpdk-dev] [PATCH v3 09/11] net/virtio: advertise support in-order feature

2018-06-28 Thread Marvin Liu
Signed-off-by: Marvin Liu diff --git a/drivers/net/virtio/virtio_ethdev.h b/drivers/net/virtio/virtio_ethdev.h index 8ab1267b0..69da18d9c 100644 --- a/drivers/net/virtio/virtio_ethdev.h +++ b/drivers/net/virtio/virtio_ethdev.h @@ -36,6 +36,7 @@ 1ULL << VIRTIO_NET_F_GUEST_AN

[dpdk-dev] [PATCH v3 10/11] doc: add mrg_rxbuf and in_order parameters for virtio device

2018-06-28 Thread Marvin Liu
Virtio vdev parameter mrg_rxbuf and in_order can configure VIRTIO_NET_F_MRG_RXBUF and VIRTIO_F_IN_ORDER feature bits. These feature bits can effect [RT]x path selection. Signed-off-by: Marvin Liu diff --git a/doc/guides/nics/virtio.rst b/doc/guides/nics/virtio.rst index a42d1bb30..46e292c4d

[dpdk-dev] [PATCH v3 11/11] doc: add in-order funciton for virtio device

2018-06-28 Thread Marvin Liu
Signed-off-by: Marvin Liu diff --git a/doc/guides/nics/virtio.rst b/doc/guides/nics/virtio.rst index 46e292c4d..1b88cec96 100644 --- a/doc/guides/nics/virtio.rst +++ b/doc/guides/nics/virtio.rst @@ -201,7 +201,7 @@ The packet transmission flow is: Virtio PMD Rx/Tx Callbacks

[dpdk-dev] [PATCH v4 0/9] support in-order feature

2018-06-30 Thread Marvin Liu
l xmit packets - update available ring for each descriptor - clean up IN_ORDER xmit function - unmask feature bits when disabled in_order or mgr_rxbuf - extract common part between IN_ORDER and normal functions - update performance result Marvin Liu (11): vhost: advertise support in-order feature

[dpdk-dev] [PATCH v4 2/9] net/virtio: add in-order feature bit definition

2018-06-30 Thread Marvin Liu
If VIRTIO_F_IN_ORDER has been negotiated, driver will use descriptors in ring order: starting from offset 0 in the table, and wrapping around at the end of the table. Also introduce use_inorder_[rt]x flag for selection of IN_ORDER [RT]x handlers. Signed-off-by: Marvin Liu Reviewed-by: Maxime

[dpdk-dev] [PATCH v4 3/9] net/virtio-user: add unsupported features mask

2018-06-30 Thread Marvin Liu
This patch introduces unsupported features mask for virtio-user device. For virtio-user server mode, when reconnecting virtio-user will retrieve vhost device features as base and then unmask unsupported features. Signed-off-by: Marvin Liu Reviewed-by: Maxime Coquelin diff --git a/drivers/net

[dpdk-dev] [PATCH v4 1/9] vhost: advertise support in-order feature

2018-06-30 Thread Marvin Liu
device has supported this feature by default. If vhost dequeue zero is enabled, should disable VIRTIO_F_IN_ORDER as vhost can’t assure that descriptors returned from NIC are in order. Signed-off-by: Marvin Liu Reviewed-by: Maxime Coquelin diff --git a/lib/librte_vhost/socket.c b/lib/librte_vhost

[dpdk-dev] [PATCH v4 4/9] net/virtio-user: add mrg-rxbuf and in-order vdev parameters

2018-06-30 Thread Marvin Liu
Add parameters for configuring VIRTIO_NET_F_MRG_RXBUF and VIRTIO_F_IN_ORDER feature bits. If feature is disabled, also update corresponding unsupported feature bit. Signed-off-by: Marvin Liu Reviewed-by: Maxime Coquelin diff --git a/doc/guides/nics/virtio.rst b/doc/guides/nics/virtio.rst index

[dpdk-dev] [PATCH v4 5/9] net/virtio: free in-order descriptors before device start

2018-06-30 Thread Marvin Liu
Add new function for freeing IN_ORDER descriptors. As descriptors will be allocated and freed sequentially when IN_ORDER feature was negotiated. There will be no need to utilize chain for freed descriptors management, only index update is enough. Signed-off-by: Marvin Liu diff --git a/drivers

[dpdk-dev] [PATCH v4 8/9] net/virtio: add in-order Rx/Tx into selection

2018-06-30 Thread Marvin Liu
logic: If IN_ORDER is disabled will select normal Tx path. If IN_ORDER is enabled and merge-able is disabled will select simple Tx path. Otherwise will select IN_ORDER Tx path. Signed-off-by: Marvin Liu Reviewed-by: Maxime Coquelin diff --git a/doc/guides/nics/virtio.rst b/doc/guides/nics

[dpdk-dev] [PATCH v4 7/9] net/virtio: support in-order Rx and Tx

2018-06-30 Thread Marvin Liu
if (inorder burst list not empty) { xmit inorder burst list } update_avail_ring() 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 index bb40064ea..cd8070248 100644 --- a/drivers/n

[dpdk-dev] [PATCH v4 6/9] net/virtio: extract common part for in-order functions

2018-06-30 Thread Marvin Liu
IN_ORDER virtio-user Tx function support Tx checksum offloading and TSO which also support on normal Tx function. So extracts common part into separated function for reuse. Signed-off-by: Marvin Liu Reviewed-by: Maxime Coquelin diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio

[dpdk-dev] [PATCH v4 9/9] net/virtio: advertise support in-order feature

2018-06-30 Thread Marvin Liu
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 index cd8070248..350e9ce73 100644 --- a/drivers/net/virtio/virtio_ethdev.h +++ b/drivers/net/virtio/virtio_ethdev.h @@ -36,6 +36,7 @@ 1ULL

[dpdk-dev] [PATCH v5 1/9] vhost: advertise support in-order feature

2018-07-01 Thread Marvin Liu
device has supported this feature by default. If vhost dequeue zero is enabled, should disable VIRTIO_F_IN_ORDER as vhost can’t assure that descriptors returned from NIC are in order. Signed-off-by: Marvin Liu Reviewed-by: Maxime Coquelin diff --git a/lib/librte_vhost/socket.c b/lib/librte_vhost

[dpdk-dev] [PATCH v5 0/9] support in-order feature

2018-07-01 Thread Marvin Liu
result Marvin Liu (9): vhost: advertise support in-order feature net/virtio: add in-order feature bit definition net/virtio-user: add unsupported features mask net/virtio-user: add mrg-rxbuf and in-order vdev parameters net/virtio: free in-order descriptors before device start net/virtio: e

[dpdk-dev] [PATCH v5 4/9] net/virtio-user: add mrg-rxbuf and in-order vdev parameters

2018-07-01 Thread Marvin Liu
Add parameters for configuring VIRTIO_NET_F_MRG_RXBUF and VIRTIO_F_IN_ORDER feature bits. If feature is disabled, also update corresponding unsupported feature bit. Signed-off-by: Marvin Liu Reviewed-by: Maxime Coquelin diff --git a/doc/guides/nics/virtio.rst b/doc/guides/nics/virtio.rst index

[dpdk-dev] [PATCH v5 2/9] net/virtio: add in-order feature bit definition

2018-07-01 Thread Marvin Liu
If VIRTIO_F_IN_ORDER has been negotiated, driver will use descriptors in ring order: starting from offset 0 in the table, and wrapping around at the end of the table. Also introduce use_inorder_[rt]x flag for selection of IN_ORDER [RT]x handlers. Signed-off-by: Marvin Liu Reviewed-by: Maxime

[dpdk-dev] [PATCH v5 5/9] net/virtio: free in-order descriptors before device start

2018-07-01 Thread Marvin Liu
Add new function for freeing IN_ORDER descriptors. As descriptors will be allocated and freed sequentially when IN_ORDER feature was negotiated. There will be no need to utilize chain for freed descriptors management, only index update is enough. Signed-off-by: Marvin Liu Reviewed-by: Maxime

[dpdk-dev] [PATCH v5 3/9] net/virtio-user: add unsupported features mask

2018-07-01 Thread Marvin Liu
This patch introduces unsupported features mask for virtio-user device. For virtio-user server mode, when reconnecting virtio-user will retrieve vhost device features as base and then unmask unsupported features. Signed-off-by: Marvin Liu Reviewed-by: Maxime Coquelin diff --git a/drivers/net

[dpdk-dev] [PATCH v5 6/9] net/virtio: extract common part for in-order functions

2018-07-01 Thread Marvin Liu
IN_ORDER virtio-user Tx function support Tx checksum offloading and TSO which also support on normal Tx function. So extracts common part into separated function for reuse. Signed-off-by: Marvin Liu Reviewed-by: Maxime Coquelin diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio

[dpdk-dev] [PATCH v5 7/9] net/virtio: support in-order Rx and Tx

2018-07-01 Thread Marvin Liu
if (inorder burst list not empty) { xmit inorder burst list } update_avail_ring() 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 index bb40064ea..cd8070248 100644 --- a/drivers/n

[dpdk-dev] [PATCH v5 8/9] net/virtio: add in-order Rx/Tx into selection

2018-07-01 Thread Marvin Liu
. Tx path select logic: If IN_ORDER is enabled will select IN_ORDER Tx path. Otherwise will select default Tx path. Signed-off-by: Marvin Liu Reviewed-by: Maxime Coquelin diff --git a/doc/guides/nics/virtio.rst b/doc/guides/nics/virtio.rst index 46e292c4d..7c099fb7c 100644 --- a/doc/guides/nics

[dpdk-dev] [PATCH v5 9/9] net/virtio: advertise support in-order feature

2018-07-01 Thread Marvin Liu
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 index cd8070248..350e9ce73 100644 --- a/drivers/net/virtio/virtio_ethdev.h +++ b/drivers/net/virtio/virtio_ethdev.h @@ -36,6 +36,7 @@ 1ULL

[dpdk-dev] [PATCH] net/virtio: fix build with gcc optimization on

2018-07-03 Thread Marvin Liu
Reported-by: Ferruh Yigit Signed-off-by: Marvin Liu diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c index 6394071b8..19beb4bf4 100644 --- a/drivers/net/virtio/virtio_rxtx.c +++ b/drivers/net/virtio/virtio_rxtx.c @@ -192,7 +192,8 @@ virtio_xmit_cleanup(struct virtqueue

[dpdk-dev] [PATCH] mk: using initial-exec model for thread local variable

2018-07-04 Thread Marvin Liu
librte_pmd_eal.so contain thread local variable. So that can make TLS model back to initial-exec like static library for better performance. Signed-off-by: Marvin Liu diff --git a/mk/toolchain/gcc/rte.vars.mk b/mk/toolchain/gcc/rte.vars.mk index 7e4531bab..19d5e11ef 100644 --- a/mk/toolchain/gcc

[dpdk-dev] [PATCH] Doc: add known issue for restricted vdev ethdev ops in secondary process

2018-10-31 Thread Marvin Liu
Signed-off-by: Marvin Liu diff --git a/doc/guides/rel_notes/known_issues.rst b/doc/guides/rel_notes/known_issues.rst index 95e4ce693..617255cd7 100644 --- a/doc/guides/rel_notes/known_issues.rst +++ b/doc/guides/rel_notes/known_issues.rst @@ -759,3 +759,21 @@ Netvsc driver and application

[dpdk-dev] [PATCH] examples/vhost: fix qemu abort

2018-07-24 Thread Marvin Liu
reload driver and then cause qemu abort. Add feature bit which has been supported by vhost library can fix this error. Fixes: ca059fa5 ("examples/vhost: demonstrate the new generic APIs") Signed-off-by: Marvin Liu diff --git a/examples/vhost/main.c b/examples/vhost/main.c index 2175c1186.

[dpdk-dev] [PATCH v2] examples/vhost: workaround qemu abort

2018-07-24 Thread Marvin Liu
in an enabled state when this feature bit not negotiated. Work around qemu issue by enabling this feature bit in vhost user backend. Signed-off-by: Marvin Liu diff --git a/examples/vhost/main.c b/examples/vhost/main.c index 2175c1186..4b87331fc 100644 --- a/examples/vhost/main.c +++ b/examples

[dpdk-dev] [PATCH v3] examples/vhost: workaround qemu abort

2018-07-24 Thread Marvin Liu
ng feature bit in vhost user backend. Signed-off-by: Marvin Liu diff --git a/examples/vhost/main.c b/examples/vhost/main.c index 2175c1186..8573004dd 100644 --- a/examples/vhost/main.c +++ b/examples/vhost/main.c @@ -1520,7 +1520,10 @@ main(int argc, char *argv[]) }

[dpdk-dev] [PATCH] doc: add note for builtin-net-driver option

2018-07-25 Thread Marvin Liu
If builtin-net-driver option is enabled, simple vhost device will not enable protocol feature bit. QEMU vhost net device startup will be failed without protocol feature. Then QEMU process will be aborted when reloading virtio net driver due to previous failure. Signed-off-by: Marvin Liu diff

[dpdk-dev] [PATCH v2] doc: add note for builtin-net-driver option

2018-07-25 Thread Marvin Liu
Option builtin-net-driver is used to demonstrate how to implement vhost-user driver based on vhost lib APIs. Unfortunately, very simple vhost driver in vhost sample is incompatible with QEMU as protocol feature not supported. Signed-off-by: Marvin Liu --- v2: * Updated descriptions. --- diff

[dpdk-dev] [PATCH v3] doc: add note for builtin-net-driver option

2018-07-31 Thread Marvin Liu
Very simple version of vhost-user driver in vhost sample will be used if builtin-net-driver option is enabled. This driver is based on generic vhost lib APIs. Unfortunately, the implementation is incompatible with QEMU as protocol feature is not supported. Signed-off-by: Marvin Liu diff --git a

[dpdk-dev] [PATCH] mk: using initial-exec model for thread local variable

2018-04-27 Thread Marvin Liu
static library for better performance. Signed-off-by: Marvin Liu diff --git a/mk/toolchain/gcc/rte.vars.mk b/mk/toolchain/gcc/rte.vars.mk index 7e4531b..7b5e71c 100644 --- a/mk/toolchain/gcc/rte.vars.mk +++ b/mk/toolchain/gcc/rte.vars.mk @@ -43,6 +43,10 @@ ifeq (,$(findstring -O0,$(EXTRA_CFLAGS

[dpdk-dev] [PATCH 3/7] net/virtio-user: add mgr_rxbuf and in_order vdev parameters

2018-06-07 Thread Marvin Liu
Add parameters for configuring VIRTIO_NET_F_MRG_RXBUF and VIRTIO_F_IN_ORDER feature bits. These two features bits will impact virtio data path selection. Signed-off-by: Marvin Liu diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.c b/drivers/net/virtio/virtio_user/virtio_user_dev.c

[dpdk-dev] [PATCH 2/7] net/virtio: add VIRTIO_F_IN_ORDER definition

2018-06-07 Thread Marvin Liu
If VIRTIO_F_IN_ORDER has been negotiated, driver will use descriptors in ring order: starting from offset 0 in the table, and wrapping around at the end of the table. Signed-off-by: Marvin Liu diff --git a/drivers/net/virtio/virtio_pci.h b/drivers/net/virtio/virtio_pci.h index a28ba8339

[dpdk-dev] [PATCH 4/7] net/virtio: free IN_ORDER descriptors

2018-06-07 Thread Marvin Liu
Add new function for freeing IN_ORDER descriptors. As descriptors will be allocated and freed sequentially when IN_ORDER feature was negotiated. There will be no need to utilize chain for descriptors management, only index update is enough. Signed-off-by: Marvin Liu diff --git a/drivers/net

[dpdk-dev] [PATCH 0/7] support VIRTIO_F_IN_ORDER feature

2018-06-07 Thread Marvin Liu
Queues| +-+--+++ |Inorder |6.2Mpps |9.5 ~ 11.9Mpps |10.6 ~ 11.3Mpps | +-+--++----+ Marvin Liu (7): vhost: announce VIRTIO_F_IN_ORDER support net/virtio: add VIRTIO_F_IN_ORDER definition net/virtio-user: add mgr_rxbuf and in_order vdev parameters

[dpdk-dev] [PATCH 5/7] net/virtio: support IN_ORDER Rx and Tx

2018-06-07 Thread Marvin Liu
list xmit mbuf b with normal xmit } } if (inorder burst list not empty) { xmit inorder burst list } update_avail_ring() Signed-off-by: Marvin Liu diff --git a/drivers/net/virtio/virtio_ethdev.h b/drivers/net/virtio/virtio_ethdev.h

[dpdk-dev] [PATCH 1/7] vhost: announce VIRTIO_F_IN_ORDER support

2018-06-07 Thread Marvin Liu
device has supported this feature by default. If vhost dequeue zero is enabled, should disable VIRTIO_F_IN_ORDER as vhost can’t assure that descriptor returned from NIC are in order. Signed-off-by: Marvin Liu diff --git a/lib/librte_vhost/socket.c b/lib/librte_vhost/socket.c index 0399c37bc

[dpdk-dev] [PATCH 7/7] net/virtio: annouce VIRTIO_F_IN_ORDER support

2018-06-07 Thread Marvin Liu
Signed-off-by: Marvin Liu diff --git a/drivers/net/virtio/virtio_ethdev.h b/drivers/net/virtio/virtio_ethdev.h index 25697c872..bc3d08532 100644 --- a/drivers/net/virtio/virtio_ethdev.h +++ b/drivers/net/virtio/virtio_ethdev.h @@ -36,6 +36,7 @@ 1ULL << VIRTIO_NET_F_GUEST_AN

[dpdk-dev] [PATCH 6/7] net/virtio: add IN_ORDER Rx/Tx into selection

2018-06-07 Thread Marvin Liu
will select simple Rx path. Otherwise will select IN_ORDER Rx path. Tx path select logic: If IN_ORDER is disabled will select normal Tx path. If IN_ORDER is enabled and merge-able is disabled will select simple Tx path. Otherwise will select IN_ORDER Tx path. Signed-off-by: Marvin Liu diff --git

[dpdk-dev] [PATCH] examples/vm_power_manager: remove dependency on internal header file

2016-07-04 Thread Marvin Liu
Macro CHANNEL_CMDS_MAX_CPUS stand for the maximum number of cores controlled by virtual channels. This macro only be used in the example, so remove it from library to example header file. Signed-off-by: Marvin Liu diff --git a/examples/vm_power_manager/channel_manager.h b/examples

[dpdk-dev] [PATCH] testpmd: fix build on FreeBSD

2016-03-21 Thread Marvin Liu
Build log: /root/dpdk/app/test-pmd/cmdline.c:6687:45: error: no member named 's6_addr32' in 'struct in6_addr' rte_be_to_cpu_32(res->ip_value.addr.ipv6.s6_addr32[i]); This is caused by macro "s6_addr32" not defined on FreeBSD. Signed-off-by: Marvi

[dpdk-dev] [PATCH v2] testpmd: fix build on FreeBSD

2016-03-22 Thread Marvin Liu
ter to host endian. Move the swap action to i40e ethdev will fix this issue. Fixes: 7b1312891b69 ("ethdev: add IP in GRE tunnel") Signed-off-by: Marvin Liu diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index 9d52b8c..4f3d1e4 100644 --- a/app/test-pmd/cmdline.c +++ b/

[dpdk-dev] [PATCH] examples/vm_power_manager: fix build with libvirt version < 0.9.3

2016-04-11 Thread Marvin Liu
mples/vm_power_manager/channel_manager.c: In function ?update_pcpus_mask?: channel_manager.c:117:3: error: implicit declaration of function ?virDomainGetVcpuPinInfo? Fixes: 2e099bc5d104 ("fix split of compiler and linker options") Signed-off-by: Marvin Liu diff --git a/examples/vm_power_mana

[dpdk-dev] [PATCH v2] examples/vm_power_manager: fix build with libvirt version < 0.9.3

2016-04-11 Thread Marvin Liu
mples/vm_power_manager/channel_manager.c: In function ?update_pcpus_mask?: channel_manager.c:117:3: error: implicit declaration of function ?virDomainGetVcpuPinInfo? Fixes: 2e099bc5d104 ("fix split of compiler and linker options") Signed-off-by: Marvin Liu diff --git a/examples/vm_power_mana

[dpdk-dev] [PATCH v3] examples/vm_power_manager: fix build with libvirt version < 0.9.3

2016-04-11 Thread Marvin Liu
mples/vm_power_manager/channel_manager.c: In function ?update_pcpus_mask?: channel_manager.c:117:3: error: implicit declaration of function ?virDomainGetVcpuPinInfo? Fixes: 8db653ff7889 ("vm power management application") Signed-off-by: Marvin Liu diff --git a/examples/Makefile b/examples

[dpdk-dev] [PATCH v4 0/8] add packed ring vectorized datapath

2020-04-15 Thread Marvin Liu
nce 2. disable 'packed_vec' by default v2: 1. more function blocks replaced by vector instructions 2. clean virtio_net_hdr by vector instruction 3. allow header room size change 4. add 'packed_vec' option in virtio_user vdev 5. fix build not check whether AVX512 enabled 6

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

2020-04-15 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 965ce3dab..1d8135f4f 100644 --- a

[dpdk-dev] [PATCH v4 1/8] net/virtio: enable vectorized datapath

2020-04-15 Thread Marvin Liu
Previously, virtio split ring vectorized datapath is enabled as default. This is not suitable for everyone as that datapath not follow virtio spec. Add specific config for virtio vectorized datapath selection. This config will be also used for virtio packed ring. Signed-off-by: Marvin Liu diff

[dpdk-dev] [PATCH v4 2/8] net/virtio-user: add vectorized datapath parameter

2020-04-15 Thread Marvin Liu
Add new parameter "vectorized" which can enable vectorized datapath explicitly. This parameter will work for both split ring and packed ring. When "vectorized" option is on, driver will check both compiling environment and running enviornment. Signed-off-by: Marvin Liu diff

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

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

[dpdk-dev] [PATCH v4 6/8] eal/x86: identify AVX512 extensions flag

2020-04-15 Thread Marvin Liu
Read CPUID to check if AVX512 extensions are supported. Signed-off-by: Marvin Liu diff --git a/lib/librte_eal/common/arch/x86/rte_cpuflags.c b/lib/librte_eal/common/arch/x86/rte_cpuflags.c index 6492df556..54e9f6185 100644 --- a/lib/librte_eal/common/arch/x86/rte_cpuflags.c +++ b/lib

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

2020-04-15 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 v4 7/8] net/virtio: add election for vectorized datapath

2020-04-15 Thread Marvin Liu
disabled Split ring vectorized rx will be selected when criterian matched. 1. vectorized option is enabled 2. virtio mergeable and IN_ORDER features are not negotiated 3. LRO, chksum and vlan strip offloading are disabled Signed-off-by: Marvin Liu diff --git a/drivers/net/virtio/virtio_ethdev.c

[dpdk-dev] [PATCH v4 8/8] doc: add packed vectorized datapath

2020-04-15 Thread Marvin Liu
Document packed virtqueue vectorized datapath selection logic in virtio net PMD. Add packed virtqueue vectorized datapath 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

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

2020-04-16 Thread Marvin Liu
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-user: add vectorized path parameter ne

[dpdk-dev] [PATCH v5 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 v5 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 v5 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

  1   2   3   4   5   >