In VM2NIC case zero copy may need some tuning to get best performance. This
patch describes the zero copy starved case and provides a tuning tip.
Signed-off-by: Junjie Chen
---
doc/guides/prog_guide/vhost_lib.rst | 20
1 file changed, 12 insertions(+), 8 deletions(-)
diff
Update license to SPDX, also add Intel license.
Signed-off-by: Junjie Chen
---
drivers/net/vhost/rte_eth_vhost.c | 34 +++---
drivers/net/vhost/rte_eth_vhost.h | 35 +++
2 files changed, 6 insertions(+), 63 deletions(-)
diff --git a
Update license to SPDX, also add Intel license.
Signed-off-by: Junjie Chen
---
drivers/net/vhost/rte_eth_vhost.c | 34 +++---
1 file changed, 3 insertions(+), 31 deletions(-)
diff --git a/drivers/net/vhost/rte_eth_vhost.c
b/drivers/net/vhost/rte_eth_vhost.c
index
register a epoll event fd
to associate rx queues with interrupt vectors.
Signed-off-by: Junjie Chen
---
Changes in v6:
- rebase code to master
Changes in v5:
- update license to DPDK new license format
- rebase code to master
Changes in v4:
- revert back license change
Changes in v3:
- handle failure
From: "Chen, Junjie"
When vhost backend works in dequeue zero copy mode, nic locks virtio's
buffer until there is less or equal than tx_free_threshold buffer remain
and then free number of tx burst buffer. This causes packets drop in
virtio side and impacts zero copy performance. So we need to in
From: "Chen, Junjie"
Sometimes gcc does not inline the function despite keyword *inline*,
we obeserve rte_movX is not inline when doing performance profiling,
so use *always_inline* keyword to force gcc to inline the function.
Signed-off-by: Chen, Junjie
---
.../common/include/arch/x86/rte_mem
* but by queues pointers or other separated variable(s).
Fixes: 30a701a53737 ("net/vhost: fix crash when creating vdev
dynamically")
Signed-off-by: Junjie Chen
Tested-by: Jens Freimann
---
Changes in v3:
- remove useless log in queue status showing
Changes in v2:
- use started to deter
* but by queues pointers or other separated variable(s).
Fixes: 30a701a53737 ("net/vhost: fix crash when creating vdev
dynamically")
Signed-off-by: Junjie Chen
---
Changes in v2:
- use started to determine vhost queues readiness
- revert setting started to zero in destroy_device
d
* but by queues pointers or other separated variable(s).
Fixes: 30a701a53737 ("net/vhost: fix crash when creating vdev
dynamically")
Signed-off-by: Junjie Chen
---
drivers/net/vhost/rte_eth_vhost.c | 64 +++
1 file changed, 38 insertions(+), 26
register a epoll event fd
to associate rx queues with interrupt vectors.
Signed-off-by: Junjie Chen
---
Changes in v5:
- update license to DPDK new license format
- rebase code to master
Changes in v4:
- revert back license change
Changes in v3:
- handle failure in the middle of intr setup.
- use
register a epoll event fd
to associate rx queues with interrupt vectors.
Signed-off-by: Junjie Chen
---
Changes in v4:
- revert back license change
Changes in v3:
- handle failure in the middle of intr setup.
- use vhost API to enable interrupt.
- rebase to check rxq existence.
- update vhost API to
register a epoll event fd
to associate rx queues with interrupt vectors.
Signed-off-by: Junjie Chen
---
Changes in v3:
- handle failure in the middle of intr setup.
- use vhost API to enable interrupt.
- rebase to check rxq existence.
- update vhost API to support guest notification.
Changes in v2
When creating vdev dynamically, vhost pmd driver starts directly without
checking TX/RX queues are ready or not, and thus causes segmentation fault
when vhost library accesses queues. This patch adds a flag to check whether
queues are setup or not, and adds queues setup into dev_start function to
a
it after setting up queue.
Signed-off-by: Junjie Chen
---
Changes in v2:
- check queue status in new_device, create queue in dev_start if not setup yet
drivers/net/vhost/rte_eth_vhost.c | 73 ---
1 file changed, 53 insertions(+), 20 deletions(-)
diff --git a
register a epoll event fd
to associate rx queues with interrupt vectors.
Signed-off-by: Junjie Chen
---
Changes in v2:
- update rx queue index
- fill efd_counter_size for intr handler
- update log
drivers/net/vhost/rte_eth_vhost.c | 130 ++
1 file changed, 130
it after setting up queue.
Fixes: aed0b12930b33("net/vhost: fix socket file deleted on stop")
Signed-off-by: Junjie Chen
---
drivers/net/vhost/rte_eth_vhost.c | 21 +++--
1 file changed, 19 insertions(+), 2 deletions(-)
diff --git a/drivers/net/vhost/rte_eth_vhost.c
In vhost-switch example, when binding nic to vfio-pci with iommu enabled,
dequeue zero copy cannot work in VM2NIC mode due to no iommu dma mapping
is setup for guest memory currently.
Signed-off-by: Junjie Chen
---
Changes in V4:
- make words more accurate
Changes in V3:
- update limitation to
In vhost-switch example, when binding nic to vfio-pci with iommu enabled,
dequeue zero copy cannot work in VM2NIC mode due to no iommu dma mapping
is setup for guest memory currently.
Signed-off-by: Junjie Chen
---
Changes in V3:
- update limitation to iommu
Changes in V2:
- add doc in vhost lib
In vhost-switch example, when binding nic to vfio-pci, dequeue zero
copy cannot work in VM2NIC mode due to no iommu dma mapping is setup
for guest memory currently.
Signed-off-by: Junjie Chen
---
Changes in V2:
- add doc in vhost lib
doc/guides/prog_guide/vhost_lib.rst | 3 +++
doc/guides
In vhost-switch example, when binding nic to vfio-pci, dequeue zero
copy cannot work in VM2NIC mode due to no iommu dma mapping is setup
for guest memory currently.
Signed-off-by: Junjie Chen
---
doc/guides/sample_app_ug/vhost.rst | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff
register a epoll event fd
to associate rx queues with interrupt vectors.
Signed-off-by: Junjie Chen
---
drivers/net/vhost/rte_eth_vhost.c | 116 ++
1 file changed, 116 insertions(+)
diff --git a/drivers/net/vhost/rte_eth_vhost.c
b/drivers/net/vhost
dequeue zero copy change buf_addr and buf_iova of mbuf, and return
to mbuf pool without restore them, it breaks vm memory if others allocate
mbuf from same pool since mbuf reset doesn't reset buf_addr and buf_iova.
Signed-off-by: Junjie Chen
---
v2 changes:
Remove useless restore
dequeue zero copy change buf_addr and buf_iova of mbuf, and return
to mbuf pool without restore them, it breaks vm memory if others allocate
mbuf from same pool since mbuf reset doesn't reset buf_addr and buf_iova.
Signed-off-by: Junjie Chen
---
lib/librte_vhost/virtio_net.c
When vhost reallocate dev and vq for NUMA enabled case, it doesn't perform
deep copy, which lead to 1) zmbuf list not valid 2) remote memory access.
This patch is to re-initlize the zmbuf list and also do the deep copy.
Signed-off-by: Junjie Chen
---
lib/librte_vhost/vhost_user.c
interrupt when index reach used_event.
The device can suppress notification in a manner analogous to the ways
driver suppress interrupt. The device manipulates flags or avail_event in
the used ring in the same way the driver manipulates flags or used_event in
available ring.
Signed-off-by: Junjie Chen
ARP packets are not dropped when dest vdev is itself, which breaks
RX ring inconspicuously.
Fixes: 9c5ef51207c6 ("examples/vhost: handle broadcast packet")
Signed-off-by: Junjie Chen
---
v2:
- Add fixline in commit message.
examples/vhost/main.c | 3 ++-
1 file changed, 2 insert
ARP packets are not dropped when dest vdev is itself, which breaks
RX ring inconspicuously.
Signed-off-by: Junjie Chen
---
examples/vhost/main.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/examples/vhost/main.c b/examples/vhost/main.c
index 89a61f0..10a7f5d 100644
feature in vhost.
Signed-off-by: Junjie Chen
v6:
Use volatile qualifier to access avail event idx.
v5:
Remove updating avail event index in backend.
v2-v4:
Use definition of VIRTIO_F_EVENT_IDX from kernel.
---
lib/librte_vhost/vhost.h | 3 +++
lib/librte_vhost/virtio_net.c | 46
feature in vhost.
Signed-off-by: Junjie Chen
v5:
Remove updating avail event index in backend.
v2-v4:
Use definition of VIRTIO_F_EVENT_IDX from kernel.
---
lib/librte_vhost/Makefile | 1 +
lib/librte_vhost/vhost.h | 3 +++
lib/librte_vhost/virtio_net.c | 47
This fix dequeue zero copy can not work with Qemu
version >= 2.7. Since from Qemu 2.7 virtio device
use virtio-1 protocol, the zero copy code path
forget to add offset to buffer address.
Signed-off-by: Junjie Chen
---
lib/librte_vhost/virtio_net.c | 3 ++-
1 file changed, 2 insertions(+)
This patch add a restriction to multi-process support: secondary
processes should only run alongside primary process with same DPDK
version, so that secondary processes can use the same hugepage mmap
layout as primary process.
Signed-off-by: Junjie Chen
---
v3 changes:
Use 'note' mark
31 matches
Mail list logo