Would move all rx/tx related declarations into this header file in future.
Add RTE_VIRTIO_PMD_MAX_BURST.
Signed-off-by: Huawei Xie
---
drivers/net/virtio/virtio_ethdev.c | 1 +
drivers/net/virtio/virtio_rxtx.c | 1 +
drivers/net/virtio/virtio_rxtx.h | 34
mance boost could be observed only if the virtio backend isn't the
bottleneck or in VM2VM
case.
There are also several vhost optimization patches to be submitted later.
Huawei Xie (7):
virtio: add virtio_rxtx.h header file
virtio: add software rx ring, fake_buf into virtqueue
virtio:
simple rx/tx func is enabled when user specifies single segment, no offload
support.
merge-able should be disabled to use simple rxtx.
Signed-off-by: Huawei Xie
---
drivers/net/virtio/virtio_rxtx.c | 12
1 file changed, 12 insertions(+)
diff --git a/drivers/net/virtio
bulk free of mbufs when clean used ring.
shift operation of idx could be further saved if vq_free_cnt means
free slots rather than free descriptors.
Signed-off-by: Huawei Xie
---
drivers/net/virtio/virtio_ethdev.h | 3 ++
drivers/net/virtio/virtio_rxtx_simple.c | 95
With fixed avail ring, we don't need to get desc idx from avail ring.
virtio driver only has to deal with desc ring.
This patch uses vector instruction to accelerate processing desc ring.
Signed-off-by: Huawei Xie
---
drivers/net/virtio/virtio_ethdev.h | 2 +
drivers/net/v
fill avail ring with blank mbufs in virtio_dev_vring_start
Signed-off-by: Huawei Xie
---
drivers/net/virtio/Makefile | 2 +-
drivers/net/virtio/virtio_rxtx.c| 6 ++-
drivers/net/virtio/virtio_rxtx.h| 3 ++
drivers/net/virtio/virtio_rxtx_simple.c | 84
+-+-+-+--+--+--+--+
||
||
++
Signed-off-by: Huawei Xie
---
drivers/net/virtio/virtio_rxtx.c | 24
1 file changed, 24 insertions(+)
diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c
index 5c00e9d..7c82a6a 100644
Add software RX ring in virtqueue.
Add fake_mbuf in virtqueue for wraparound processing.
Use global simple_rxtx to indicate whether simple rxtx is enabled
Signed-off-by: Huawei Xie
---
drivers/net/virtio/virtio_ethdev.c | 12
drivers/net/virtio/virtio_rxtx.c | 7 +++
drivers
Would move all rx/tx related code into this header file in future.
Add RTE_VIRTIO_PMD_MAX_BURST.
Signed-off-by: Huawei Xie
---
drivers/net/virtio/virtio_ethdev.c | 1 +
drivers/net/virtio/virtio_rxtx.c | 1 +
drivers/net/virtio/virtio_rxtx.h | 34 ++
3
nable simple R/TX processing when user specifies simple txq flags
- Reword some comments and commit messages
Huawei Xie (7):
virtio: add virtio_rxtx.h header file
virtio: add software rx ring, fake_buf into virtqueue
virtio: rx/tx ring layout optimization
virtio: fill RX avail ring with
nable simple R/TX processing when user specifies simple txq flags
- Reword some comments and commit messages
Huawei Xie (7):
virtio: add virtio_rxtx.h header file
virtio: add software rx ring, fake_buf into virtqueue
virtio: rx/tx ring layout optimization
virtio: fill RX avail ring with
Select simplified rx/tx when mergable isn't enabled and there is no
offload flags specified.
Signed-off-by: Huawei Xie
---
drivers/net/virtio/virtio_ethdev.c | 16 +---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/drivers/net/virtio/virtio_ethdev.c
b/driver
bulk free of mbufs when clean used ring.
shift operation of idx could be further saved if vq_free_cnt means
free slots rather than free descriptors.
Signed-off-by: Huawei Xie
---
drivers/net/virtio/virtio_ethdev.h | 3 ++
drivers/net/virtio/virtio_rxtx.c| 9
drivers/net
With fixed avail ring, we don't need to get desc idx from avail ring.
virtio driver only has to deal with desc ring.
This patch uses vector instruction to accelerate processing desc ring.
Signed-off-by: Huawei Xie
---
drivers/net/virtio/virtio_ethdev.h | 2 +
drivers/net/v
fill avail ring with blank mbufs in virtio_dev_vring_start
Signed-off-by: Huawei Xie
---
drivers/net/virtio/Makefile | 2 +-
drivers/net/virtio/virtio_rxtx.c| 14 +-
drivers/net/virtio/virtio_rxtx.h| 3 ++
drivers/net/virtio/virtio_rxtx_simple.c | 84
+-+-+-+--+--+--+--+
||
||
++
Signed-off-by: Huawei Xie
---
drivers/net/virtio/virtio_rxtx.c | 24
1 file changed, 24 insertions(+)
diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c
index dcc4524..b4d268d 100644
Add software RX ring in virtqueue.
Add fake_mbuf in virtqueue for wraparound processing.
Use simple_rxtx to indicate whether simple rxtx is enabled
Signed-off-by: Huawei Xie
---
drivers/net/virtio/virtio_ethdev.c | 12
drivers/net/virtio/virtio_rxtx.c | 5 +
drivers/net
Would move all rx/tx related code into this header file in future.
Add RTE_VIRTIO_PMD_MAX_BURST.
Signed-off-by: Huawei Xie
---
drivers/net/virtio/virtio_ethdev.c | 1 +
drivers/net/virtio/virtio_rxtx.c | 1 +
drivers/net/virtio/virtio_rxtx.h | 34 ++
3
Turned off by default. This is development feature.
Will remove this macro when this optimization gets widely accepted.
Signed-off-by: Huawei Xie
---
config/common_linuxapp | 1 +
1 file changed, 1 insertion(+)
diff --git a/config/common_linuxapp b/config/common_linuxapp
index 0de43d5..b70c5d7
+-+-+-+--+--+--+--+
||
||
++
Performance boost could be observed if the virtio backend isn't the bottleneck
or in VM2VM
case.
There are also several vhost optimization patches to be submitted later.
Huawei X
a".
v2 changes:
adapt to new rte_mbuf format
fixes pkt_mb[6] and [7] pkt_len issue
Signed-off-by: Huawei Xie
---
config/common_linuxapp | 1 +
drivers/net/virtio/Makefile | 2 +-
drivers/net/virtio/virtio_ethdev.c | 19 ++
drivers/net/virtio/virtio
In merge-able RX path, vhost injects interrupts to guest for each packet.
This should degrade performance a lot.
This patch fixes this issue by injecting one interrupt for a batch of packets.
Signed-off-by: Huawei Xie
---
lib/librte_vhost/vhost_rxtx.c | 7 +--
1 file changed, 5 insertions
used event idx is put at the end of available ring. It isn't taken into account
when we calculate the address of used ring. Fortunately, it doesn't introduce
the bug with fixed queue number 256 and 4KB alignment.
Signed-off-by: hxie5
---
drivers/net/virtio/virtio_ring.h | 2 +-
1 file changed, 1
This single patch is for people to get familiar with the optimization and is
for collecting feedbacks.
It isn't splitted because it is straightforward.
Haven't finished the cleanups.
The description and illustration of the idea is in a previous mail titled
"virtio optimization idea".
---
config
As orignal author of virtio PMD(coauthor with Rashmin) and vhost user, claim
responsibility for virtio PMD, vhost lib and vhost example.
v2 changes:
would claim xenvirt responsibility in another patch
Signed-off-by: Huawei Xie
---
MAINTAINERS | 1 +
1 file changed, 1 insertion
add comment for potential unwanted callback on listenfds
v4 changes:
add comment for potential unwanted callback on listenfds
Signed-off-by: Huawei Xie
---
lib/librte_vhost/vhost_user/fd_man.c | 7 +++
1 file changed, 7 insertions(+)
diff --git a/lib/librte_vhost/vhost_user/fd_man.c
b
update version map file for rte_vhost_driver_unregister API
v3 changes:
update version map file
Signed-off-by: Huawei Xie
---
lib/librte_vhost/rte_vhost_version.map | 8
1 file changed, 8 insertions(+)
diff --git a/lib/librte_vhost/rte_vhost_version.map
b/lib/librte_vhost
rte_vhost_driver_unregister API will remove the listenfd from event list,
and then close it.
v2 changes:
-minor code style fix, remove unnecessary new line
Signed-off-by: Huawei Xie
Signed-off-by: Peng Sun
---
lib/librte_vhost/rte_virtio_net.h| 3 ++
lib/librte_vhost/vhost_cuse
which would
wrongly clean up the new listenfd. A new function fdset_del_slot is provided
to cleanup the fd at the specified location.
v4 changes:
- call fdset_del_slot to remove connection fd
Signed-off-by: Huawei Xie
---
lib/librte_vhost/vhost_user/fd_man.c | 27 ++-
1
:
update version map file
v4 changes:
-add comment for potential unwanted callback on listenfds
-call fdset_del_slot to remove connection fd
Huawei Xie (4):
fdset_del_slot
vhost socket cleanup
version map file update
add comment for potential unwanted call on listenfds
lib/librte_vhost
Previous vhost-cuse implementation requires fuse development package.
Now that we have vhost-user implementation, which is enabled by default
and doesn't require additional library to build, we could turn on vhost.
Signed-off-by: Huawei Xie
---
config/common_linuxapp | 2 +-
1 file chang
endif in rte.app.mk
- fix new_ll_dev and new_vq allocation failure issue
- return old virtio device if new_ll_dev isn't allocated
Signed-off-by: Huawei Xie
---
config/common_linuxapp| 1 +
lib/librte_vhost/Makefile | 4 ++
lib/librte_vhost/virtio-net.c
use rte_malloc to allocate vhost device and queues
Signed-off-by: Huawei Xie
---
lib/librte_vhost/virtio-net.c | 19 ++-
1 file changed, 10 insertions(+), 9 deletions(-)
diff --git a/lib/librte_vhost/virtio-net.c b/lib/librte_vhost/virtio-net.c
index 4672e67..19b74d6 100644
vring
descriptor table, we will try to reallocate vhost device and queues to the same
numa node.
Huawei Xie (2):
use rte_malloc to allocate vhost device and queues
reallocate vhost device and queues when we get the address of vring
descriptor table
config/common_linuxapp| 1 +
lib/librte_
Signed-off-by: Huawei Xie
---
lib/librte_mbuf/rte_mbuf_version.map | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/librte_mbuf/rte_mbuf_version.map
b/lib/librte_mbuf/rte_mbuf_version.map
index 7ae2244..543dc4c 100644
--- a/lib/librte_mbuf/rte_mbuf_version.map
+++ b
update version map file for rte_vhost_driver_unregister API
v3 changes:
update version map file
Signed-off-by: Huawei Xie
---
lib/librte_vhost/rte_vhost_version.map | 8
1 file changed, 8 insertions(+)
diff --git a/lib/librte_vhost/rte_vhost_version.map
b/lib/librte_vhost
rte_vhost_driver_unregister API will remove the listenfd for the specified path
from event processing list, and then close it.
v2 changes:
-minor code style fix: remove unnecessary new line
Signed-off-by: Huawei Xie
Signed-off-by: Peng Sun
---
lib/librte_vhost/rte_virtio_net.h
vhost user could register multiple unix domain socket server, and use the path
to identify the virtio device connecting to it.
rte_vhost_driver_unregister will clean up the unix domain socket for the
specified path.
Huawei Xie (2):
vhost socket cleanup
update version map file for
- return old virtio device if new_ll_dev isn't allocated
Signed-off-by: Huawei Xie
---
config/common_linuxapp| 1 +
lib/librte_vhost/Makefile | 4 ++
lib/librte_vhost/virtio-net.c | 93 +++
mk/rte.app.mk | 4 ++
4
use rte_malloc to allocate vhost device and queues
Signed-off-by: Huawei Xie
---
lib/librte_vhost/virtio-net.c | 19 ++-
1 file changed, 10 insertions(+), 9 deletions(-)
diff --git a/lib/librte_vhost/virtio-net.c b/lib/librte_vhost/virtio-net.c
index 4672e67..19b74d6 100644
vring
descriptor table, we will try to reallocate vhost device and queues to the same
numa node.
Huawei Xie (2):
use rte_malloc to allocate vhost device and queues
reallocate vhost device and queues when we get the address of vring
descriptor table
config/common_linuxapp| 1 +
lib/librte_
rte_vhost_driver_unregister will remove the listenfd from event list, and then
close it.
Signed-off-by: Huawei Xie
Signed-off-by: Peng Sun
---
lib/librte_vhost/rte_virtio_net.h| 3 ++
lib/librte_vhost/vhost_cuse/vhost-net-cdev.c | 9
lib/librte_vhost/vhost_user/vhost-net
When we get the address of vring descriptor table in VHOST_SET_VRING_ADDR
message,
will try to reallocate virtio_net device and virtqueue to the same numa node.
Signed-off-by: Huawei Xie
---
config/common_linuxapp| 1 +
lib/librte_vhost/Makefile | 4 ++
lib/librte_vhost/virtio
use rte_malloc/free for virtio_net and virt queue allocation/free
Signed-off-by: Huawei Xie
---
lib/librte_vhost/virtio-net.c | 19 ++-
1 file changed, 10 insertions(+), 9 deletions(-)
diff --git a/lib/librte_vhost/virtio-net.c b/lib/librte_vhost/virtio-net.c
index 4672e67
node of vring
descriptors, so we will try to reallocate virtio_net and vhost virt queue to
the same numa node.
Huawei Xie (2):
use rte_malloc/free for virtio_net and virt_queue memory data allocation/free
When we get the address of vring descriptor table, will try to reallocate
virtio_net d
rte_vhost_driver_unregister will remove the listenfd from event list, and then
close it.
Signed-off-by: Huawei Xie
Signed-off-by: Peng Sun
---
lib/librte_vhost/rte_virtio_net.h| 3 ++
lib/librte_vhost/vhost_cuse/vhost-net-cdev.c | 9
lib/librte_vhost/vhost_user/vhost-net
rte_vhost_driver_unregister will remove the listenfd from event list, and then
close it.
Signed-off-by: Huawei Xie
Signed-off-by: Peng Sun
---
lib/librte_vhost/rte_virtio_net.h| 3 ++
lib/librte_vhost/vhost_cuse/vhost-net-cdev.c | 9
lib/librte_vhost/vhost_user/vhost-net
When we get the address of vring descriptor table in VHOST_SET_VRING_ADDR
message,
will try to reallocate virtio_net device and virtqueue to the same numa node.
Signed-off-by: Huawei Xie
---
config/common_linuxapp| 1 +
lib/librte_vhost/Makefile | 4 ++
lib/librte_vhost/virtio
use rte_malloc/free for virtio_net and virt queue allocation/free
Signed-off-by: Huawei Xie
---
lib/librte_vhost/virtio-net.c | 19 ++-
1 file changed, 10 insertions(+), 9 deletions(-)
diff --git a/lib/librte_vhost/virtio-net.c b/lib/librte_vhost/virtio-net.c
index 4672e67
node of vring
descriptors, so we will try to reallocate virtio_net and vhost virt queue to
the same numa node.
Huawei Xie (2):
use rte_malloc/free for virtio_net and virt_queue memory data allocation/free
When we get the address of vring descriptor table, will try to reallocate
virtio_net d
When we migrate VM, without this feature, qemu will report error:
"migrate: Migration disabled: vhost lacks VHOST_F_LOG_ALL feature".
Signed-off-by: Krishna Murthy
---
lib/librte_vhost/virtio-net.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/librte_vhost/virtio-net
vhost enabled vSwitch could have their own thread-safe vring enqueue policy.
Add the RTE_LIBRTE_VHOST_LOCKLESS_ENQ macro for vhost lockless enqueue.
Turn it off by default.
Signed-off-by: Huawei Xie
---
config/common_linuxapp| 1 +
lib/librte_vhost/vhost_rxtx.c | 24
e is more
buffer to process through used->idx. If it sees a stale value, it will exit the
processing while host willn't send interrupt to guest.
Signed-off-by: Huawei Xie
---
lib/librte_vhost/vhost_rxtx.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a/lib/librte_vhost/v
update of used->idx and read of avail->flags could be reordered.
memory fence should be used to ensure the order, otherwise guest could see a
stale used->idx value after it toggles the interrupt suppression flag.
Signed-off-by: Huawei Xie
---
lib/librte_vhost/vhost_rxtx.c | 3 ++
fix the error "missing initializer" and "cast to pointer from integer of
different size".
For the pointer to integer cast issue, need to investigate changing the typeof
mapped_address.
Signed-off-by: Huawei Xie
---
lib/librte_vhost/vhost_user/vhost-net-user.c | 2
Turn on CONFIG_RTE_LIBRTE_VHOST to enable vhost.
vhost-user is turned on by default. Turn off CONFIG_RTE_LIBRTE_VHOST_USER to
enable vhost-cuse implementation.
Signed-off-by: Huawei Xie
---
config/common_linuxapp| 4 +++-
lib/librte_vhost/Makefile | 11 +--
2 files changed, 12
add vhost user documentation
Signed-off-by: Huawei Xie
---
doc/guides/prog_guide/vhost_lib.rst | 52 ++---
1 file changed, 42 insertions(+), 10 deletions(-)
diff --git a/doc/guides/prog_guide/vhost_lib.rst
b/doc/guides/prog_guide/vhost_lib.rst
index 0b6eda7
add vhost user documentation
fix some minor issues
Signed-off-by: Huawei Xie
---
doc/guides/sample_app_ug/vhost.rst | 123 -
1 file changed, 94 insertions(+), 29 deletions(-)
diff --git a/doc/guides/sample_app_ug/vhost.rst
b/doc/guides/sample_app_ug
/intel_dpdk_xen_based_packet_switch_sol.rst
+Linux Xen VIRTIO
+M: Huawei Xie
+F: lib/librte_pmd_xenvirt/
+F: examples/vhost_xen/
+F: doc/guides/prog_guide/intel_dpdk_xen_based_packet_switch_sol.rst
+
FreeBSD EAL (with overlaps)
M: Bruce Richardson
F: lib/librte_eal/bsdapp/Makefile
@@ -226,6 +232,7 @@ F: lib/librte_pmd_mlx4/
F
/intel_dpdk_xen_based_packet_switch_sol.rst
+Linux Xen VIRTIO
+M: Huawei Xie
+F: lib/librte_pmd_xenvirt/
+F: examples/vhost_xen/
+F: doc/guides/prog_guide/intel_dpdk_xen_based_packet_switch_sol.rst
+
FreeBSD EAL (with overlaps)
M: Bruce Richardson
F: lib/librte_eal/bsdapp/Makefile
@@ -226,6 +232,7 @@ F: lib/librte_pmd_mlx4/
F
This avoids closing -1 in our case.
Signed-off-by: Huawei Xie
---
lib/librte_vhost/virtio-net.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/lib/librte_vhost/virtio-net.c b/lib/librte_vhost/virtio-net.c
index 6917fcf..4672e67 100644
--- a/lib/librte_vhost/virtio
Previous vhost implementation wrongly name kickfd as callfd and callfd as
kickfd.
It is functional correct, but causes confusion.
Signed-off-by: Huawei Xie
---
examples/vhost/main.c | 6 +++---
lib/librte_vhost/rte_virtio_net.h | 4 ++--
lib/librte_vhost
This patch reorder the code a bit to use loop instead of goto.
Besides, remove abudant check 'fd != -1'.
Signed-off-by: Huawei Xie
---
lib/librte_vhost/vhost_user/fd_man.c | 26 +++---
1 file changed, 11 insertions(+), 15 deletions(-)
diff --git a/lib/li
combine sleep into select when there is no file descriptors to be monitored.
Signed-off-by: Huawei Xie
---
lib/librte_vhost/vhost_user/fd_man.c | 13 +++--
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/lib/librte_vhost/vhost_user/fd_man.c
b/lib/librte_vhost/vhost_user
This patch fixes the segfault issue in the case vhost receives new
VHOST_SET_MEM_TABLE message without VHOST_VRING_GET_VRING_BASE(which we uses as
the stop message).
Signed-off-by: Huawei Xie
---
lib/librte_vhost/vhost_user/virtio-net-user.c | 4
1 file changed, 4 insertions(+)
diff
efore rte_vhost_driver_unregister.
Signed-off-by: Huawei Xie
---
lib/librte_vhost/vhost_user/fd_man.c | 63 +---
lib/librte_vhost/vhost_user/fd_man.h | 5 ++-
lib/librte_vhost/vhost_user/vhost-net-user.c | 34 +--
3 files changed, 82 insertions(+
for vhost-cuse, ifname is the name of the tap device
for vhost-user, ifname is the name of the unix domain socket path
Signed-off-by: Huawei Xie
---
lib/librte_vhost/rte_virtio_net.h | 3 +-
lib/librte_vhost/vhost-net.h | 3 ++
lib/librte_vhost/vhost_cuse/vhost
different socket path. Virtio devices from
same VM will connect to VM specific socket. The socket path information is
stored in the virtio_net structure.
Signed-off-by: Huawei Xie
---
lib/librte_vhost/Makefile | 8 +-
lib/librte_vhost/rte_virtio_net.h | 2 +
lib
for more generic event driven processing, refer to:
http://libevent.org/
Signed-off-by: Huawei Xie
---
lib/librte_vhost/vhost_user/fd_man.c | 207 +++
lib/librte_vhost/vhost_user/fd_man.h | 64 +++
2 files changed, 271 insertions(+)
create mode
remove set_memory_table ops
vhost-cuse or vhost-user will both implement their own set_memory_region
handler.
In current vhost-cuse implementation, guest numa memory isn't supported.
Assume that guest memory is backed by only one file.
Signed-off-by: Huawei Xie
---
lib/librte_vhost/Mak
This functions accepts a virtual address and pid(qemu), and maps it into
current process(vhost)'s address space.
The memory behind the virtual address should be backed by a file,
and virtual address should be the starting address.
Signed-off-by: Huawei Xie
---
lib/librte_vhost/vhost
Signed-off-by: Huawei Xie
---
lib/librte_vhost/vhost_cuse/virtio-net-cdev.c | 257 ++
1 file changed, 257 insertions(+)
create mode 100644 lib/librte_vhost/vhost_cuse/virtio-net-cdev.c
diff --git a/lib/librte_vhost/vhost_cuse/virtio-net-cdev.c
b/lib/librte_vhost
vhost-user doesn't need eventfd kernel module to copy fds between processes.
Signed-off-by: Huawei Xie
---
lib/librte_vhost/Makefile| 2 +-
lib/librte_vhost/vhost_cuse/eventfd_copy.c | 88
lib/librte_vhost/vhost_cuse/eventfd_copy.h
This file defines common operations provided by virtio-net(.c).
Signed-off-by: Huawei Xie
---
lib/librte_vhost/vhost-net-cdev.h| 113 ---
lib/librte_vhost/vhost-net.h | 113 +++
lib/librte_vhost/vhost_cuse/vhost-net
for both vhost-cuse and
vhost-user.
Signed-off-by: Huawei Xie
---
lib/librte_vhost/Makefile| 4 +-
lib/librte_vhost/vhost-net-cdev.c| 389 ---
lib/librte_vhost/vhost_cuse/vhost-net-cdev.c | 389 +++
3 files changed
In virtnet_send_command:
/* Caller should know better */
BUG_ON(!virtio_has_feature(vi->vdev, VIRTIO_NET_F_CTRL_VQ) ||
(out + in > VIRTNET_SEND_COMMAND_SG_MAX));
Signed-off-by: Huawei Xie
---
lib/librte_vhost/virtio-net.c | 3 ++-
1 file changed, 2 inse
that "FD_ISSET would crash when receive
-1
as fd on Ubuntu 14.04".
Huawei Xie (11):
enable VIRTIO_NET_F_CTRL_RX
create vhost_cuse directory and move vhost-net-cdev.c into vhost_cuse
rename vhost-net-cdev.h to vhost-net.h
move fd copying(from qemu process into vhost process) to event
Signed-off-by: Huawei Xie
---
examples/vhost/main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/examples/vhost/main.c b/examples/vhost/main.c
index 04f0118..3a35359 100644
--- a/examples/vhost/main.c
+++ b/examples/vhost/main.c
@@ -1308,8 +1308,8 @@ switch_worker
add mutext to protect fdset
Signed-off-by: Huawei Xie
---
lib/librte_vhost/vhost_user/fd_man.c | 39 +++-
lib/librte_vhost/vhost_user/fd_man.h | 2 ++
lib/librte_vhost/vhost_user/vhost-net-user.c | 19 +-
3 files changed, 48 insertions(+), 12
for vhost-cuse, ifname is the name of the tap device
for vhost-user, ifname is the name of the unix domain socket path
* provide a common set_ifname ops in virtio-net.c
* redefine the size of dev->ifname to fit both vhost-cuse and vhost-user
Signed-off-by: Huawei Xie
---
lib/librte_vh
allowed to be called multiple times to specify different socket path for
different
virtio device. The socket path is then set in the virtio_net device.
Signed-off-by: Huawei Xie
---
lib/librte_vhost/Makefile | 8 +-
lib/librte_vhost/rte_virtio_net.h | 2 +
lib
Signed-off-by: Huawei Xie
---
lib/librte_vhost/vhost_cuse/virtio-net-cdev.c | 12 ++--
lib/librte_vhost/virtio-net.h | 43 +++
2 files changed, 53 insertions(+), 2 deletions(-)
create mode 100644 lib/librte_vhost/virtio-net.h
diff --git a/lib
for more generic event driven processing, refer:
http://libevent.org/
Signed-off-by: Huawei Xie
---
lib/librte_vhost/vhost_user/fd_man.c | 207 +++
lib/librte_vhost/vhost_user/fd_man.h | 64 +++
2 files changed, 271 insertions(+)
create mode
regions to set_memory_table ops provided by virtio-net.
Signed-off-by: Huawei Xie
---
lib/librte_vhost/Makefile | 2 +-
lib/librte_vhost/vhost-net.h | 5 +-
lib/librte_vhost/vhost_cuse/vhost-net-cdev.c | 7 +-
lib/librte_vhost/vhost_cuse/virtio-net
This functions accepts a virtual address and pid(qemu), and maps it into
current process(vhost)'s address space.
The memory behind the virtual address should be backed by a file(normally a
hugepage
file), and virtual address should be the starting address.
Signed-off-by: Huawei Xie
---
Signed-off-by: Huawei Xie
---
lib/librte_vhost/vhost_cuse/virtio-net-cdev.c | 258 ++
1 file changed, 258 insertions(+)
create mode 100644 lib/librte_vhost/vhost_cuse/virtio-net-cdev.c
diff --git a/lib/librte_vhost/vhost_cuse/virtio-net-cdev.c
b/lib/librte_vhost
eventfd copy is vhost-cuse specific.
vhost-user doesn't need eventfd kernel module to copy fds between processes.
fd is automatically installed into target process through unix domain socket.
Signed-off-by: Huawei Xie
---
lib/librte_vhost/Makefile| 2 +-
lib/librte_
This file defines common operations provided by virtio-net(.c).
Signed-off-by: Huawei Xie
---
lib/librte_vhost/vhost-net-cdev.h| 113 ---
lib/librte_vhost/vhost-net.h | 113 +++
lib/librte_vhost/vhost_cuse/vhost-net
message is pre-processed there and then sent to
virtio-net(virtio-net.c)
module if necessary. Some message handling is terminated in vhost-cuse or
vhost-user.
virtio-net.c provides common message handling for both vhost-cuse and
vhost-user.
Signed-off-by: Huawei Xie
---
lib/librte_vhost/Makefile
out + in > VIRTNET_SEND_COMMAND_SG_MAX));
Signed-off-by: Huawei Xie
---
lib/librte_vhost/virtio-net.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/librte_vhost/virtio-net.c b/lib/librte_vhost/virtio-net.c
index b041849..52b4957 100644
--- a/lib/librte_vhost/virtio
crash when receive
-1
as fd on Ubuntu 14.04".
Huawei Xie (12):
enable VIRTIO_NET_F_CTRL_RX
create vhost_cuse directory and move vhost-net-cdev.c into vhost_cuse
rename vhost-net-cdev.h to vhost-net.h
move fd copying(from qemu process into vhost process) to eventfd_copy.c
copy host_
Signed-off-by: Huawei Xie
---
lib/librte_vhost/Makefile | 2 +-
lib/librte_vhost/rte_virtio_net.h | 3 +-
lib/librte_vhost/vhost-net.h | 3 +
lib/librte_vhost/vhost_cuse/eventfd_copy.c| 89 +++
lib/librte_vhost
Signed-off-by: Huawei Xie
---
lib/librte_vhost/vhost_user/vhost-net-user.c | 57 +++-
lib/librte_vhost/vhost_user/vhost-net-user.h | 1 -
2 files changed, 40 insertions(+), 18 deletions(-)
diff --git a/lib/librte_vhost/vhost_user/vhost-net-user.c
b/lib/librte_vhost
Signed-off-by: Huawei Xie
---
lib/librte_vhost/vhost_user/vhost-net-user.c | 4 ++
lib/librte_vhost/vhost_user/virtio-net-user.c | 56 +++
lib/librte_vhost/vhost_user/virtio-net-user.h | 1 +
3 files changed, 45 insertions(+), 16 deletions(-)
diff --git a/lib
Signed-off-by: Huawei Xie
---
lib/librte_vhost/rte_virtio_net.h | 2 +
lib/librte_vhost/vhost-net.h | 2 -
lib/librte_vhost/vhost_user/vhost-net-user.h | 3 +-
lib/librte_vhost/vhost_user/virtio-net-user.c | 109 --
4 files changed
Signed-off-by: Huawei Xie
---
lib/librte_vhost/Makefile | 5 +-
lib/librte_vhost/vhost-net.h | 4 +
lib/librte_vhost/vhost_cuse/virtio-net-cdev.c | 12 +-
lib/librte_vhost/vhost_user/fd_man.c | 4 +-
lib/librte_vhost/vhost_user/vhost-net
for generic event driver processing, refer to:
http://libevent.org/
Signed-off-by: Huawei Xie
---
lib/librte_vhost/vhost_user/fd_man.c | 207 +++
lib/librte_vhost/vhost_user/fd_man.h | 64 +++
2 files changed, 271 insertions(+)
create mode
Signed-off-by: Huawei Xie
---
lib/librte_vhost/Makefile | 2 +-
lib/librte_vhost/vhost-net.h | 5 +-
lib/librte_vhost/vhost_cuse/vhost-net-cdev.c | 7 +-
lib/librte_vhost/vhost_cuse/virtio-net-cdev.c | 85 +++
lib/librte_vhost/vhost_cuse/virtio
Signed-off-by: Huawei Xie
---
lib/librte_vhost/vhost_cuse/virtio-net-cdev.c | 43 +--
1 file changed, 20 insertions(+), 23 deletions(-)
diff --git a/lib/librte_vhost/vhost_cuse/virtio-net-cdev.c
b/lib/librte_vhost/vhost_cuse/virtio-net-cdev.c
index fbfc403..58ac3dd
Signed-off-by: Huawei Xie
---
lib/librte_vhost/vhost_cuse/virtio-net-cdev.c | 258 ++
1 file changed, 258 insertions(+)
create mode 100644 lib/librte_vhost/vhost_cuse/virtio-net-cdev.c
diff --git a/lib/librte_vhost/vhost_cuse/virtio-net-cdev.c
b/lib/librte_vhost
101 - 200 of 324 matches
Mail list logo