Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/51120/?format=api
https://patches.dpdk.org/api/patches/51120/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/20190312145410.570-2-maxime.coquelin@redhat.com/", "project": { "id": 1, "url": "https://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": "<20190312145410.570-2-maxime.coquelin@redhat.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20190312145410.570-2-maxime.coquelin@redhat.com", "date": "2019-03-12T14:54:09", "name": "[1/2] vhost: add API to set protocol features flags", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "ea4b7794e5a6d7ad07b04186de41c0c53cc11053", "submitter": { "id": 512, "url": "https://patches.dpdk.org/api/people/512/?format=api", "name": "Maxime Coquelin", "email": "maxime.coquelin@redhat.com" }, "delegate": { "id": 2642, "url": "https://patches.dpdk.org/api/users/2642/?format=api", "username": "mcoquelin", "first_name": "Maxime", "last_name": "Coquelin", "email": "maxime.coquelin@redhat.com" }, "mbox": "https://patches.dpdk.org/project/dpdk/patch/20190312145410.570-2-maxime.coquelin@redhat.com/mbox/", "series": [ { "id": 3718, "url": "https://patches.dpdk.org/api/series/3718/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=3718", "date": "2019-03-12T14:54:08", "name": "vhost: Support external backend only vhost-user requests", "version": 1, "mbox": "https://patches.dpdk.org/series/3718/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/51120/comments/", "check": "success", "checks": "https://patches.dpdk.org/api/patches/51120/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 226D84CAB;\n\tTue, 12 Mar 2019 15:54:21 +0100 (CET)", "from mx1.redhat.com (mx1.redhat.com [209.132.183.28])\n\tby dpdk.org (Postfix) with ESMTP id 443DC4C9C\n\tfor <dev@dpdk.org>; Tue, 12 Mar 2019 15:54:19 +0100 (CET)", "from smtp.corp.redhat.com\n\t(int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id 9115630833C0;\n\tTue, 12 Mar 2019 14:54:18 +0000 (UTC)", "from localhost.localdomain (ovpn-112-54.ams2.redhat.com\n\t[10.36.112.54])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id CB7A15C23B;\n\tTue, 12 Mar 2019 14:54:16 +0000 (UTC)" ], "From": "Maxime Coquelin <maxime.coquelin@redhat.com>", "To": "dev@dpdk.org, changpeng.liu@intel.com, tiwei.bie@intel.com,\n\ti.maximets@samsung.com, dariusz.stojaczyk@intel.com", "Cc": "Maxime Coquelin <maxime.coquelin@redhat.com>", "Date": "Tue, 12 Mar 2019 15:54:09 +0100", "Message-Id": "<20190312145410.570-2-maxime.coquelin@redhat.com>", "In-Reply-To": "<20190312145410.570-1-maxime.coquelin@redhat.com>", "References": "<20190312145410.570-1-maxime.coquelin@redhat.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "X-Scanned-By": "MIMEDefang 2.79 on 10.5.11.16", "X-Greylist": "Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.44]); Tue, 12 Mar 2019 14:54:18 +0000 (UTC)", "Subject": "[dpdk-dev] [PATCH 1/2] vhost: add API to set protocol features flags", "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": "rte_vhost_driver_set_protocol_features API is to be used\nby external backends to advertize vhost-user protocol\nfeatures it supports.\n\nIt has to be called after rte_vhost_driver_register() and\nbefore rte_vhost_driver_start().\n\nExample of usage to advertize VHOST_USER_PROTOCOL_F_FOOBAR\nprotocol feature:\n\nconst char *path = \"/tmp/vhost-user\";\nuint64_t protocol_features;\nrte_vhost_driver_register(path, 0);\nrte_vhost_driver_get_protocol_features(path, &protocol_features);\nprotocol_features |= VHOST_USER_PROTOCOL_F_FOOBAR;\nrte_vhost_driver_set_protocol_features(path, protocol_features);\nrte_vhost_driver_start(path);\n\nSigned-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>\nTested-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>\n---\n lib/librte_vhost/rte_vhost.h | 14 ++++++++++++++\n lib/librte_vhost/rte_vhost_version.map | 1 +\n lib/librte_vhost/socket.c | 14 ++++++++++++++\n 3 files changed, 29 insertions(+)", "diff": "diff --git a/lib/librte_vhost/rte_vhost.h b/lib/librte_vhost/rte_vhost.h\nindex 2753670a2..c9c392975 100644\n--- a/lib/librte_vhost/rte_vhost.h\n+++ b/lib/librte_vhost/rte_vhost.h\n@@ -405,6 +405,20 @@ int rte_vhost_driver_disable_features(const char *path, uint64_t features);\n */\n int rte_vhost_driver_get_features(const char *path, uint64_t *features);\n \n+/**\n+ * Set the protocol feature bits before feature negotiation.\n+ *\n+ * @param path\n+ * The vhost-user socket file path\n+ * @param protocol_features\n+ * Supported protocol features\n+ * @return\n+ * 0 on success, -1 on failure\n+ */\n+int __rte_experimental\n+rte_vhost_driver_set_protocol_features(const char *path,\n+\t\tuint64_t protocol_features);\n+\n /**\n * Get the protocol feature bits before feature negotiation.\n *\ndiff --git a/lib/librte_vhost/rte_vhost_version.map b/lib/librte_vhost/rte_vhost_version.map\nindex 8a3bc19e0..5f1d4a75c 100644\n--- a/lib/librte_vhost/rte_vhost_version.map\n+++ b/lib/librte_vhost/rte_vhost_version.map\n@@ -86,4 +86,5 @@ EXPERIMENTAL {\n \trte_vhost_host_notifier_ctrl;\n \trte_vdpa_relay_vring_used;\n \trte_vhost_extern_callback_register;\n+\trte_vhost_driver_set_protocol_features;\n };\ndiff --git a/lib/librte_vhost/socket.c b/lib/librte_vhost/socket.c\nindex 9883b0491..3da9de62c 100644\n--- a/lib/librte_vhost/socket.c\n+++ b/lib/librte_vhost/socket.c\n@@ -707,6 +707,20 @@ rte_vhost_driver_get_features(const char *path, uint64_t *features)\n \treturn ret;\n }\n \n+int\n+rte_vhost_driver_set_protocol_features(const char *path,\n+\t\tuint64_t protocol_features)\n+{\n+\tstruct vhost_user_socket *vsocket;\n+\n+\tpthread_mutex_lock(&vhost_user.mutex);\n+\tvsocket = find_vhost_user_socket(path);\n+\tif (vsocket)\n+\t\tvsocket->protocol_features = protocol_features;\n+\tpthread_mutex_unlock(&vhost_user.mutex);\n+\treturn vsocket ? 0 : -1;\n+}\n+\n int\n rte_vhost_driver_get_protocol_features(const char *path,\n \t\tuint64_t *protocol_features)\n", "prefixes": [ "1/2" ] }{ "id": 51120, "url": "