7; 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. doc update
Marvin Liu (7):
net
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
x27;t be freed or realloc in reinit process. Also
moved virtio device initialization from configuration to start stage,
which can reduce number of reinitialization times.
Fixes: 6ebbf4109f35 ("net/virtio-user: fix packed ring server mode")
Signed-off-by: Marvin Liu
diff --git a/dri
zc mbufs should record available buffer id when doing dequeue zcopy.
There's no guarantee that local queue avail index equal to buffer index.
Fixes: d1eafb532268 ("vhost: add packed ring zcopy batch and single dequeue")
Cc: sta...@dpdk.org
Signed-off-by: Marvin Liu
Reported
Available buffer ID should be stored in the zmbuf in the packed-ring
dequeue path. There's no guarantee that local queue avail index is
equal to buffer ID.
Fixes: d1eafb532268 ("vhost: add packed ring zcopy batch and single dequeue")
Cc: sta...@dpdk.org
Signed-off-by: Marvin L
. Rx datapath also can be vectorized by limiated
features(TSO and mergeable).
Marvin Liu (7):
net/virtio: add Rx free threshold setting
net/virtio-user: add LRO parameter
net/virtio: add vectorized packed ring Rx function
net/virtio: reuse packed ring xmit functions
net/virtio: add
Packed ring vectorized rx function won't support GUEST_TSO4 and
GUSET_TSO6. Adding "lro" parameter into virtio user vdev arguments
can disable these features for vectorized path selection.
Signed-off-by: Marvin Liu
diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.c
Introduce free threshold setting in Rx queue. Now default value of Rx
free threshold 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 threshold descs were dequeued.
Signed-off-by: Marvin Liu
-off-by: Marvin Liu
diff --git a/drivers/net/virtio/Makefile b/drivers/net/virtio/Makefile
index efdcb0d93..0458e8bf2 100644
--- a/drivers/net/virtio/Makefile
+++ b/drivers/net/virtio/Makefile
@@ -37,6 +37,36 @@ else ifneq ($(filter y,$(CONFIG_RTE_ARCH_ARM)
$(CONFIG_RTE_ARCH_ARM64)),)
SRCS
Packed ring vectorized datapath can be selected when requirements are
fulfilled.
1. AVX512 is allowed by config file and compiler
2. VERSION_1 and in_order features are negotiated
3. ring size is power of two
4. LRO and mergeable feature disabled in Rx datapath
Signed-off-by: Marvin Liu
diff
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
Signed-off-by: Marvin Liu
diff --git a/drivers/net/virtio/meson.build b/drivers/net/virtio/meson.build
index 04c7fdf25..b0bddfd06 100644
--- a/drivers/net/virtio/meson.build
+++ b/drivers/net/virtio/meson.build
@@ -11,6 +11,7 @@ deps += ['kvargs', 'bus_pci']
if
Optimize packed ring Tx datapath alike Rx datapath. Split Rx datapath
into batch and single Tx functions.
Signed-off-by: Marvin Liu
diff --git a/drivers/net/virtio/virtio_ethdev.h
b/drivers/net/virtio/virtio_ethdev.h
index 10e39670e..c9aaef0af 100644
--- a/drivers/net/virtio/virtio_ethdev.h
.
Signed-off-by: Marvin Liu
diff --git a/lib/librte_vhost/vhost.h b/lib/librte_vhost/vhost.h
index 2087d1400..de2c09e7e 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 *notify_ops;
uint32_t
Available buffer ID should be stored in the zmbuf in the packed-ring
dequeue path. There's no guarantee that local queue avail index is
equal to buffer ID.
Fixes: d1eafb532268 ("vhost: add packed ring zcopy batch and single dequeue")
Cc: sta...@dpdk.org
Signed-off-by: Marvin L
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
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-
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
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. doc update
Marvin Liu (7):
net/virtio: add Rx free threshold setting
net/virtio-user: add vectorized packed ring parameter
net/virtio: a
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
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
in Rx 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
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
After enqueue function finished, packet index has been increased. Batch
enqueue function should retrieve mbuf structure pointed by that index.
Fixes: 0294211bb6dc ("vhost: optimize packed ring enqueue")
Signed-off-by: Marvin Liu
---
lib/librte_vhost/virtio_net.c | 3 ++-
1 file
g/icc/gcc
- Buffered dequeue used desc number changed to (RING_SZ - PKT_BURST)
- Optimize dequeue used ring update when in_order negotiated
Marvin Liu (13):
vhost: add packed ring indexes increasing function
vhost: add packed ring single enqueue
vhost: try to unroll for each loop
vhost
When enqueuing or dequeuing, the virtqueue's local available and used
indexes are increased.
Signed-off-by: Marvin Liu
Reviewed-by: Maxime Coquelin
diff --git a/lib/librte_vhost/vhost.h b/lib/librte_vhost/vhost.h
index c76d40115..02b3c91ff 100644
--- a/lib/librte_vhost/vhost.h
+++
Add vhost enqueue function for single packet and meanwhile left space
for flush used ring function.
Signed-off-by: Marvin Liu
Reviewed-by: Maxime Coquelin
diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c
index 070d62bc0..4fb6552cc 100644
--- a/lib/librte_vhost
Add batch dequeue function like enqueue function for packed ring, batch
dequeue function will not support chained descritpors, single packet
dequeue function will handle it.
Signed-off-by: Marvin Liu
diff --git a/lib/librte_vhost/vhost.h b/lib/librte_vhost/vhost.h
index a2b9221e0..67724c342
Create macro for adding unroll pragma before for each loop. Batch
functions will be contained of several small loops which can be
optimized by compilers' loop unrolling pragma.
Signed-off-by: Marvin Liu
diff --git a/lib/librte_vhost/Makefile b/lib/librte_vhost/Makefile
index 8623
Batch enqueue function will first check whether descriptors are cache
aligned. It will also check prerequisites in the beginning. Batch
enqueue function do not support chained mbufs, single packet enqueue
function will handle it.
Signed-off-by: Marvin Liu
Reviewed-by: Maxime Coquelin
diff
Add vhost single packet dequeue function for packed ring and meanwhile
left space for shadow used ring update function.
Signed-off-by: Marvin Liu
Reviewed-by: Maxime Coquelin
diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c
index 4ddf26567..317be1aed 100644
--- a/lib
Buffer vhost packed ring enqueue updates, flush ring descs if buffered
content filled up one cacheline. Thus virtio can receive packets at a
faster frequency.
Signed-off-by: Marvin Liu
diff --git a/lib/librte_vhost/vhost.h b/lib/librte_vhost/vhost.h
index 67724c342..d59446442 100644
--- a/lib
Flush used elements when batched enqueue function is finished.
Descriptor's flags are pre-calculated as they will be reset by vhost.
Signed-off-by: Marvin Liu
Reviewed-by: Gavin Hu
Reviewed-by: Maxime Coquelin
diff --git a/lib/librte_vhost/vhost.h b/lib/librte_vhost/vhost.h
index d594
Buffer used ring updates as many as possible in vhost dequeue function
for coordinating with virtio driver. For supporting buffer, shadow used
ring element should contain descriptor's flags. First shadowed ring
index was recorded for calculating buffered number.
Signed-off-by: Marvi
Add vhost packed ring zero copy batch and single dequeue functions like
normal dequeue path.
Signed-off-by: Marvin Liu
Reviewed-by: Maxime Coquelin
diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c
index 2f90c3a7c..e053766f5 100644
--- a/lib/librte_vhost/virtio_net.c
Optimize vhost device packed ring enqueue function by splitting batch
and single functions. Packets can be filled into one desc will be
handled by batch and others will be handled by single as before.
Signed-off-by: Marvin Liu
Reviewed-by: Maxime Coquelin
diff --git a/lib/librte_vhost
When VIRTIO_F_IN_ORDER feature is negotiated, vhost can optimize dequeue
function by only update first used descriptor.
Signed-off-by: Marvin Liu
Reviewed-by: Maxime Coquelin
diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c
index ca3a6551b..670790850 100644
--- a/lib
Optimize vhost device packed ring dequeue function by splitting batch
and single functions. No-chained and direct descriptors will be handled
by batch and other will be handled by single as before.
Signed-off-by: Marvin Liu
Reviewed-by: Maxime Coquelin
diff --git a/lib/librte_vhost
compiler's pragma to unroll loop, distinguish clang/icc/gcc
- Buffered dequeue used desc number changed to (RING_SZ - PKT_BURST)
- Optimize dequeue used ring update when in_order negotiated
Marvin Liu (13):
vhost: add packed ring indexes increasing function
vhost: add packed ring single en
Create macro for adding unroll pragma before for each loop. Batch
functions will be contained of several small loops which can be
optimized by compilers' loop unrolling pragma.
Signed-off-by: Marvin Liu
diff --git a/lib/librte_vhost/Makefile b/lib/librte_vhost/Makefile
index 8623
Add batch dequeue function like enqueue function for packed ring, batch
dequeue function will not support chained descritpors, single packet
dequeue function will handle it.
Signed-off-by: Marvin Liu
diff --git a/lib/librte_vhost/vhost.h b/lib/librte_vhost/vhost.h
index a2b9221e0..67724c342
When enqueuing or dequeuing, the virtqueue's local available and used
indexes are increased.
Signed-off-by: Marvin Liu
Reviewed-by: Maxime Coquelin
diff --git a/lib/librte_vhost/vhost.h b/lib/librte_vhost/vhost.h
index c76d40115..02b3c91ff 100644
--- a/lib/librte_vhost/vhost.h
+++
Batch enqueue function will first check whether descriptors are cache
aligned. It will also check prerequisites in the beginning. Batch
enqueue function do not support chained mbufs, single packet enqueue
function will handle it.
Signed-off-by: Marvin Liu
Reviewed-by: Maxime Coquelin
diff
Add vhost single packet dequeue function for packed ring and meanwhile
left space for shadow used ring update function.
Signed-off-by: Marvin Liu
Reviewed-by: Maxime Coquelin
diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c
index 4ddf26567..87f2ae49e 100644
--- a/lib
Add vhost enqueue function for single packet and meanwhile left space
for flush used ring function.
Signed-off-by: Marvin Liu
Reviewed-by: Maxime Coquelin
diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c
index 070d62bc0..4fb6552cc 100644
--- a/lib/librte_vhost
Buffer vhost packed ring enqueue updates, flush ring descs if buffered
content filled up one cacheline. Thus virtio can receive packets at a
faster frequency.
Signed-off-by: Marvin Liu
diff --git a/lib/librte_vhost/vhost.h b/lib/librte_vhost/vhost.h
index 67724c342..d59446442 100644
--- a/lib
Flush used elements when batched enqueue function is finished.
Descriptor's flags are pre-calculated as they will be reset by vhost.
Signed-off-by: Marvin Liu
Reviewed-by: Gavin Hu
Reviewed-by: Maxime Coquelin
diff --git a/lib/librte_vhost/vhost.h b/lib/librte_vhost/vhost.h
index d594
Optimize vhost device packed ring dequeue function by splitting batch
and single functions. No-chained and direct descriptors will be handled
by batch and other will be handled by single as before.
Signed-off-by: Marvin Liu
Reviewed-by: Maxime Coquelin
diff --git a/lib/librte_vhost
Add vhost packed ring zero copy batch and single dequeue functions like
normal dequeue path.
Signed-off-by: Marvin Liu
Reviewed-by: Maxime Coquelin
diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c
index 1c63262ce..528e0fab1 100644
--- a/lib/librte_vhost/virtio_net.c
Buffer used ring updates as many as possible in vhost dequeue function
for coordinating with virtio driver. For supporting buffer, shadow used
ring element should contain descriptor's flags. First shadowed ring
index was recorded for calculating buffered number.
Signed-off-by: Marvi
Optimize vhost device packed ring enqueue function by splitting batch
and single functions. Packets can be filled into one desc will be
handled by batch and others will be handled by single as before.
Signed-off-by: Marvin Liu
Reviewed-by: Maxime Coquelin
diff --git a/lib/librte_vhost
When VIRTIO_F_IN_ORDER feature is negotiated, vhost can optimize dequeue
function by only update first used descriptor.
Signed-off-by: Marvin Liu
Reviewed-by: Maxime Coquelin
diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c
index ab6726996..5b8cb9e63 100644
--- a/lib
When enqueuing or dequeuing, the virtqueue's local available and used
indexes are increased.
Signed-off-by: Marvin Liu
Reviewed-by: Maxime Coquelin
---
lib/librte_vhost/vhost.h | 20
lib/librte_vhost/virtio_net.c | 18 +++---
2 files changed, 23 inser
optimization
v2:
- Utilize compiler's pragma to unroll loop, distinguish clang/icc/gcc
- Buffered dequeue used desc number changed to (RING_SZ - PKT_BURST)
- Optimize dequeue used ring update when in_order negotiated
Marvin Liu (13):
vhost: add packed ring indexes increasing function
vhost
Add vhost enqueue function for single packet and meanwhile left space
for flush used ring function.
Signed-off-by: Marvin Liu
Reviewed-by: Maxime Coquelin
---
lib/librte_vhost/virtio_net.c | 80 +++
1 file changed, 80 insertions(+)
diff --git a/lib/librte_vhost
Create macro for adding unroll pragma before for each loop. Batch
functions will be contained of several small loops which can be
optimized by compilers' loop unrolling pragma.
Signed-off-by: Marvin Liu
Reviewed-by: Maxime Coquelin
---
lib/librte_vhost/Makefile| 18 ++
Buffer used ring updates as many as possible in vhost dequeue function
for coordinating with virtio driver. For supporting buffer, shadow used
ring element should contain descriptor's flags. First shadowed ring
index was recorded for calculating buffered number.
Signed-off-by: Marvi
Buffer vhost packed ring enqueue updates, flush ring descs if buffered
content filled up one cacheline. Thus virtio can receive packets at a
faster frequency.
Signed-off-by: Marvin Liu
Reviewed-by: Maxime Coquelin
---
lib/librte_vhost/vhost.h | 2 +
lib/librte_vhost/virtio_net.c | 101
Add vhost single packet dequeue function for packed ring and meanwhile
left space for shadow used ring update function.
Signed-off-by: Marvin Liu
Reviewed-by: Maxime Coquelin
---
lib/librte_vhost/virtio_net.c | 55 +++
1 file changed, 55 insertions(+)
diff
Add batch dequeue function like enqueue function for packed ring, batch
dequeue function will not support chained descritpors, single packet
dequeue function will handle it.
Signed-off-by: Marvin Liu
Reviewed-by: Maxime Coquelin
---
lib/librte_vhost/vhost.h | 3 +
lib/librte_vhost
Flush used elements when batched enqueue function is finished.
Descriptor's flags are pre-calculated as they will be reset by vhost.
Signed-off-by: Marvin Liu
Reviewed-by: Gavin Hu
Reviewed-by: Maxime Coquelin
---
lib/librte_vhost/vhost.h | 3 +++
lib/librte_vhost/virtio_net.c
Batch enqueue function will first check whether descriptors are cache
aligned. It will also check prerequisites in the beginning. Batch
enqueue function do not support chained mbufs, single packet enqueue
function will handle it.
Signed-off-by: Marvin Liu
Reviewed-by: Maxime Coquelin
---
lib
Optimize vhost device packed ring enqueue function by splitting batch
and single functions. Packets can be filled into one desc will be
handled by batch and others will be handled by single as before.
Signed-off-by: Marvin Liu
Reviewed-by: Maxime Coquelin
---
lib/librte_vhost/virtio_net.c
When VIRTIO_F_IN_ORDER feature is negotiated, vhost can optimize dequeue
function by only update first used descriptor.
Signed-off-by: Marvin Liu
Reviewed-by: Maxime Coquelin
---
lib/librte_vhost/virtio_net.c | 64 +--
1 file changed, 62 insertions(+), 2
Add vhost packed ring zero copy batch and single dequeue functions like
normal dequeue path.
Signed-off-by: Marvin Liu
Reviewed-by: Maxime Coquelin
---
lib/librte_vhost/virtio_net.c | 120 ++
1 file changed, 120 insertions(+)
diff --git a/lib/librte_vhost
Optimize vhost device packed ring dequeue function by splitting batch
and single functions. No-chained and direct descriptors will be handled
by batch and other will be handled by single as before.
Signed-off-by: Marvin Liu
Reviewed-by: Maxime Coquelin
---
lib/librte_vhost/virtio_net.c | 236
Log feature is disabled in vhost user, so that log address was invalid
when checking. Add feature bit check can skip useless address check.
Fixes: 04cfc7fdbfca ("vhost: translate incoming log address to gpa")
Signed-off-by: Marvin Liu
---
lib/librte_vhost/vhost_user.c | 16 +
Virtio spec only set rule that packed ring maximum size is up to 2^15
entries. Do not limit packed ring size to power of two.
Signed-off-by: Marvin Liu
---
lib/librte_vhost/vhost_user.c | 15 ++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/lib/librte_vhost
Virtio spec only set rule that packed ring maximum size is up to 2^15
entries. Do not limit packed ring size to power of two.
Signed-off-by: Marvin Liu
---
drivers/net/virtio/virtio_ethdev.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/virtio
As doc mentioned, promisc and multicast are by-default supported in
virtio pmd. Mac/vlan filter are supported by best effort. These control
messages should return pass.
Fixes: f9b9d1a55775 ("net/virtio-user: add multiple queues in device emulation")
Cc: sta...@dpdk.org
Signed-off-by:
As doc mentioned, promisc and multicast are by-default supported in
virtio pmd. Mac/vlan filter are supported by best effort. These control
messages should return pass.
Fixes: f9b9d1a55775 ("net/virtio-user: add multiple queues in device emulation")
Cc: sta...@dpdk.org
Signed-off-by:
As doc mentioned, promisc and multicast are by-default supported in
virtio pmd. Mac/vlan filter are supported by best effort. These control
messages should return pass.
Fixes: f9b9d1a55775 ("net/virtio-user: add multiple queues in device emulation")
Cc: sta...@dpdk.org
Signed-off-by:
Virtio spec only set rule that packed ring maximum size is up to 2^15
entries. Should not limit packed ring size to power of two.
Fixes: 708e14d8b9ac ("vhost: advertize packed ring layout support")
Cc: sta...@dpdk.org
Signed-off-by: Marvin Liu
---
lib/librte_vhost/vhost_u
Virtio spec only set rule that packed ring maximum size is up to 2^15
entries. Should not limit packed ring size to power of two.
Fixes: aea29aa5d37b ("net/virtio: enable packed virtqueues by default")
Cc: sta...@dpdk.org
Signed-off-by: Marvin Liu
---
drivers/net/virtio/virtio_et
As doc mentioned, promisc and multicast are by-default supported in
virtio pmd. Mac/vlan filter are supported by best effort. These control
messages should return success.
Fixes: f9b9d1a55775 ("net/virtio-user: add multiple queues in device emulation")
Cc: sta...@dpdk.org
Signed-off-
Log feature is disabled in vhost user, so that log address was invalid
when checking. Check whether log address is valid can workaround it.
Also log address should be translated in packed ring virtqueue.
Fixes: 04cfc7fdbfca ("vhost: translate incoming log address to gpa")
Signed-off-
Log feature is disabled in vhost user, so that log address was invalid
when checking. Check whether log address is valid can workaround it.
Also log address should be translated in packed ring virtqueue.
Fixes: 04cfc7fdbfca ("vhost: translate incoming log address to gpa")
Signed-off-
evice emulation")
Cc: sta...@dpdk.org
Signed-off-by: Marvin Liu
---
drivers/net/virtio/virtio_user/virtio_user_dev.c | 8
drivers/net/virtio/virtio_user_ethdev.c | 4
2 files changed, 12 insertions(+)
diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.c
b/d
Log feature is disabled in vhost user, so that log address was invalid
when checking. Check whether log address is valid can work around it.
Log address should also be translated in packed ring virtqueue.
Fixes: 04cfc7fdbfca ("vhost: translate incoming log address to gpa")
Signed-off-
Packets data are directly copied when doing batch enqueue, add missed
dirty page logging after memory copy.
Fixes: ad3df6dcc0fc ("vhost: add packed ring batch enqueue")
Signed-off-by: Marvin Liu
---
lib/librte_vhost/virtio_net.c | 4
1 file changed, 4 insertions(+)
diff -
As doc mentioned, Rx/Mac/vlan filters are all supported by best effort.
These control commands should return success.
Fixes: f9b9d1a55775 ("net/virtio-user: add multiple queues in device emulation")
Cc: sta...@dpdk.org
Signed-off-by: Marvin Liu
---
drivers/net/virtio/v
done, single core vhost PvP performance with 64B
packet on Xeon 8180 can boost 35%, loopback performance measured by virtio
user pmd can boost over 45%.
Marvin Liu (13):
add vhost normal enqueue function
add vhost packed ring fast enqueue function
add vhost packed ring normal dequeue
Rewrite vhost dequeue function which without used ring update.
Signed-off-by: Marvin Liu
diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c
index b877510da..410837122 100644
--- a/lib/librte_vhost/virtio_net.c
+++ b/lib/librte_vhost/virtio_net.c
@@ -1613,6 +1613,62
Add fast dequeue function just like enqueue function, fast dequeue
function will not support chained nor indirect descriptors, normal
function will handle that.
Signed-off-by: Marvin Liu
diff --git a/lib/librte_vhost/vhost.h b/lib/librte_vhost/vhost.h
index f24026acd..329a7658b 100644
--- a/lib
Split vhost enqueue and dequeue shadow used ring update function.
Vhost enqueue shadow used descs update will be calculated by cache
line. Enqueue sshadow used descs update will be buffered until exceed
one cache line.
Signed-off-by: Marvin Liu
diff --git a/lib/librte_vhost/vhost.h b/lib
In fast enqueue function, will first check whether descriptors are
cache aligned. Fast enqueue function will check prerequisites in the
beginning. Fast enqueue function do not support chained mbufs, normal
function will handle that.
Signed-off-by: Marvin Liu
diff --git a/lib/librte_vhost
Rewrite vhost enqueue function and meanwhile left space for later flush
enqeueue shadow used descriptors changes.
Signed-off-by: Marvin Liu
diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c
index 5b85b832d..003aec1d4 100644
--- a/lib/librte_vhost/virtio_net.c
+++ b/lib
Vhost fast enqueue function will flush used ring immediately.
Descriptor's flag is pre-calculated by macro.
Signed-off-by: Marvin Liu
diff --git a/lib/librte_vhost/vhost.h b/lib/librte_vhost/vhost.h
index b8198747e..d084fe364 100644
--- a/lib/librte_vhost/vhost.h
+++ b/lib/librte_vhost/vh
Vhost dequeue function will buffer used descriptors as many as possible,
so that shadow used element should itself contain descriptor index and
wrap counter. First shadowed ring index also be recorded.
Signed-off-by: Marvin Liu
diff --git a/lib/librte_vhost/vhost.h b/lib/librte_vhost/vhost.h
Vhost fast dequeue function will flush used ring immediately.
Descriptor's flag is pre-calculated by macro.
Signed-off-by: Marvin Liu
diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c
index 83ed2d599..cd51ed47a 100644
--- a/lib/librte_vhost/virtio_net.c
+++
When inorder feature bit is negotiated, just update first used
descriptor with last descriptor index. It can reflect all used
descriptors.
Signed-off-by: Marvin Liu
diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c
index 0f9292eb0..6bcf565f0 100644
--- a/lib
Vhost dequeue function will try to handle packed descriptors four by
four. If packed descriptors can't be handled by fast path, will try
normal path. Loop will skip skip when normal path can't receive packet.
Zero copy function is following same logic.
Signed-off-by: Marvin Liu
diff -
Modified vhost zero copy dequeue function which followed fast dequeue
function.
Signed-off-by: Marvin Liu
diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c
index a3b1e85fe..7094944cf 100644
--- a/lib/librte_vhost/virtio_net.c
+++ b/lib/librte_vhost/virtio_net.c
Vhost enqueue function will try to handle packed descriptors four by
four. If packed descriptors can't be handled by fast path, will try
normal path. Loop will skip when normal path can't emit packet.
Signed-off-by: Marvin Liu
diff --git a/lib/librte_vhost/virtio_net.c b/lib/li
Signed-off-by: Marvin Liu
diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c
index 6bcf565f0..df8dcbe1f 100644
--- a/lib/librte_vhost/virtio_net.c
+++ b/lib/librte_vhost/virtio_net.c
@@ -97,72 +97,6 @@ update_shadow_used_ring_split(struct vhost_virtqueue *vq,
vq
Add macro for unifying Clang/ICC/GCC unroll pragma format. Batch
functions were contained of several small loops which optimized by
compiler’s loop unrolling pragma.
Signed-off-by: Marvin Liu
diff --git a/lib/librte_vhost/Makefile b/lib/librte_vhost/Makefile
index 8623e91c0..30839a001 100644
Add vhost single packet dequeue function for packed ring and meanwhile
left space for shadow used ring update function.
Signed-off-by: Marvin Liu
diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c
index 5e08f7d9b..17aabe8eb 100644
--- a/lib/librte_vhost/virtio_net.c
desc number changed to (RING_SZ - PKT_BURST)
- Optimize dequeue used ring update when in_order negotiated
Marvin Liu (14):
vhost: add single packet enqueue function
vhost: unify unroll pragma parameter
vhost: add batch enqueue function for packed ring
vhost: add single packet dequeue fun
Add vhost enqueue function for single packet and meanwhile left space
for flush used ring function.
Signed-off-by: Marvin Liu
diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c
index 5b85b832d..520c4c6a8 100644
--- a/lib/librte_vhost/virtio_net.c
+++ b/lib/librte_vhost
Batch enqueue function will first check whether descriptors are cache
aligned. It will also check prerequisites in the beginning. Batch
enqueue function not support chained mbufs, single packet enqueue
function will handle it.
Signed-off-by: Marvin Liu
diff --git a/lib/librte_vhost/vhost.h b
201 - 300 of 417 matches
Mail list logo