Skip to content

user space vhost library

Huawei Xie dpdk-dev 3 versions – Applied

Status from this message: Applied

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v6 Latest25 patches 4 repliesApplied
  2. v511 patches 12 repliesSuperseded
  3. v13 patches 7 repliesSuperseded

Patches in v6 Applied

#Subject and filesSizeRepliesApplied
1/25lib/librte_vhost: move src files from examples/vhost to lib/librte_vhostexamples/vhost/Makefile examples/vhost/eventfd_link/Makefile examples/vhost/eventfd_link/eventfd_link.c +17 more+6193 -63390 replies
2/25lib/librte_vhost: rename main.c to vhost_rxtx.c and virtio-net.h to rte_virtio_net.hlib/librte_vhost/main.c lib/librte_vhost/rte_virtio_net.h lib/librte_vhost/vhost_rxtx.c +1 more+3888 -38880 replies
3/25lib/librte_vhost: clean unused codes in vhost_rxtx.clib/librte_vhost/vhost_rxtx.c+45 -30050 replies
4/25lib/librte_vhost: remove mac learning, VMDQ, mac/vlan and other switching related logiclib/librte_vhost/rte_virtio_net.h lib/librte_vhost/vhost_rxtx.c lib/librte_vhost/virtio-net.c+0 -390 replies
5/25lib/librte_vhost: remove zero copy memory region generation logiclib/librte_vhost/rte_virtio_net.h lib/librte_vhost/virtio-net.c+0 -1960 replies
6/25lib/librte_vhost: remove retry logiclib/librte_vhost/vhost_rxtx.c+0 -340 replies
7/25lib/librte_vhost: patch virtio_dev_merge_tx to return packets to upper layerlib/librte_vhost/vhost_rxtx.c+7 -50 replies
8/25lib/librte_vhost: calculate mbuf sizelib/librte_vhost/vhost_rxtx.c+7 -100 replies
9/25lib/librte_vhost: add queue_id parameter to vhost rx/tx functions.lib/librte_vhost/vhost_rxtx.c+17 -30 replies
10/25lib/librte_vhost: define PACKET_BURSTlib/librte_vhost/vhost_rxtx.c+2 -00 replies
11/25lib/librte_vhost: rte_vhost_en/dequeue_burst APIlib/librte_vhost/vhost_rxtx.c+12 -40 replies
12/25lib/librte_vhost: move virtio_net_config_ll structure to virtio_net.clib/librte_vhost/rte_virtio_net.h lib/librte_vhost/virtio-net.c+8 -90 replies
13/25lib/librte_vhost: remove index parameterlib/librte_vhost/vhost-net-cdev.c+5 -110 replies
14/25lib/librte_vhost: call get_virtio_net_callbacks to get internal ops in register_cuse_devicelib/librte_vhost/rte_virtio_net.h lib/librte_vhost/vhost-net-cdev.c lib/librte_vhost/vhost-net-cdev.h+3 -30 replies
15/25lib/librte_vhost: rte_vhost_driver_register and rte_vhost_session_start APIlib/librte_vhost/rte_virtio_net.h lib/librte_vhost/vhost-net-cdev.c lib/librte_vhost/vhost-net-cdev.h+7 -40 replies
16/25lib/librte_vhost: rename init_virtio_net to rte_vhost_callback_registerlib/librte_vhost/rte_virtio_net.h lib/librte_vhost/virtio-net.c+3 -120 replies
17/25lib/librte_vhost: vhost APIslib/librte_vhost/rte_virtio_net.h lib/librte_vhost/virtio-net.c+101 -00 replies
18/25lib/librte_vhost: add debug printlib/librte_vhost/vhost-net-cdev.h+31 -00 replies
19/25lib/librte_vhost: VHOST SUPPORTED FEATURESlib/librte_vhost/virtio-net.c+3 -20 replies
20/25lib/librte_vhost: header file cleanupslib/librte_vhost/rte_virtio_net.h lib/librte_vhost/vhost-net-cdev.c lib/librte_vhost/vhost-net-cdev.h +2 more+23 -280 replies
21/25lib/librte_vhost: static variable fixeslib/librte_vhost/vhost-net-cdev.c+4 -40 replies
22/25lib/librte_vhost: add priv context field to virtio_net structurelib/librte_vhost/rte_virtio_net.h+1 -00 replies
23/25lib/librte_vhost: coding style fixeslib/librte_vhost/rte_virtio_net.h lib/librte_vhost/vhost-net-cdev.c lib/librte_vhost/vhost-net-cdev.h +2 more+293 -2670 replies
24/25lib/librte_vhost: add TODO/FIXME for identified issues.lib/librte_vhost/vhost-net-cdev.c lib/librte_vhost/vhost_rxtx.c+3 -00 replies
25/25lib/librte_vhost: add vhost support in Makefileconfig/common_linuxapp lib/Makefile lib/librte_vhost/Makefile +1 more+62 -00 replies

Reviews trailers per patch

None of the 25 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchChangchun Ouyang
SeriesA-b
1/25
2/25
3/25
4/25
5/25
6/25
7/25
8/25
9/25
10/25
11/25
12/25
13/25
14/25
15/25
16/25
17/25
18/25
19/25
20/25
21/25
22/25
23/25
24/25
25/25

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v6 thread

Cover letter [PATCH v6 00/25] user space vhost library

This set of patches transforms and refactors vhost example to a user space vhost 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.

vhost lib consists of five APIs plus several helper routines for feature disable/enable.
1) rte_vhost_driver_register initializes vhost driver.
2) rte_vhost_driver_callback_register registers the callbacks. Callbacks are called from vhost driver when a virtio device is ready to be added to the data processing core or is de-activated by guest.
3) rte_vhost_driver_session_start, a blocking API to start vhost message handler session loop.
4) rte_vhost_enqueue_burst and rte_vhost_dequeue_burst for enqueue/dequeue packets to/from virtio ring respectively.

v2) turn off vhost lib by default

v3) fixed checkpatch issues

v4) split the patch per thomas' requirement

v5) fine granularity split of the patch
regenerate patches based on latest commit
this patchset removes vhost example patches, which will be
submitted later.

Huawei Xie (25):
move src files from examples/vhost to lib/librte_vhost
rename main.c to vhost_rxtx.c and virtio-net.h to rte_vhost_net.h
keep virtio_dev_(merge_)rx, copy_from_mbuf_to_vring and virtio_dev_merge_tx; remove anything else in vhost_rxtx.c remove mac learning, mac/vlan, VMDQ and other switching related logic
remove host memory region region related logic
remove retry
patch virtio_dev_merge_tx to make it return packets to app
patch vhost_dev_merge_tx about buf_size
add queue_id parameter to vhost rx/tx functions
define PACKET_BURST
rte_vhost_en/dequeue_burst API
move virtio_net_config_ll strcture to virtio_net.c
remove index
call get_virtio_net_callbacks to get the ops in register_cuse_device
rte_vhost_driver_register and rte_vhost_session_start API
rte_vhost_callback_register API
add debug print
define VHOST_SUPPORTED_FEATURES
header file cleanup
static fix
add priv field in virtio_net to store application specific context
coding style fixes
add TODO/FIXME
add vhost support in Makefile

 config/common_linuxapp                       |    8 +
 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 -
 examples/vhost/libvirt/qemu-wrap.py          |  367 ---
 examples/vhost/main.c                        | 3727 --------------------------
 examples/vhost/main.h                        |   86 -
 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/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            |  208 ++
 lib/librte_vhost/vhost-net-cdev.c            |  360 +++
 lib/librte_vhost/vhost-net-cdev.h            |  113 +
 lib/librte_vhost/vhost_rxtx.c                |  733 +++++
 lib/librte_vhost/virtio-net.c                | 1028 +++++++
 mk/rte.app.mk                                |    5 +
 23 files changed, 3146 insertions(+), 6339 deletions(-)
 delete mode 100644 examples/vhost/Makefile
 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/main.c
 delete mode 100644 examples/vhost/main.h
 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/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
Signature · 1 line
1.8.1.4