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 eventfd_co
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
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 | 39
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/Makefile
with 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
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(+), 20
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
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
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
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
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_cuse
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
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
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 device
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
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
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
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_vhost
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
- 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 files
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
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 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 ++
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/vhost_
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
of mbufs,
otherwise rte_pktmbuf_free_bulk has to call rte_pktmbuf_free to free
the mbuf one by one.
This patchset will not provide this symmetric implementation.
Huawei Xie (2):
mbuf: provide rte_pktmbuf_alloc_bulk API
vhost: call rte_pktmbuf_alloc_bulk in vhost dequeue
lib/librte_mbuf
pre-allocate a bulk of mbufs instead of allocating one mbuf a time on demand
Signed-off-by: Gerald Rogers
Signed-off-by: Huawei Xie
Acked-by: Konstantin Ananyev
---
lib/librte_vhost/vhost_rxtx.c | 35 ++-
1 file changed, 22 insertions(+), 13 deletions(-)
diff
to the same mbuf memory pool,
it could directly call rte_mempool_put to free the bulk of mbufs,
otherwise rte_pktmbuf_free_bulk has to call rte_pktmbuf_free to free
the mbuf one by one.
This patchset will not provide this symmetric implementation.
Huawei Xie (2):
mbuf: provide rte_pktmbuf_alloc_bulk
v2 changes:
unroll the loop a bit to help the performance
rte_pktmbuf_alloc_bulk allocates a bulk of packet mbufs.
There is related thread about this bulk API.
http://dpdk.org/dev/patchwork/patch/4718/
Thanks to Konstantin's loop unrolling.
Signed-off-by: Gerald Rogers
Signed-off-by: Huawei
pre-allocate a bulk of mbufs instead of allocating one mbuf a time on demand
Signed-off-by: Gerald Rogers
Signed-off-by: Huawei Xie
Acked-by: Konstantin Ananyev
---
lib/librte_vhost/vhost_rxtx.c | 35 ++-
1 file changed, 22 insertions(+), 13 deletions(-)
diff
implementation, we use while() loop rather than do{} while() loop
because we could not assume count is strictly positive. Using while()
loop saves one line of check if count is zero.
Signed-off-by: Gerald Rogers
Signed-off-by: Huawei Xie
Acked-by: Konstantin Ananyev
---
lib/librte_mbuf/rte_mbuf.h | 49
pre-allocate a bulk of mbufs instead of allocating one mbuf a time on demand
Signed-off-by: Gerald Rogers
Signed-off-by: Huawei Xie
Acked-by: Konstantin Ananyev
---
lib/librte_vhost/vhost_rxtx.c | 35 ++-
1 file changed, 22 insertions(+), 13 deletions(-)
diff
rte_pktmbuf_free_bulk has to call rte_pktmbuf_free to free
the mbuf one by one.
This patchset will not provide this symmetric implementation.
Huawei Xie (2):
mbuf: provide rte_pktmbuf_alloc_bulk API
vhost: call rte_pktmbuf_alloc_bulk in vhost dequeue
lib/librte_mbuf/rte_mbuf.h| 49
implementation, we use while() loop rather than do{} while() loop
because we could not assume count is strictly positive. Using while()
loop saves one line of check if count is zero.
Signed-off-by: Gerald Rogers
Signed-off-by: Huawei Xie
Acked-by: Konstantin Ananyev
---
lib/librte_mbuf/rte_mbuf.h | 49
v4 changes:
fix a silly typo in error handling when rte_pktmbuf_alloc fails
reported by haifeng
pre-allocate a bulk of mbufs instead of allocating one mbuf a time on demand
Signed-off-by: Gerald Rogers
Signed-off-by: Huawei Xie
Acked-by: Konstantin Ananyev
Acked-by: Yuanhan Liu
Tested
is still manipulating the
device, which causes driver conflict.
This patch checks if there is any kernel driver manipulating the
virtio device before virtio PMD uses port IO to configure the device.
Huawei Xie (4):
eal: make the comment more accurate
eal: set kdrv to RTE_KDRV_NONE if kernel
Signed-off-by: Huawei Xie
---
lib/librte_eal/common/eal_common_pci.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/lib/librte_eal/common/eal_common_pci.c
b/lib/librte_eal/common/eal_common_pci.c
index dcfe947..bbcdb2b 100644
--- a/lib/librte_eal/common
Use RTE_KDRV_NONE to indicate that kernel driver isn't manipulating the
device.
Signed-off-by: Huawei Xie
---
lib/librte_eal/linuxapp/eal/eal_pci.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/librte_eal/linuxapp/eal/eal_pci.c
b/lib/librte_eal/linuxapp/eal/eal_pci.c
driver.
This patch checks if there is any kernel driver manipulating the virtio
device before virtio PMD uses IO port to configure the device.
Fixes: da978dfdc43b ("virtio: use port IO to get PCI resource")
Signed-off-by: Huawei Xie
---
drivers/net/virtio/virtio_ethdev.c | 7 +++
1 fi
,
it could directly call rte_mempool_put to free the bulk of mbufs,
otherwise rte_pktmbuf_free_bulk has to call rte_pktmbuf_free to free
the mbuf one by one.
This patchset will not provide this symmetric implementation.
Huawei Xie (2):
mbuf: provide rte_pktmbuf_alloc_bulk API
vhost: call
Rogers
Signed-off-by: Huawei Xie
Acked-by: Konstantin Ananyev
---
lib/librte_mbuf/rte_mbuf.h | 55 ++
1 file changed, 55 insertions(+)
diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h
index f234ac9..b2ed479 100644
--- a/lib
v4 changes:
fix a silly typo in error handling when rte_pktmbuf_alloc fails
reported by haifeng
pre-allocate a bulk of mbufs instead of allocating one mbuf a time on demand
Signed-off-by: Gerald Rogers
Signed-off-by: Huawei Xie
Acked-by: Konstantin Ananyev
Acked-by: Yuanhan Liu
Tested
Signed-off-by: Huawei Xie
---
drivers/net/virtio/virtio_ethdev.c | 12 +---
drivers/net/vmxnet3/vmxnet3_ethdev.c | 6 +++---
drivers/net/vmxnet3/vmxnet3_rxtx.c | 2 +-
3 files changed, 9 insertions(+), 11 deletions(-)
diff --git a/drivers/net/virtio/virtio_ethdev.c
b/drivers/net
Signed-off-by: Huawei Xie
---
drivers/net/virtio/virtio_ethdev.c | 12 +---
drivers/net/vmxnet3/vmxnet3_ethdev.c | 6 +++---
drivers/net/vmxnet3/vmxnet3_rxtx.c | 2 +-
3 files changed, 9 insertions(+), 11 deletions(-)
diff --git a/drivers/net/virtio/virtio_ethdev.c
b/drivers/net
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_vhost
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
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 | 88
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 changed, 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
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 file
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
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
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
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
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 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/librte_vhost
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 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
/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
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
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
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
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
This user space vhost library is provided aiming to facilitate integration with
DPDK accelerated vswitch.
Huawei Xie (1):
vhost library support to facilitate integration with DPDK accelerated vswitch.
config/common_linuxapp |7 +
lib/Makefile
Signed-off-by: Huawei Xie
Acked-by: Konstantin Ananyev
---
examples/vhost/Makefile | 52 +
examples/vhost/libvirt/qemu-wrap.py | 366 +
examples/vhost/main.c | 3047 +++
examples/vhost/main.h | 109 ++
4 files
This patchset fixes "set vlan filter" issue.
v2 changes:
* add two macros I40E_VFTA_IDX and I40E_VFTA_BIT for VFTA array operation.
v3 changes:
* code style fix
* rebase on latest commit
v4 changes:
* add more descriptive commit message
Huawei Xie (2):
vlan id set fix
add I40
">> 5" rather than ">> 4"
vlan id is a 12 bit value.
VFTA is 128 x 32 bit array (128 double word array) which could store 2^12 vlan
bits.
Each bit represents whether corresponding vlan tag is set in the VSI.
Use high 7 bits as the index for the double word a
Add two macros I40E_VFTA_IDX and I40E_VFTA_BIT for vlan filter search and set.
Add vlan_id check in vlan filter search and set function.
Signed-off-by: Huawei Xie
---
lib/librte_pmd_i40e/i40e_ethdev.c | 17 ++---
lib/librte_pmd_i40e/i40e_ethdev.h | 9 +
2 files changed, 19
the implementation and
are certain all NICs support
this well, add a remind message to user.
Signed-off-by: Huawei Xie
---
examples/vhost/main.c | 8 +++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/examples/vhost/main.c b/examples/vhost/main.c
index 0c76ece..d2c1852 100644
--- a/examples
This patchset refines vhost library to support both vhost-cuse and vhost-user.
Huawei Xie (12):
create vhost_cuse directory and move vhost-net-cdev.c to vhost_cuse directory
rename vhost-net-cdev.h as vhost-net.h
move eventfd_copy logic out from virtio-net.c to vhost-net-cdev.c
exact
vhost-net.h is the shared header file for both vhost-cuse and vhost-user
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
host_memory_map only maps partial memory of target process into current process
through shared backed file.
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
create virtio-net-cdev.c and copy host_memory_map into it.
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
Signed-off-by: Huawei Xie
---
lib/librte_vhost/vhost_user/vhost-net-user.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/librte_vhost/vhost_user/vhost-net-user.c
b/lib/librte_vhost/vhost_user/vhost-net-user.c
index 841d7e6..6b9ebd7 100644
--- a/lib/librte_vhost
Signed-off-by: Huawei Xie
---
lib/librte_vhost/vhost_user/fd_man.c | 205 +++
lib/librte_vhost/vhost_user/fd_man.h | 64 +++
2 files changed, 269 insertions(+)
create mode 100644 lib/librte_vhost/vhost_user/fd_man.c
create mode 100644 lib/librte_vhost
deals with vhost user memory map/unmap alignment
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
create vhost_cuse directory and move vhost-net-cdev.c to vhost_cuse directory
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
cuse_set_memory_table
Signed-off-by: Huawei Xie
---
lib/librte_vhost/Makefile | 2 +-
lib/librte_vhost/vhost-net.h | 4 +-
lib/librte_vhost/vhost_cuse/vhost-net-cdev.c | 7 +-
lib/librte_vhost/vhost_cuse/virtio-net-cdev.c | 85 +++
lib
vhost-user support
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 | 9 +
lib/librte_vhost/vhost_user/vhost-net-user.c | 422
close the memory region file descriptor
close the kick/callfd
vSwitch needs to run endlessly. resource leak is deadly issue.
Signed-off-by: Huawei Xie
---
lib/librte_vhost/vhost_user/vhost-net-user.c | 7 ++--
lib/librte_vhost/vhost_user/virtio-net-user.c | 59
Signed-off-by: Huawei Xie
Acked-by: Konstantin Ananyev
Acked-by: Thomos Long
---
config/common_linuxapp |6 +
lib/Makefile |1 +
lib/librte_vhost/Makefile| 48 ++
lib/librte_vhost/eventfd_link/Makefile
This user space vhost library is based off user space vhost example and aims to
provide same API for different vhost implementations. This implementation
includes user space vhost cuse driver, kernel module for eventfd proxy and
vhost enqueue/dequeue functionalities.
hxie5 (2):
vhost library
Signed-off-by: Huawei Xie
---
config/common_linuxapp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/config/common_linuxapp b/config/common_linuxapp
index 002ed84..5b58278 100644
--- a/config/common_linuxapp
+++ b/config/common_linuxapp
@@ -391,8 +391,9
This user space vhost library is based off user space vhost example and aims to
provide same API for different vhost implementations. This implementation
includes user space vhost cuse driver, kernel module for eventfd proxy and
vhost enqueue/dequeue functionalities.
Huawei Xie (1):
vhost
Signed-off-by: Huawei Xie
---
config/common_linuxapp |7 +
lib/Makefile |1 +
lib/librte_vhost/Makefile| 48 ++
lib/librte_vhost/eventfd_link/Makefile | 39 +
lib/librte_vhost/eventfd_link/eventfd_link.c
This transform is to facilitate integration with DPDK accelerated ethernet
switch.
Huawei Xie (3):
remove vhost example
vhost library support to facilitate integration with DPDK accelerated
vswitch
This vhost example is based on vhost library. Besides, -
This patch
Signed-off-by: Huawei Xie
Acked-by: Konstantin Ananyev
Acked-by: Thomos Long
---
examples/vhost/Makefile| 60 -
examples/vhost/eventfd_link/Makefile | 39 -
examples/vhost/eventfd_link/eventfd_link.c | 205 --
examples/vhost/eventfd_link/eventfd_link.h | 79
This library is turned off by default so that it doesn't break build on default
system.
Install fuse development library and turn it on.
Signed-off-by: Huawei Xie
Acked-by: Konstantin Ananyev
Acked-by: Thomos Long
---
config/common_linuxapp |7 +
lib/Makefile
Signed-off-by: Huawei Xie
Acked-by: Konstantin Ananyev
---
examples/vhost/Makefile | 52 +
examples/vhost/libvirt/qemu-wrap.py | 366
examples/vhost/main.c | 3145 +++
examples/vhost/main.h | 109 ++
4 files
) Turn off vhost lib by default
v3) Fixed checkpatch issues
v4) Split the patch per Thomas's requirement
Huawei Xie (5):
mv vhost example to vhost lib directory
copy the vhost rx/tx functions from main.c to new file vhost_rxtx.c
remove main.c main.h
remove Makefile
rename virtio-net.h
is applied.
Signed-off-by: Huawei Xie
Acked-by: Konstantin Ananyev
Acked-by: Tommy Long
---
lib/librte_vhost/Makefile | 48
lib/librte_vhost/rte_virtio_net.h | 179 ---
lib/librte_vhost/vhost-net-cdev.c | 35 +++---
lib/librte_vhost/vhost-net-cdev.h | 45
This vhost lib is based on old vhost example, and there are still plenty of
coding style issues left. Will fix those issues once this patch is applied.
Signed-off-by: Huawei Xie
Acked-by: Konstantin Ananyev
Acked-by: Tommy Long
---
lib/librte_vhost/rte_virtio_net.h | 52
lib
The build of vhost lib requires fuse development package. It is turned off by
default so as not to break DPDK build.
Signed-off-by: Huawei Xie
Acked-by: Konstantin Ananyev
Acked-by: Tommy Long
---
config/common_linuxapp | 7 +++
lib/Makefile | 1 +
mk/rte.app.mk | 5
is removed.
virtio-net.h is renamed to rte_virtio_net.h as API header file.
Signed-off-by: Huawei Xie
Acked-by: Konstantin Ananyev
Acked-by: Tommy Long
---
lib/librte_vhost/Makefile | 60 -
lib/librte_vhost/main.c | 3722 -
lib/librte_vhost
This commit creates vhost library directory, and copies vhost example into it.
Signed-off-by: Huawei Xie
Acked-by: Konstantin Ananyev
Acked-by: Tommy Long
---
examples/vhost/Makefile | 60 -
examples/vhost/eventfd_link/Makefile | 39 -
examples/vhost
Old vhost example consists of vhost cuse driver, virtio device management, and
VMDQ based packet switching logic.
vhost cuse driver and virtio device management are moved into vhost lib. This
patch modifies vhost example to use vhost lib API.
Huawei Xie (2):
copy main.c main.h from old vhost
packets to or receive packets from
guest virtio device. virtio_dev_rx/tx is removed.
5) zero copy feature is implemented in the example.
6) mergable rx/tx will be implemented in vhost lib.
Signed-off-by: Huawei Xie
---
examples/vhost/Makefile | 52 ++
examples/vhost/main.c | 1455
main.c and main.h are refactored to become vhost lib in vhost lib patch, thus
are removed. Here they are copied back from old vhost example without any
modification.
Signed-off-by: Huawei Xie
---
examples/vhost/main.c | 3722 +
examples/vhost
1 - 100 of 299 matches
Mail list logo