Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/72256/?format=api
http://patches.dpdk.org/api/patches/72256/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20200626140441.1441763-11-maxime.coquelin@redhat.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": "<20200626140441.1441763-11-maxime.coquelin@redhat.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20200626140441.1441763-11-maxime.coquelin@redhat.com", "date": "2020-06-26T14:04:37", "name": "[v3,10/14] vhost: introduce wrappers for some vDPA ops", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "1e8e46e4cccc4c0b16365bff8937bb263f7687dd", "submitter": { "id": 512, "url": "http://patches.dpdk.org/api/people/512/?format=api", "name": "Maxime Coquelin", "email": "maxime.coquelin@redhat.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/20200626140441.1441763-11-maxime.coquelin@redhat.com/mbox/", "series": [ { "id": 10634, "url": "http://patches.dpdk.org/api/series/10634/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=10634", "date": "2020-06-26T14:04:28", "name": "vDPA API and framework rework", "version": 3, "mbox": "http://patches.dpdk.org/series/10634/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/72256/comments/", "check": "fail", "checks": "http://patches.dpdk.org/api/patches/72256/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@inbox.dpdk.org", "Delivered-To": "patchwork@inbox.dpdk.org", "Received": [ "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 1AABDA051C;\n\tFri, 26 Jun 2020 16:07:22 +0200 (CEST)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 231AB1C012;\n\tFri, 26 Jun 2020 16:06:15 +0200 (CEST)", "from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com\n [205.139.110.61]) by dpdk.org (Postfix) with ESMTP id 9BD061BFC8\n for <dev@dpdk.org>; Fri, 26 Jun 2020 16:06:13 +0200 (CEST)", "from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com\n [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id\n us-mta-484-UcTTBxETN--GLwhw95R_iw-1; Fri, 26 Jun 2020 10:06:10 -0400", "from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com\n [10.5.11.15])\n (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n (No client certificate requested)\n by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 8F5A6804003;\n Fri, 26 Jun 2020 14:06:08 +0000 (UTC)", "from localhost.localdomain (unknown [10.36.110.7])\n by smtp.corp.redhat.com (Postfix) with ESMTP id F23D45BAE1;\n Fri, 26 Jun 2020 14:05:57 +0000 (UTC)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1593180373;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:cc:mime-version:mime-version:content-type:content-type:\n content-transfer-encoding:content-transfer-encoding:\n in-reply-to:in-reply-to:references:references;\n bh=rttQfusn8y+xGsbGYmyauBK8b2vPiV2DUSYOD66iOvc=;\n b=TV0kUChLzlAXG+ghEjpqRKR2xyNISj7BM3TdA+zvfQb0Kmr2Z9ksUZHJwX8UsUKsZT56LO\n KHUdCk0QGiVNmjkVa+Qd9PErnO4q65VkP36sByPR5WJ0tp5agn7OmymO2ixvFIjlzpR7i3\n QZWs83R+sZdJZC1zCDfbXx7h1T0uqaM=", "X-MC-Unique": "UcTTBxETN--GLwhw95R_iw-1", "From": "Maxime Coquelin <maxime.coquelin@redhat.com>", "To": "matan@mellanox.com, xiao.w.wang@intel.com, zhihong.wang@intel.com,\n chenbo.xia@intel.com, david.marchand@redhat.com, amorenoz@redhat.com,\n viacheslavo@mellanox.com, hemant.agrawal@nxp.com, sachin.saxena@nxp.com,\n grive@u256.net, dev@dpdk.org", "Cc": "Maxime Coquelin <maxime.coquelin@redhat.com>", "Date": "Fri, 26 Jun 2020 16:04:37 +0200", "Message-Id": "<20200626140441.1441763-11-maxime.coquelin@redhat.com>", "In-Reply-To": "<20200626140441.1441763-1-maxime.coquelin@redhat.com>", "References": "<20200626140441.1441763-1-maxime.coquelin@redhat.com>", "MIME-Version": "1.0", "X-Scanned-By": "MIMEDefang 2.79 on 10.5.11.15", "X-Mimecast-Spam-Score": "0", "X-Mimecast-Originator": "redhat.com", "Content-Type": "text/plain; charset=UTF-8", "Content-Transfer-Encoding": "8bit", "Subject": "[dpdk-dev] [PATCH v3 10/14] vhost: introduce wrappers for some vDPA\n\tops", "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 <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 <mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "This patch is preliminary work to make the vDPA device\nstructure opaque to the user application. Some callbacks\nof the vDPA devices are used to query capabilities before\nattaching to a Vhost port. This patch introduces wrappers\nfor these ops.\n\nAcked-by: Adrián Moreno <amorenoz@redhat.com>\nSigned-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>\n---\n lib/librte_vhost/rte_vdpa.h | 72 ++++++++++++++++++++++++++\n lib/librte_vhost/rte_vhost_version.map | 3 ++\n lib/librte_vhost/vdpa.c | 28 ++++++++++\n 3 files changed, 103 insertions(+)", "diff": "diff --git a/lib/librte_vhost/rte_vdpa.h b/lib/librte_vhost/rte_vdpa.h\nindex dbdc273702..eda56dd556 100644\n--- a/lib/librte_vhost/rte_vdpa.h\n+++ b/lib/librte_vhost/rte_vdpa.h\n@@ -226,6 +226,78 @@ __rte_experimental\n int\n rte_vdpa_relay_vring_used(int vid, uint16_t qid, void *vring_m);\n \n+/**\n+ * @warning\n+ * @b EXPERIMENTAL: this API may change without prior notice\n+ *\n+ * Get number of queue pairs supported by the vDPA device\n+ *\n+ * @param dev\n+ * vDP device pointer\n+ * @param queue_num\n+ * pointer on where the number of queue is stored\n+ * @return\n+ * 0 on success, -1 on failure\n+ */\n+__rte_experimental\n+int\n+rte_vdpa_get_queue_num(struct rte_vdpa_device *dev, uint32_t *queue_num);\n+\n+/**\n+ * @warning\n+ * @b EXPERIMENTAL: this API may change without prior notice\n+ *\n+ * Get the Virtio features supported by the vDPA device\n+ *\n+ * @param dev\n+ * vDP device pointer\n+ * @param features\n+ * pointer on where the supported features are stored\n+ * @return\n+ * 0 on success, -1 on failure\n+ */\n+__rte_experimental\n+int\n+rte_vdpa_get_features(struct rte_vdpa_device *dev, uint64_t *features);\n+\n+/**\n+ * @warning\n+ * @b EXPERIMENTAL: this API may change without prior notice\n+ *\n+ * Get the Vhost-user protocol features supported by the vDPA device\n+ *\n+ * @param dev\n+ * vDP device pointer\n+ * @param features\n+ * pointer on where the supported protocol features are stored\n+ * @return\n+ * 0 on success, -1 on failure\n+ */\n+__rte_experimental\n+int\n+rte_vdpa_get_protocol_features(struct rte_vdpa_device *dev, uint64_t *features);\n+\n+/**\n+ * @warning\n+ * @b EXPERIMENTAL: this API may change without prior notice\n+ *\n+ * Synchronize the used ring from mediated ring to guest, log dirty\n+ * page for each writeable buffer, caller should handle the used\n+ * ring logging before device stop.\n+ *\n+ * @param vid\n+ * vhost device id\n+ * @param qid\n+ * vhost queue id\n+ * @param vring_m\n+ * mediated virtio ring pointer\n+ * @return\n+ * number of synced used entries on success, -1 on failure\n+ */\n+__rte_experimental\n+int\n+rte_vdpa_relay_vring_used(int vid, uint16_t qid, void *vring_m);\n+\n /**\n * @warning\n * @b EXPERIMENTAL: this API may change without prior notice\ndiff --git a/lib/librte_vhost/rte_vhost_version.map b/lib/librte_vhost/rte_vhost_version.map\nindex d9124d0462..7a919102cf 100644\n--- a/lib/librte_vhost/rte_vhost_version.map\n+++ b/lib/librte_vhost/rte_vhost_version.map\n@@ -70,4 +70,7 @@ EXPERIMENTAL {\n \trte_vhost_slave_config_change;\n \trte_vdpa_find_device_by_name;\n \trte_vdpa_get_rte_device;\n+\trte_vdpa_get_queue_num;\n+\trte_vdpa_get_features;\n+\trte_vdpa_get_protocol_features;\n };\ndiff --git a/lib/librte_vhost/vdpa.c b/lib/librte_vhost/vdpa.c\nindex 72561552c3..8810bf3b36 100644\n--- a/lib/librte_vhost/vdpa.c\n+++ b/lib/librte_vhost/vdpa.c\n@@ -229,6 +229,34 @@ rte_vdpa_relay_vring_used(int vid, uint16_t qid, void *vring_m)\n \treturn -1;\n }\n \n+int\n+rte_vdpa_get_queue_num(struct rte_vdpa_device *dev, uint32_t *queue_num)\n+{\n+\tif (dev == NULL || dev->ops == NULL || dev->ops->get_queue_num == NULL)\n+\t\treturn -1;\n+\n+\treturn dev->ops->get_queue_num(dev, queue_num);\n+}\n+\n+int\n+rte_vdpa_get_features(struct rte_vdpa_device *dev, uint64_t *features)\n+{\n+\tif (dev == NULL || dev->ops == NULL || dev->ops->get_features == NULL)\n+\t\treturn -1;\n+\n+\treturn dev->ops->get_features(dev, features);\n+}\n+\n+int\n+rte_vdpa_get_protocol_features(struct rte_vdpa_device *dev, uint64_t *features)\n+{\n+\tif (dev == NULL || dev->ops == NULL ||\n+\t\t\tdev->ops->get_protocol_features == NULL)\n+\t\treturn -1;\n+\n+\treturn dev->ops->get_protocol_features(dev, features);\n+}\n+\n int\n rte_vdpa_get_stats_names(struct rte_vdpa_device *dev,\n \t\tstruct rte_vdpa_stat_name *stats_names,\n", "prefixes": [ "v3", "10/14" ] }{ "id": 72256, "url": "