DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH v5 00/11] user space vhost library and vhost example
@ 2014-09-26  9:45 Huawei Xie
  2014-09-26  9:45 ` [dpdk-dev] [PATCH v5 01/11] lib/librte_vhost: move src files in vhost example to vhost lib directory Huawei Xie
                   ` (10 more replies)
  0 siblings, 11 replies; 23+ messages in thread
From: Huawei Xie @ 2014-09-26  9:45 UTC (permalink / raw)
  To: dev

This set of patches transforms and refactors vhost example to a user
space vhost library and a new vhost example based on this library.
This library implements a user space vhost cuse driver, and provides
generic APIs for user space ethernet vSwitch to integrate us-vhost for
fast packet switching with guest virtio.

The vhost lib consists of five APIs puls several other helper routines.
1) rte_vhost_driver_register initialises vhost driver.
2) rte_vhost_driver_callback_register registers new_device/destroy_device
callbacks. Those callbacks should be implemented in ethernet switch application.
new_device is called when a virtio_device is ready for processing.
destroy_device is called when a virtio_device is de-activated by guest.
3) rte_vhost_driver_session_start starts vhost driver
4) rte_vhost_enqueue_burst and rte_vhost_dequeue_burst for enqueue/dequeue
to/from virtio ring.

Change notes:
  v2) Turn of vhost lib by default
  v3) Fixed checkpatch issues
  v4) Split the monolithic patch
  v5) Merge merge-able rx/tx and mbuf change. Lots of coding style fixes.

Huawei Xie (11):
  1) move src files in vhost example to vhost lib directory.
  2) copy vhost rx/tx functions from main.c to a new file vhost_rxtx.c.
  3) remove main.c and main.h in vhost lib.
  4) rename virtio-net.h to rte_virtio_net.h as API header file.
  5) VMDQ, MAC learning related switching logic are removed from library.
  6) zero copy logic isn't generic enough at this stage, and is moved to example.
  7) retry logic is moved from vhost rx functions in vhost lib to switch_worker
switching function in example.
  8) add TODOs/FIXME   
    -allow application to disable cmpset reserve in rte_vhost_enqueue_burst in case
     there is no contention.      
    -fix memcpy from mbuf to vring desc when mbuf is chained and the
    desc couldn't hold all the data
    -fix vhost_set_mem_table possible race condition: two vqs concurrently   
     calls set_mem_table which cause saved mem_temp to be overided.  
  9) merge vhost merge-able rx
  10) for vhost tx, previous vhost merge-able feature introduces another version of
    virtio_dev_merge_tx, and calls virtio_dev_tx and vritio_dev_merge_tx
    respectively depends on whether the vhost device supports merge-able feature.
    Actually "merge-able" tx is the fix for memcpy from chained vring desc to mbuf.
    will use virtio_dev_merge_tx as the base for vhost tx.
  11) merge mbuf patch in vhost lib.
  12) fixes serious coding style issues.
  13) add vhost lib Makefile and vhost lib support in DPDK makefile. vhost lib is turned
off by default as it requires fuse-devel package.
  14) copy old vhost example files main.c and main.h as the base for new vhost example
  15) modify vhost example to use vhost lib API, and merge Oliver's mbuf patch.
 

 config/common_linuxapp                       |    8 +
 examples/vhost/Makefile                      |   10 +-
 examples/vhost/eventfd_link/Makefile         |   39 -
 examples/vhost/eventfd_link/eventfd_link.c   |  205 ----
 examples/vhost/eventfd_link/eventfd_link.h   |   79 --
 examples/vhost/libvirt/qemu-wrap.py          |  367 -------
 examples/vhost/main.c                        | 1465 +++++++-------------------
 examples/vhost/main.h                        |   47 +-
 examples/vhost/vhost-net-cdev.c              |  367 -------
 examples/vhost/vhost-net-cdev.h              |   83 --
 examples/vhost/virtio-net.c                  | 1165 --------------------
 examples/vhost/virtio-net.h                  |  161 ---
 lib/Makefile                                 |    1 +
 lib/librte_vhost/Makefile                    |   48 +
 lib/librte_vhost/eventfd_link/Makefile       |   39 +
 lib/librte_vhost/eventfd_link/eventfd_link.c |  205 ++++
 lib/librte_vhost/eventfd_link/eventfd_link.h |   79 ++
 lib/librte_vhost/libvirt/qemu-wrap.py        |  367 +++++++
 lib/librte_vhost/rte_virtio_net.h            |  207 ++++
 lib/librte_vhost/vhost-net-cdev.c            |  362 +++++++
 lib/librte_vhost/vhost-net-cdev.h            |  113 ++
 lib/librte_vhost/vhost_rxtx.c                |  737 +++++++++++++
 lib/librte_vhost/virtio-net.c                | 1029 ++++++++++++++++++
 mk/rte.app.mk                                |    5 +
 24 files changed, 3636 insertions(+), 3552 deletions(-)
 delete mode 100644 examples/vhost/eventfd_link/Makefile
 delete mode 100644 examples/vhost/eventfd_link/eventfd_link.c
 delete mode 100644 examples/vhost/eventfd_link/eventfd_link.h
 delete mode 100755 examples/vhost/libvirt/qemu-wrap.py
 delete mode 100644 examples/vhost/vhost-net-cdev.c
 delete mode 100644 examples/vhost/vhost-net-cdev.h
 delete mode 100644 examples/vhost/virtio-net.c
 delete mode 100644 examples/vhost/virtio-net.h
 create mode 100644 lib/librte_vhost/Makefile
 create mode 100644 lib/librte_vhost/eventfd_link/Makefile
 create mode 100644 lib/librte_vhost/eventfd_link/eventfd_link.c
 create mode 100644 lib/librte_vhost/eventfd_link/eventfd_link.h
 create mode 100755 lib/librte_vhost/libvirt/qemu-wrap.py
 create mode 100644 lib/librte_vhost/rte_virtio_net.h
 create mode 100644 lib/librte_vhost/vhost-net-cdev.c
 create mode 100644 lib/librte_vhost/vhost-net-cdev.h
 create mode 100644 lib/librte_vhost/vhost_rxtx.c
 create mode 100644 lib/librte_vhost/virtio-net.c

-- 
1.8.1.4

^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2014-09-30  8:00 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-26  9:45 [dpdk-dev] [PATCH v5 00/11] user space vhost library and vhost example Huawei Xie
2014-09-26  9:45 ` [dpdk-dev] [PATCH v5 01/11] lib/librte_vhost: move src files in vhost example to vhost lib directory Huawei Xie
2014-09-29 19:41   ` Thomas Monjalon
2014-09-30  2:07     ` Xie, Huawei
2014-09-30  4:35       ` Thomas Monjalon
2014-09-26  9:45 ` [dpdk-dev] [PATCH v5 02/11] lib/librte_vhost: refactor vhost lib for subsequent transform Huawei Xie
2014-09-29 19:55   ` Thomas Monjalon
2014-09-29 20:00     ` Thomas Monjalon
2014-09-26  9:45 ` [dpdk-dev] [PATCH v5 03/11] lib/librte_vhost: vhost lib transform Huawei Xie
2014-09-29 19:51   ` Thomas Monjalon
2014-09-26  9:45 ` [dpdk-dev] [PATCH v5 04/11] lib/librte_vhost: merge vhost merge-able rx. merge vhost tx fix Huawei Xie
2014-09-26  9:45 ` [dpdk-dev] [PATCH v5 05/11] lib/librte_vhost: merge Oliver's mbuf change Huawei Xie
2014-09-29 19:44   ` Thomas Monjalon
     [not found]     ` <C37D651A908B024F974696C65296B57B0F2AF2C0@SHSMSX101.ccr.corp.intel.com>
2014-09-30  3:41       ` Ouyang, Changchun
2014-09-30  4:46       ` Thomas Monjalon
2014-09-30  6:43         ` Xie, Huawei
2014-09-30  8:06           ` Thomas Monjalon
2014-09-26  9:45 ` [dpdk-dev] [PATCH v5 06/11] lib/librte_vhost: fixes serious coding style issues Huawei Xie
2014-09-26  9:45 ` [dpdk-dev] [PATCH v5 07/11] lib/librte_vhost: add vhost support in DPDK makefile Huawei Xie
2014-09-26  9:45 ` [dpdk-dev] [PATCH v5 08/11] examples/vhost: copy old vhost example src file Huawei Xie
2014-09-26  9:45 ` [dpdk-dev] [PATCH v5 09/11] examples/vhost: vhost example based on vhost lib API Huawei Xie
2014-09-26  9:45 ` [dpdk-dev] [PATCH v5 10/11] examples/vhost: merge oliver's mbuf changes to vhost example Huawei Xie
2014-09-26  9:45 ` [dpdk-dev] [PATCH v5 11/11] examples/vhost: add vhost example Makefile Huawei Xie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).