Show a cover letter.

GET /api/covers/54954/?format=api
Content-Type: application/json
Vary: Accept

    "id": 54954,
    "url": "",
    "web_url": "",
    "project": {
        "id": 1,
        "url": "",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "",
        "list_email": "",
        "web_url": "",
        "scm_url": "git://",
        "webscm_url": ""
    "msgid": "<>",
    "date": "2019-06-19T15:14:25",
    "name": "[00/28] vhost: add virtio-vhost-user transport",
    "submitter": {
        "id": 1339,
        "url": "",
        "name": "Nikos Dragazis",
        "email": ""
    "mbox": "",
    "series": [
            "id": 5082,
            "url": "",
            "web_url": "",
            "date": "2019-06-19T15:14:25",
            "name": "vhost: add virtio-vhost-user transport",
            "version": 1,
            "mbox": ""
    "comments": "",
    "headers": {
        "X-Mailer": "git-send-email 2.7.4",
        "List-Id": "DPDK patches and discussions <>",
        "From": "Nikos Dragazis <>",
        "List-Help": "<>",
        "Date": "Wed, 19 Jun 2019 18:14:25 +0300",
        "X-Mailman-Version": "2.1.15",
        "Delivered-To": "",
        "Content-Type": "text/plain; charset=UTF-8",
        "List-Subscribe": "<>,\n\t<>",
        "Cc": "Maxime Coquelin <>,\n\tTiwei Bie <>, Zhihong Wang <>,\n\tStefan Hajnoczi <>, Wei Wang <>,\n\tStojaczyk Dariusz <>,\n\tVangelis Koukis <>",
        "To": "",
        "Errors-To": "",
        "Sender": "\"dev\" <>",
        "Return-Path": "<>",
        "X-BeenThere": "",
        "List-Post": "<>",
        "Received": [
            "from [] (localhost [])\n\tby (Postfix) with ESMTP id E45AF1C33E;\n\tWed, 19 Jun 2019 17:15:36 +0200 (CEST)",
            "from ( [])\n\tby (Postfix) with ESMTP id A8F672BEA\n\tfor <>; Wed, 19 Jun 2019 17:15:35 +0200 (CEST)",
            "from (mail.arr [])\n\tby (Postfix) with ESMTP id 67424182004;\n\tWed, 19 Jun 2019 18:15:35 +0300 (EEST)",
            "from localhost.localdomain (unknown [])\n\tby (Postfix) with ESMTPSA id C07DD2B2;\n\tWed, 19 Jun 2019 18:15:34 +0300 (EEST)"
        "List-Archive": "<>",
        "Subject": "[dpdk-dev] [PATCH 00/28] vhost: add virtio-vhost-user transport",
        "MIME-Version": "1.0",
        "Message-Id": "<>",
        "Precedence": "list",
        "Content-Transfer-Encoding": "8bit",
        "List-Unsubscribe": "<>,\n\t<>",
        "X-Original-To": ""
    "content": "Hi everyone,\n\nthis patch series introduces the concept of the virtio-vhost-user\ntransport. This is actually a revised version of an earlier RFC\nimplementation that has been proposed by Stefan Hajnoczi [1]. Though\nthis is a great feature, it seems to have been stalled, so I’d like to\nrestart the conversation on this and hopefully get it merged with your\nhelp. Let me give you an overview.\n\nThe virtio-vhost-user transport is a vhost-user transport implementation\nthat is based on the virtio-vhost-user device. Its key difference with\nthe existing transport is that it allows deploying vhost-user targets\ninside dedicated Storage Appliance VMs instead of host user space. In\nother words, it allows having guests that act as vhost-user backends for\nother guests.\n\nThe virtio-vhost-user device implements the vhost-user control plane\n(master-slave communication) as follows:\n\n1. it parses the vhost-user messages from the vhost-user unix domain\n   socket and forwards them to the slave guest through virtqueues\n\n2. it maps the vhost memory regions in QEMU’s process address space and\n   exposes them to the slave guest as a RAM-backed PCI MMIO region\n\n3. it hooks up doorbells to the callfds. The slave guest can use these\n   doorbells to interrupt the master guest driver\n\nThe device code has not yet been merged into upstream QEMU, but this is\ndefinitely the end goal. The current state is that we are awaiting for\nthe approval of the virtio spec.\n\nI have Cced Darek from the SPDK community who has helped me a lot by\nreviewing this series. Note that any device type could be implemented\nover this new transport. So, adding the virtio-vhost-user transport in\nDPDK would allow using it from SPDK as well.\n\nGetting into the code internals, this patch series makes the following\nchanges:\n\n1. introduce a generic interface for the transport-specific operations.\n   Each of the two available transports, the pre-existing AF_UNIX\n   transport and the virtio-vhost-user transport, is going to implement\n   this interface. The AF_UNIX-specific code has been extracted from the\n   core vhost-user code and is now part of the AF_UNIX transport\n   implementation in trans_af_unix.c.\n\n2. introduce the virtio-vhost-user transport. The virtio-vhost-user\n   transport requires a driver for the virtio-vhost-user devices. The\n   driver along with the transport implementation have been packed into\n   a separate library in `drivers/virtio_vhost_user/`. The necessary\n   virtio-pci code has been copied from `drivers/net/virtio/`. Some\n   additional changes have been made so that the driver can utilize the\n   additional resources of the virtio-vhost-user device.\n\n3. update librte_vhost public API to enable choosing transport for each\n   new vhost device. Extend the vhost net driver and vhost-scsi example\n   application to export this new API to the end user.\n\nThe primary changes I did to Stefan’s RFC implementation are the\nfollowing:\n\n1. moved postcopy live migration code into trans_af_unix.c. Postcopy\n   live migration relies on the userfault fd mechanism, which cannot be\n   supported by virtio-vhost-user.\n\n2. moved setup of the log memory region into trans_af_unix.c. Setting up\n   the log memory region involves mapping/unmapping guest memory. This\n   is an AF_UNIX transport-specific operation.\n\n3. introduced a vhost transport operation for\n   process_slave_message_reply()\n\n4. moved the virtio-vhost-user transport/driver into a separate library\n   in `drivers/virtio_vhost_user/`. This required making vhost.h and\n   vhost_user.h part of librte_vhost public API and exporting some\n   private symbols via the version script. This looks better to me that\n   just moving the entire librte_vhost into `drivers/`. I am not sure if\n   this is the most appropriate solution. I am looking forward to your\n   suggestions on this.\n\n5. made use of the virtio PCI capabilities for the additional device\n   resources (doorbells, shared memory). This required changes in\n   virtio_pci.c and trans_virtio_vhost_user.c.\n\n6. [minor] changed some commit headlines to comply with\n\n\nPlease, have a look and let me know about your thoughts. Any\nreviews/pointers/suggestions are welcome.\n\nBest regards,\nNikos\n\n[1]\n\n\nNikos Dragazis (23):\n  vhost: introduce vhost transport operations structure\n  vhost: move socket management code\n  vhost: move socket fd and un sockaddr\n  vhost: move vhost-user connection\n  vhost: move vhost-user reconnection\n  vhost: move vhost-user fdset\n  vhost: propagate vhost transport operations\n  vhost: use a single structure for the device state\n  vhost: extract socket I/O into transport\n  vhost: move slave request fd and lock\n  vhost: move mmap/munmap\n  vhost: move setup of the log memory region\n  vhost: remove main fd parameter from msg handlers\n  vhost: move postcopy live migration code\n  vhost: support registering additional vhost-user transports\n  drivers/virtio_vhost_user: add virtio PCI framework\n  drivers: add virtio-vhost-user transport\n  drivers/virtio_vhost_user: use additional device resources\n  vhost: add flag for choosing vhost-user transport\n  net/vhost: add virtio-vhost-user support\n  mk: link apps with virtio-vhost-user driver\n  config: add option for the virtio-vhost-user transport\n  usertools: add virtio-vhost-user devices to\n\nStefan Hajnoczi (5):\n  vhost: allocate per-socket transport state\n  vhost: move start server/client calls\n  vhost: add index field in vhost virtqueues\n  examples/vhost_scsi: add --socket-file argument\n  examples/vhost_scsi: add virtio-vhost-user support\n\n config/common_base                                 |    6 +\n config/common_linux                                |    1 +\n drivers/Makefile                                   |    5 +\n drivers/net/vhost/rte_eth_vhost.c                  |   13 +\n drivers/virtio_vhost_user/Makefile                 |   27 +\n .../              |    4 +\n .../virtio_vhost_user/trans_virtio_vhost_user.c    | 1077 +++++++++++++++++++\n drivers/virtio_vhost_user/virtio_pci.c             |  520 ++++++++++\n drivers/virtio_vhost_user/virtio_pci.h             |  289 ++++++\n drivers/virtio_vhost_user/virtio_vhost_user.h      |   18 +\n drivers/virtio_vhost_user/virtqueue.h              |  181 ++++\n examples/vhost_scsi/vhost_scsi.c                   |  103 +-\n lib/librte_vhost/Makefile                          |    4 +-\n lib/librte_vhost/rte_vhost.h                       |    1 +\n lib/librte_vhost/             |   11 +\n lib/librte_vhost/socket.c                          |  685 +-----------\n lib/librte_vhost/trans_af_unix.c                   | 1094 ++++++++++++++++++++\n lib/librte_vhost/vhost.c                           |   22 +-\n lib/librte_vhost/vhost.h                           |  298 +++++-\n lib/librte_vhost/vhost_user.c                      |  474 ++-------\n lib/librte_vhost/vhost_user.h                      |   10 +-\n mk/                                      |    6 +\n usertools/                          |    7 +\n 23 files changed, 3764 insertions(+), 1092 deletions(-)\n create mode 100644 drivers/virtio_vhost_user/Makefile\n create mode 100644 drivers/virtio_vhost_user/\n create mode 100644 drivers/virtio_vhost_user/trans_virtio_vhost_user.c\n create mode 100644 drivers/virtio_vhost_user/virtio_pci.c\n create mode 100644 drivers/virtio_vhost_user/virtio_pci.h\n create mode 100644 drivers/virtio_vhost_user/virtio_vhost_user.h\n create mode 100644 drivers/virtio_vhost_user/virtqueue.h\n create mode 100644 lib/librte_vhost/trans_af_unix.c"