Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/54988/?format=api
http://patches.dpdk.org/api/patches/54988/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/1560957293-17294-23-git-send-email-ndragazis@arrikto.com/", "project": { "id": 1, "url": "http://patches.dpdk.org/api/projects/1/?format=api", "name": "DPDK", "link_name": "dpdk", "list_id": "dev.dpdk.org", "list_email": "dev@dpdk.org", "web_url": "http://core.dpdk.org", "scm_url": "git://dpdk.org/dpdk", "webscm_url": "http://git.dpdk.org/dpdk", "list_archive_url": "https://inbox.dpdk.org/dev", "list_archive_url_format": "https://inbox.dpdk.org/dev/{}", "commit_url_format": "" }, "msgid": "<1560957293-17294-23-git-send-email-ndragazis@arrikto.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1560957293-17294-23-git-send-email-ndragazis@arrikto.com", "date": "2019-06-19T15:14:47", "name": "[22/28] vhost: add flag for choosing vhost-user transport", "commit_ref": null, "pull_url": null, "state": "rfc", "archived": true, "hash": "ec596158b9059b8bc90c609723bef9dbcf952c7b", "submitter": { "id": 1339, "url": "http://patches.dpdk.org/api/people/1339/?format=api", "name": "Nikos Dragazis", "email": "ndragazis@arrikto.com" }, "delegate": { "id": 2642, "url": "http://patches.dpdk.org/api/users/2642/?format=api", "username": "mcoquelin", "first_name": "Maxime", "last_name": "Coquelin", "email": "maxime.coquelin@redhat.com" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/1560957293-17294-23-git-send-email-ndragazis@arrikto.com/mbox/", "series": [ { "id": 5082, "url": "http://patches.dpdk.org/api/series/5082/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=5082", "date": "2019-06-19T15:14:25", "name": "vhost: add virtio-vhost-user transport", "version": 1, "mbox": "http://patches.dpdk.org/series/5082/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/54988/comments/", "check": "fail", "checks": "http://patches.dpdk.org/api/patches/54988/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@dpdk.org", "Delivered-To": "patchwork@dpdk.org", "Received": [ "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id CA6411C433;\n\tWed, 19 Jun 2019 17:16:41 +0200 (CEST)", "from mx0.arrikto.com (mx0.arrikto.com [212.71.252.59])\n\tby dpdk.org (Postfix) with ESMTP id E6A831C3A1\n\tfor <dev@dpdk.org>; Wed, 19 Jun 2019 17:15:46 +0200 (CEST)", "from troi.prod.arr (mail.arr [10.99.0.5])\n\tby mx0.arrikto.com (Postfix) with ESMTP id B640818201A;\n\tWed, 19 Jun 2019 18:15:46 +0300 (EEST)", "from localhost.localdomain (unknown [10.89.50.133])\n\tby troi.prod.arr (Postfix) with ESMTPSA id 38033394;\n\tWed, 19 Jun 2019 18:15:46 +0300 (EEST)" ], "From": "Nikos Dragazis <ndragazis@arrikto.com>", "To": "dev@dpdk.org", "Cc": "Maxime Coquelin <maxime.coquelin@redhat.com>,\n\tTiwei Bie <tiwei.bie@intel.com>, Zhihong Wang <zhihong.wang@intel.com>,\n\tStefan Hajnoczi <stefanha@redhat.com>, Wei Wang <wei.w.wang@intel.com>,\n\tStojaczyk Dariusz <dariusz.stojaczyk@intel.com>,\n\tVangelis Koukis <vkoukis@arrikto.com>", "Date": "Wed, 19 Jun 2019 18:14:47 +0300", "Message-Id": "<1560957293-17294-23-git-send-email-ndragazis@arrikto.com>", "X-Mailer": "git-send-email 2.7.4", "In-Reply-To": "<1560957293-17294-1-git-send-email-ndragazis@arrikto.com>", "References": "<1560957293-17294-1-git-send-email-ndragazis@arrikto.com>", "Subject": "[dpdk-dev] [PATCH 22/28] vhost: add flag for choosing vhost-user\n\ttransport", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://mails.dpdk.org/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "Extend the <rte_vhost.h> API to support the virtio-vhost-user transport\nas an alternative to the AF_UNIX transport. The caller provides a PCI\nDomBDF address:\n\n rte_vhost_driver_register(\"0000:00:04.0\",\n RTE_VHOST_USER_VIRTIO_TRANSPORT);\n\nSigned-off-by: Nikos Dragazis <ndragazis@arrikto.com>\nSigned-off-by: Stefan Hajnoczi <stefanha@redhat.com>\n---\n drivers/virtio_vhost_user/trans_virtio_vhost_user.c | 4 ++++\n lib/librte_vhost/rte_vhost.h | 1 +\n lib/librte_vhost/socket.c | 19 ++++++++++++++++++-\n lib/librte_vhost/vhost.h | 6 +++++-\n 4 files changed, 28 insertions(+), 2 deletions(-)", "diff": "diff --git a/drivers/virtio_vhost_user/trans_virtio_vhost_user.c b/drivers/virtio_vhost_user/trans_virtio_vhost_user.c\nindex 45863bd..04dbbb1 100644\n--- a/drivers/virtio_vhost_user/trans_virtio_vhost_user.c\n+++ b/drivers/virtio_vhost_user/trans_virtio_vhost_user.c\n@@ -979,6 +979,10 @@ vvu_pci_init(void)\n \t}\n \n \trte_pci_register(&vvu_pci_driver);\n+\tif (rte_vhost_register_transport(VHOST_TRANSPORT_VVU, &virtio_vhost_user_trans_ops) < 0) {\n+\t\tRTE_LOG(ERR, VHOST_CONFIG,\n+\t\t\t\t\"Registration of vhost-user transport (%d) failed\\n\", VHOST_TRANSPORT_VVU);\n+\t}\n }\n \n static int\ndiff --git a/lib/librte_vhost/rte_vhost.h b/lib/librte_vhost/rte_vhost.h\nindex 0226b3e..0573238 100644\n--- a/lib/librte_vhost/rte_vhost.h\n+++ b/lib/librte_vhost/rte_vhost.h\n@@ -29,6 +29,7 @@ extern \"C\" {\n #define RTE_VHOST_USER_DEQUEUE_ZERO_COPY\t(1ULL << 2)\n #define RTE_VHOST_USER_IOMMU_SUPPORT\t(1ULL << 3)\n #define RTE_VHOST_USER_POSTCOPY_SUPPORT\t\t(1ULL << 4)\n+#define RTE_VHOST_USER_VIRTIO_TRANSPORT\t(1ULL << 5)\n \n /** Protocol features. */\n #ifndef VHOST_USER_PROTOCOL_F_MQ\ndiff --git a/lib/librte_vhost/socket.c b/lib/librte_vhost/socket.c\nindex fe1c78d..1295fdd 100644\n--- a/lib/librte_vhost/socket.c\n+++ b/lib/librte_vhost/socket.c\n@@ -327,7 +327,16 @@ rte_vhost_driver_register(const char *path, uint64_t flags)\n \t\t\tgoto out;\n \t}\n \n-\ttrans_ops = g_transport_map[VHOST_TRANSPORT_UNIX];\n+\tif (flags & RTE_VHOST_USER_VIRTIO_TRANSPORT) {\n+\t\ttrans_ops = g_transport_map[VHOST_TRANSPORT_VVU];\n+\t\tif (trans_ops == NULL) {\n+\t\t\tRTE_LOG(ERR, VHOST_CONFIG,\n+\t\t\t\t\t\"virtio-vhost-user transport is not supported\\n\");\n+\t\t\tgoto out;\n+\t\t}\n+\t} else {\n+\t\ttrans_ops = g_transport_map[VHOST_TRANSPORT_UNIX];\n+\t}\n \n \tif (!path)\n \t\treturn -1;\n@@ -400,6 +409,14 @@ rte_vhost_driver_register(const char *path, uint64_t flags)\n \t\t\t\"Postcopy requested but not compiled\\n\");\n \t\tret = -1;\n \t\tgoto out_free;\n+#else\n+\t\tif (flags & RTE_VHOST_USER_VIRTIO_TRANSPORT) {\n+\t\t\tRTE_LOG(ERR, VHOST_CONFIG,\n+\t\t\t\t\"Postcopy requested but not supported \"\n+\t\t\t\t\"by the virtio-vhost-user transport\\n\");\n+\t\t\tret = -1;\n+\t\t\tgoto out_free;\n+\t\t}\n #endif\n \t}\n \ndiff --git a/lib/librte_vhost/vhost.h b/lib/librte_vhost/vhost.h\nindex 2e7eabe..a6131da 100644\n--- a/lib/librte_vhost/vhost.h\n+++ b/lib/librte_vhost/vhost.h\n@@ -494,9 +494,13 @@ struct vhost_transport_ops {\n /** The traditional AF_UNIX vhost-user protocol transport. */\n extern const struct vhost_transport_ops af_unix_trans_ops;\n \n+/** The virtio-vhost-user PCI vhost-user protocol transport. */\n+extern const struct vhost_transport_ops virtio_vhost_user_trans_ops;\n+\n typedef enum VhostUserTransport {\n \tVHOST_TRANSPORT_UNIX = 0,\n-\tVHOST_TRANSPORT_MAX = 1\n+\tVHOST_TRANSPORT_VVU = 1,\n+\tVHOST_TRANSPORT_MAX = 2\n } VhostUserTransport;\n \n /* A list with all the available vhost-user transports. */\n", "prefixes": [ "22/28" ] }{ "id": 54988, "url": "