get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/72236/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 72236,
    "url": "http://patches.dpdk.org/api/patches/72236/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20200626132712.1437673-6-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": "<20200626132712.1437673-6-maxime.coquelin@redhat.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20200626132712.1437673-6-maxime.coquelin@redhat.com",
    "date": "2020-06-26T13:27:03",
    "name": "[v3,05/14] vhost: replace device ID in vDPA ops",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "e5c8283fce6111f8a0f50ea564fc6fd31c95dd54",
    "submitter": {
        "id": 512,
        "url": "http://patches.dpdk.org/api/people/512/?format=api",
        "name": "Maxime Coquelin",
        "email": "maxime.coquelin@redhat.com"
    },
    "delegate": null,
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20200626132712.1437673-6-maxime.coquelin@redhat.com/mbox/",
    "series": [
        {
            "id": 10633,
            "url": "http://patches.dpdk.org/api/series/10633/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=10633",
            "date": "2020-06-26T13:26:58",
            "name": "vDPA API and framework rework",
            "version": 3,
            "mbox": "http://patches.dpdk.org/series/10633/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/72236/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/72236/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 825C9A051C;\n\tFri, 26 Jun 2020 15:28:46 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id BD3791BFA6;\n\tFri, 26 Jun 2020 15:28:36 +0200 (CEST)",
            "from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com\n [205.139.110.120]) by dpdk.org (Postfix) with ESMTP id B5E301BF7C\n for <dev@dpdk.org>; Fri, 26 Jun 2020 15:28:35 +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-8-artqtSxNOdCy3rDrMvSIHw-1; Fri, 26 Jun 2020 09:28:31 -0400",
            "from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com\n [10.5.11.16])\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 CE64A100CD07;\n Fri, 26 Jun 2020 13:28:22 +0000 (UTC)",
            "from localhost.localdomain (unknown [10.36.110.7])\n by smtp.corp.redhat.com (Postfix) with ESMTP id 182EC61B60;\n Fri, 26 Jun 2020 13:28:15 +0000 (UTC)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1593178115;\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=olqraQL7aU3zbGTHTX/8e+ullM88PCrFdhc27f4L2OQ=;\n b=cwvaCrrC7Ppx54UQ6Noytbna7jHuAFKy2szt8xeowLCW0abRqti9eyjnUzKdeop7s8ggj3\n zmCwOKEKoTfaym+uD/yvokoFYMSklc/qjKSMhnktVyw7UbYILfszM2sH7p8/MBA9xjmb3i\n g39WvzGrGbDzg73e4wHKODETr3+Okp8=",
        "X-MC-Unique": "artqtSxNOdCy3rDrMvSIHw-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 15:27:03 +0200",
        "Message-Id": "<20200626132712.1437673-6-maxime.coquelin@redhat.com>",
        "In-Reply-To": "<20200626132712.1437673-1-maxime.coquelin@redhat.com>",
        "References": "<20200626132712.1437673-1-maxime.coquelin@redhat.com>",
        "MIME-Version": "1.0",
        "X-Scanned-By": "MIMEDefang 2.79 on 10.5.11.16",
        "Authentication-Results": "relay.mimecast.com;\n auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=maxime.coquelin@redhat.com",
        "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 05/14] vhost: replace device ID in vDPA ops",
        "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 a preliminary step to get rid of the\nvDPA device ID. It makes vDPA callbacks to use the\nvDPA device struct as a reference instead of the ID.\n\nAcked-by: Adrián Moreno <amorenoz@redhat.com>\nSigned-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>\n---\n drivers/vdpa/ifc/ifcvf_vdpa.c |  79 ++++++++++----------\n drivers/vdpa/mlx5/mlx5_vdpa.c | 134 ++++++++++++++++++++--------------\n drivers/vdpa/mlx5/mlx5_vdpa.h |   2 +-\n examples/vdpa/main.c          |   4 +-\n lib/librte_vhost/rte_vdpa.h   |  28 ++++---\n lib/librte_vhost/socket.c     |   6 +-\n lib/librte_vhost/vdpa.c       | 101 ++++++++++++-------------\n 7 files changed, 195 insertions(+), 159 deletions(-)",
    "diff": "diff --git a/drivers/vdpa/ifc/ifcvf_vdpa.c b/drivers/vdpa/ifc/ifcvf_vdpa.c\nindex ac9e218c23..0418f9a07f 100644\n--- a/drivers/vdpa/ifc/ifcvf_vdpa.c\n+++ b/drivers/vdpa/ifc/ifcvf_vdpa.c\n@@ -55,7 +55,7 @@ struct ifcvf_internal {\n \tpthread_t tid;\t/* thread for notify relay */\n \tint epfd;\n \tint vid;\n-\tint did;\n+\tstruct rte_vdpa_device *vdev;\n \tuint16_t max_queues;\n \tuint64_t features;\n \trte_atomic32_t started;\n@@ -84,7 +84,7 @@ static pthread_mutex_t internal_list_lock = PTHREAD_MUTEX_INITIALIZER;\n static void update_used_ring(struct ifcvf_internal *internal, uint16_t qid);\n \n static struct internal_list *\n-find_internal_resource_by_did(int did)\n+find_internal_resource_by_vdev(struct rte_vdpa_device *vdev)\n {\n \tint found = 0;\n \tstruct internal_list *list;\n@@ -92,7 +92,7 @@ find_internal_resource_by_did(int did)\n \tpthread_mutex_lock(&internal_list_lock);\n \n \tTAILQ_FOREACH(list, &internal_list, next) {\n-\t\tif (did == list->internal->did) {\n+\t\tif (vdev == list->internal->vdev) {\n \t\t\tfound = 1;\n \t\t\tbreak;\n \t\t}\n@@ -877,14 +877,14 @@ ifcvf_sw_fallback_switchover(struct ifcvf_internal *internal)\n static int\n ifcvf_dev_config(int vid)\n {\n-\tint did;\n+\tstruct rte_vdpa_device *vdev;\n \tstruct internal_list *list;\n \tstruct ifcvf_internal *internal;\n \n-\tdid = rte_vhost_get_vdpa_device_id(vid);\n-\tlist = find_internal_resource_by_did(did);\n+\tvdev = rte_vdpa_get_device(rte_vhost_get_vdpa_device_id(vid));\n+\tlist = find_internal_resource_by_vdev(vdev);\n \tif (list == NULL) {\n-\t\tDRV_LOG(ERR, \"Invalid device id: %d\", did);\n+\t\tDRV_LOG(ERR, \"Invalid vDPA device: %p\", vdev);\n \t\treturn -1;\n \t}\n \n@@ -894,7 +894,8 @@ ifcvf_dev_config(int vid)\n \tupdate_datapath(internal);\n \n \tif (rte_vhost_host_notifier_ctrl(vid, true) != 0)\n-\t\tDRV_LOG(NOTICE, \"vDPA (%d): software relay is used.\", did);\n+\t\tDRV_LOG(NOTICE, \"vDPA (%s): software relay is used.\",\n+\t\t\t\tvdev->device->name);\n \n \treturn 0;\n }\n@@ -902,14 +903,14 @@ ifcvf_dev_config(int vid)\n static int\n ifcvf_dev_close(int vid)\n {\n-\tint did;\n+\tstruct rte_vdpa_device *vdev;\n \tstruct internal_list *list;\n \tstruct ifcvf_internal *internal;\n \n-\tdid = rte_vhost_get_vdpa_device_id(vid);\n-\tlist = find_internal_resource_by_did(did);\n+\tvdev = rte_vdpa_get_device(rte_vhost_get_vdpa_device_id(vid));\n+\tlist = find_internal_resource_by_vdev(vdev);\n \tif (list == NULL) {\n-\t\tDRV_LOG(ERR, \"Invalid device id: %d\", did);\n+\t\tDRV_LOG(ERR, \"Invalid vDPA device: %p\", vdev);\n \t\treturn -1;\n \t}\n \n@@ -941,15 +942,15 @@ static int\n ifcvf_set_features(int vid)\n {\n \tuint64_t features = 0;\n-\tint did;\n+\tstruct rte_vdpa_device *vdev;\n \tstruct internal_list *list;\n \tstruct ifcvf_internal *internal;\n \tuint64_t log_base = 0, log_size = 0;\n \n-\tdid = rte_vhost_get_vdpa_device_id(vid);\n-\tlist = find_internal_resource_by_did(did);\n+\tvdev = rte_vdpa_get_device(rte_vhost_get_vdpa_device_id(vid));\n+\tlist = find_internal_resource_by_vdev(vdev);\n \tif (list == NULL) {\n-\t\tDRV_LOG(ERR, \"Invalid device id: %d\", did);\n+\t\tDRV_LOG(ERR, \"Invalid vDPA device: %p\", vdev);\n \t\treturn -1;\n \t}\n \n@@ -974,13 +975,13 @@ ifcvf_set_features(int vid)\n static int\n ifcvf_get_vfio_group_fd(int vid)\n {\n-\tint did;\n+\tstruct rte_vdpa_device *vdev;\n \tstruct internal_list *list;\n \n-\tdid = rte_vhost_get_vdpa_device_id(vid);\n-\tlist = find_internal_resource_by_did(did);\n+\tvdev = rte_vdpa_get_device(rte_vhost_get_vdpa_device_id(vid));\n+\tlist = find_internal_resource_by_vdev(vdev);\n \tif (list == NULL) {\n-\t\tDRV_LOG(ERR, \"Invalid device id: %d\", did);\n+\t\tDRV_LOG(ERR, \"Invalid vDPA device: %p\", vdev);\n \t\treturn -1;\n \t}\n \n@@ -990,13 +991,13 @@ ifcvf_get_vfio_group_fd(int vid)\n static int\n ifcvf_get_vfio_device_fd(int vid)\n {\n-\tint did;\n+\tstruct rte_vdpa_device *vdev;\n \tstruct internal_list *list;\n \n-\tdid = rte_vhost_get_vdpa_device_id(vid);\n-\tlist = find_internal_resource_by_did(did);\n+\tvdev = rte_vdpa_get_device(rte_vhost_get_vdpa_device_id(vid));\n+\tlist = find_internal_resource_by_vdev(vdev);\n \tif (list == NULL) {\n-\t\tDRV_LOG(ERR, \"Invalid device id: %d\", did);\n+\t\tDRV_LOG(ERR, \"Invalid vDPA device: %p\", vdev);\n \t\treturn -1;\n \t}\n \n@@ -1006,16 +1007,16 @@ ifcvf_get_vfio_device_fd(int vid)\n static int\n ifcvf_get_notify_area(int vid, int qid, uint64_t *offset, uint64_t *size)\n {\n-\tint did;\n+\tstruct rte_vdpa_device *vdev;\n \tstruct internal_list *list;\n \tstruct ifcvf_internal *internal;\n \tstruct vfio_region_info reg = { .argsz = sizeof(reg) };\n \tint ret;\n \n-\tdid = rte_vhost_get_vdpa_device_id(vid);\n-\tlist = find_internal_resource_by_did(did);\n+\tvdev = rte_vdpa_get_device(rte_vhost_get_vdpa_device_id(vid));\n+\tlist = find_internal_resource_by_vdev(vdev);\n \tif (list == NULL) {\n-\t\tDRV_LOG(ERR, \"Invalid device id: %d\", did);\n+\t\tDRV_LOG(ERR, \"Invalid vDPA device: %p\", vdev);\n \t\treturn -1;\n \t}\n \n@@ -1036,13 +1037,13 @@ ifcvf_get_notify_area(int vid, int qid, uint64_t *offset, uint64_t *size)\n }\n \n static int\n-ifcvf_get_queue_num(int did, uint32_t *queue_num)\n+ifcvf_get_queue_num(struct rte_vdpa_device *vdev, uint32_t *queue_num)\n {\n \tstruct internal_list *list;\n \n-\tlist = find_internal_resource_by_did(did);\n+\tlist = find_internal_resource_by_vdev(vdev);\n \tif (list == NULL) {\n-\t\tDRV_LOG(ERR, \"Invalid device id: %d\", did);\n+\t\tDRV_LOG(ERR, \"Invalid vDPA device: %p\", vdev);\n \t\treturn -1;\n \t}\n \n@@ -1052,13 +1053,13 @@ ifcvf_get_queue_num(int did, uint32_t *queue_num)\n }\n \n static int\n-ifcvf_get_vdpa_features(int did, uint64_t *features)\n+ifcvf_get_vdpa_features(struct rte_vdpa_device *vdev, uint64_t *features)\n {\n \tstruct internal_list *list;\n \n-\tlist = find_internal_resource_by_did(did);\n+\tlist = find_internal_resource_by_vdev(vdev);\n \tif (list == NULL) {\n-\t\tDRV_LOG(ERR, \"Invalid device id: %d\", did);\n+\t\tDRV_LOG(ERR, \"Invalid vDPA device: %p\", vdev);\n \t\treturn -1;\n \t}\n \n@@ -1074,8 +1075,10 @@ ifcvf_get_vdpa_features(int did, uint64_t *features)\n \t\t 1ULL << VHOST_USER_PROTOCOL_F_HOST_NOTIFIER | \\\n \t\t 1ULL << VHOST_USER_PROTOCOL_F_LOG_SHMFD)\n static int\n-ifcvf_get_protocol_features(int did __rte_unused, uint64_t *features)\n+ifcvf_get_protocol_features(struct rte_vdpa_device *vdev, uint64_t *features)\n {\n+\tRTE_SET_USED(vdev);\n+\n \t*features = VDPA_SUPPORTED_PROTOCOL_FEATURES;\n \treturn 0;\n }\n@@ -1186,8 +1189,8 @@ ifcvf_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,\n \t}\n \tinternal->sw_lm = sw_fallback_lm;\n \n-\tinternal->did = rte_vdpa_register_device(&pci_dev->device, &ifcvf_ops);\n-\tif (internal->did < 0) {\n+\tinternal->vdev = rte_vdpa_register_device(&pci_dev->device, &ifcvf_ops);\n+\tif (internal->vdev == NULL) {\n \t\tDRV_LOG(ERR, \"failed to register device %s\", pci_dev->name);\n \t\tgoto error;\n \t}\n@@ -1230,7 +1233,7 @@ ifcvf_pci_remove(struct rte_pci_device *pci_dev)\n \n \trte_pci_unmap_device(internal->pdev);\n \trte_vfio_container_destroy(internal->vfio_container_fd);\n-\trte_vdpa_unregister_device(internal->did);\n+\trte_vdpa_unregister_device(internal->vdev);\n \n \tpthread_mutex_lock(&internal_list_lock);\n \tTAILQ_REMOVE(&internal_list, list, next);\ndiff --git a/drivers/vdpa/mlx5/mlx5_vdpa.c b/drivers/vdpa/mlx5/mlx5_vdpa.c\nindex 7b5ae62bdc..9ea032d57b 100644\n--- a/drivers/vdpa/mlx5/mlx5_vdpa.c\n+++ b/drivers/vdpa/mlx5/mlx5_vdpa.c\n@@ -50,21 +50,21 @@ static pthread_mutex_t priv_list_lock = PTHREAD_MUTEX_INITIALIZER;\n int mlx5_vdpa_logtype;\n \n static struct mlx5_vdpa_priv *\n-mlx5_vdpa_find_priv_resource_by_did(int did)\n+mlx5_vdpa_find_priv_resource_by_vdev(struct rte_vdpa_device *vdev)\n {\n \tstruct mlx5_vdpa_priv *priv;\n \tint found = 0;\n \n \tpthread_mutex_lock(&priv_list_lock);\n \tTAILQ_FOREACH(priv, &priv_list, next) {\n-\t\tif (did == priv->id) {\n+\t\tif (vdev == priv->vdev) {\n \t\t\tfound = 1;\n \t\t\tbreak;\n \t\t}\n \t}\n \tpthread_mutex_unlock(&priv_list_lock);\n \tif (!found) {\n-\t\tDRV_LOG(ERR, \"Invalid device id: %d.\", did);\n+\t\tDRV_LOG(ERR, \"Invalid vDPA device: %s.\", vdev->device->name);\n \t\trte_errno = EINVAL;\n \t\treturn NULL;\n \t}\n@@ -72,12 +72,13 @@ mlx5_vdpa_find_priv_resource_by_did(int did)\n }\n \n static int\n-mlx5_vdpa_get_queue_num(int did, uint32_t *queue_num)\n+mlx5_vdpa_get_queue_num(struct rte_vdpa_device *vdev, uint32_t *queue_num)\n {\n-\tstruct mlx5_vdpa_priv *priv = mlx5_vdpa_find_priv_resource_by_did(did);\n+\tstruct mlx5_vdpa_priv *priv =\n+\t\tmlx5_vdpa_find_priv_resource_by_vdev(vdev);\n \n \tif (priv == NULL) {\n-\t\tDRV_LOG(ERR, \"Invalid device id: %d.\", did);\n+\t\tDRV_LOG(ERR, \"Invalid vDPA device: %s.\", vdev->device->name);\n \t\treturn -1;\n \t}\n \t*queue_num = priv->caps.max_num_virtio_queues;\n@@ -85,12 +86,13 @@ mlx5_vdpa_get_queue_num(int did, uint32_t *queue_num)\n }\n \n static int\n-mlx5_vdpa_get_vdpa_features(int did, uint64_t *features)\n+mlx5_vdpa_get_vdpa_features(struct rte_vdpa_device *vdev, uint64_t *features)\n {\n-\tstruct mlx5_vdpa_priv *priv = mlx5_vdpa_find_priv_resource_by_did(did);\n+\tstruct mlx5_vdpa_priv *priv =\n+\t\tmlx5_vdpa_find_priv_resource_by_vdev(vdev);\n \n \tif (priv == NULL) {\n-\t\tDRV_LOG(ERR, \"Invalid device id: %d.\", did);\n+\t\tDRV_LOG(ERR, \"Invalid vDPA device: %s.\", vdev->device->name);\n \t\treturn -1;\n \t}\n \t*features = MLX5_VDPA_DEFAULT_FEATURES;\n@@ -110,12 +112,14 @@ mlx5_vdpa_get_vdpa_features(int did, uint64_t *features)\n }\n \n static int\n-mlx5_vdpa_get_protocol_features(int did, uint64_t *features)\n+mlx5_vdpa_get_protocol_features(struct rte_vdpa_device *vdev,\n+\t\tuint64_t *features)\n {\n-\tstruct mlx5_vdpa_priv *priv = mlx5_vdpa_find_priv_resource_by_did(did);\n+\tstruct mlx5_vdpa_priv *priv =\n+\t\tmlx5_vdpa_find_priv_resource_by_vdev(vdev);\n \n \tif (priv == NULL) {\n-\t\tDRV_LOG(ERR, \"Invalid device id: %d.\", did);\n+\t\tDRV_LOG(ERR, \"Invalid vDPA device: %s.\", vdev->device->name);\n \t\treturn -1;\n \t}\n \t*features = MLX5_VDPA_PROTOCOL_FEATURES;\n@@ -125,11 +129,13 @@ mlx5_vdpa_get_protocol_features(int did, uint64_t *features)\n static int\n mlx5_vdpa_set_vring_state(int vid, int vring, int state)\n {\n-\tint did = rte_vhost_get_vdpa_device_id(vid);\n-\tstruct mlx5_vdpa_priv *priv = mlx5_vdpa_find_priv_resource_by_did(did);\n+\tstruct rte_vdpa_device *vdev = rte_vdpa_get_device(\n+\t\t\trte_vhost_get_vdpa_device_id(vid));\n+\tstruct mlx5_vdpa_priv *priv =\n+\t\tmlx5_vdpa_find_priv_resource_by_vdev(vdev);\n \n \tif (priv == NULL) {\n-\t\tDRV_LOG(ERR, \"Invalid device id: %d.\", did);\n+\t\tDRV_LOG(ERR, \"Invalid vDPA device: %s.\", vdev->device->name);\n \t\treturn -EINVAL;\n \t}\n \tif (vring >= (int)priv->caps.max_num_virtio_queues * 2) {\n@@ -165,14 +171,16 @@ mlx5_vdpa_direct_db_prepare(struct mlx5_vdpa_priv *priv)\n static int\n mlx5_vdpa_features_set(int vid)\n {\n-\tint did = rte_vhost_get_vdpa_device_id(vid);\n-\tstruct mlx5_vdpa_priv *priv = mlx5_vdpa_find_priv_resource_by_did(did);\n+\tstruct rte_vdpa_device *vdev = rte_vdpa_get_device(\n+\t\t\trte_vhost_get_vdpa_device_id(vid));\n+\tstruct mlx5_vdpa_priv *priv =\n+\t\tmlx5_vdpa_find_priv_resource_by_vdev(vdev);\n \tuint64_t log_base, log_size;\n \tuint64_t features;\n \tint ret;\n \n \tif (priv == NULL) {\n-\t\tDRV_LOG(ERR, \"Invalid device id: %d.\", did);\n+\t\tDRV_LOG(ERR, \"Invalid vDPA device: %s.\", vdev->device->name);\n \t\treturn -EINVAL;\n \t}\n \tret = rte_vhost_get_negotiated_features(vid, &features);\n@@ -284,12 +292,14 @@ mlx5_vdpa_mtu_set(struct mlx5_vdpa_priv *priv)\n static int\n mlx5_vdpa_dev_close(int vid)\n {\n-\tint did = rte_vhost_get_vdpa_device_id(vid);\n-\tstruct mlx5_vdpa_priv *priv = mlx5_vdpa_find_priv_resource_by_did(did);\n+\tstruct rte_vdpa_device *vdev = rte_vdpa_get_device(\n+\t\t\trte_vhost_get_vdpa_device_id(vid));\n+\tstruct mlx5_vdpa_priv *priv =\n+\t\tmlx5_vdpa_find_priv_resource_by_vdev(vdev);\n \tint ret = 0;\n \n \tif (priv == NULL) {\n-\t\tDRV_LOG(ERR, \"Invalid device id: %d.\", did);\n+\t\tDRV_LOG(ERR, \"Invalid vDPA device: %s.\", vdev->device->name);\n \t\treturn -1;\n \t}\n \tif (priv->configured)\n@@ -312,11 +322,13 @@ mlx5_vdpa_dev_close(int vid)\n static int\n mlx5_vdpa_dev_config(int vid)\n {\n-\tint did = rte_vhost_get_vdpa_device_id(vid);\n-\tstruct mlx5_vdpa_priv *priv = mlx5_vdpa_find_priv_resource_by_did(did);\n+\tstruct rte_vdpa_device *vdev = rte_vdpa_get_device(\n+\t\t\trte_vhost_get_vdpa_device_id(vid));\n+\tstruct mlx5_vdpa_priv *priv =\n+\t\tmlx5_vdpa_find_priv_resource_by_vdev(vdev);\n \n \tif (priv == NULL) {\n-\t\tDRV_LOG(ERR, \"Invalid device id: %d.\", did);\n+\t\tDRV_LOG(ERR, \"Invalid vDPA device: %s.\", vdev->device->name);\n \t\treturn -EINVAL;\n \t}\n \tif (priv->configured && mlx5_vdpa_dev_close(vid)) {\n@@ -325,7 +337,8 @@ mlx5_vdpa_dev_config(int vid)\n \t}\n \tpriv->vid = vid;\n \tif (mlx5_vdpa_mtu_set(priv))\n-\t\tDRV_LOG(WARNING, \"MTU cannot be set on device %d.\", did);\n+\t\tDRV_LOG(WARNING, \"MTU cannot be set on device %s.\",\n+\t\t\t\tvdev->device->name);\n \tif (mlx5_vdpa_pd_create(priv) || mlx5_vdpa_mem_register(priv) ||\n \t    mlx5_vdpa_direct_db_prepare(priv) ||\n \t    mlx5_vdpa_virtqs_prepare(priv) || mlx5_vdpa_steer_setup(priv) ||\n@@ -341,11 +354,13 @@ mlx5_vdpa_dev_config(int vid)\n static int\n mlx5_vdpa_get_device_fd(int vid)\n {\n-\tint did = rte_vhost_get_vdpa_device_id(vid);\n-\tstruct mlx5_vdpa_priv *priv = mlx5_vdpa_find_priv_resource_by_did(did);\n+\tstruct rte_vdpa_device *vdev = rte_vdpa_get_device(\n+\t\t\trte_vhost_get_vdpa_device_id(vid));\n+\tstruct mlx5_vdpa_priv *priv =\n+\t\tmlx5_vdpa_find_priv_resource_by_vdev(vdev);\n \n \tif (priv == NULL) {\n-\t\tDRV_LOG(ERR, \"Invalid device id: %d.\", did);\n+\t\tDRV_LOG(ERR, \"Invalid vDPA device: %s.\", vdev->device->name);\n \t\treturn -EINVAL;\n \t}\n \treturn priv->ctx->cmd_fd;\n@@ -354,17 +369,19 @@ mlx5_vdpa_get_device_fd(int vid)\n static int\n mlx5_vdpa_get_notify_area(int vid, int qid, uint64_t *offset, uint64_t *size)\n {\n-\tint did = rte_vhost_get_vdpa_device_id(vid);\n-\tstruct mlx5_vdpa_priv *priv = mlx5_vdpa_find_priv_resource_by_did(did);\n+\tstruct rte_vdpa_device *vdev = rte_vdpa_get_device(\n+\t\t\trte_vhost_get_vdpa_device_id(vid));\n+\tstruct mlx5_vdpa_priv *priv =\n+\t\tmlx5_vdpa_find_priv_resource_by_vdev(vdev);\n \n \tRTE_SET_USED(qid);\n \tif (priv == NULL) {\n-\t\tDRV_LOG(ERR, \"Invalid device id: %d.\", did);\n+\t\tDRV_LOG(ERR, \"Invalid vDPA device: %s.\", vdev->device->name);\n \t\treturn -EINVAL;\n \t}\n \tif (!priv->var) {\n-\t\tDRV_LOG(ERR, \"VAR was not created for device %d, is the device\"\n-\t\t\t\" configured?.\", did);\n+\t\tDRV_LOG(ERR, \"VAR was not created for device %s, is the device\"\n+\t\t\t\" configured?.\", vdev->device->name);\n \t\treturn -EINVAL;\n \t}\n \t*offset = priv->var->mmap_off;\n@@ -373,8 +390,9 @@ mlx5_vdpa_get_notify_area(int vid, int qid, uint64_t *offset, uint64_t *size)\n }\n \n static int\n-mlx5_vdpa_get_stats_names(int did, struct rte_vdpa_stat_name *stats_names,\n-\t\t\t  unsigned int size)\n+mlx5_vdpa_get_stats_names(struct rte_vdpa_device *vdev,\n+\t\tstruct rte_vdpa_stat_name *stats_names,\n+\t\tunsigned int size)\n {\n \tstatic const char *mlx5_vdpa_stats_names[MLX5_VDPA_STATS_MAX] = {\n \t\t\"received_descriptors\",\n@@ -384,11 +402,12 @@ mlx5_vdpa_get_stats_names(int did, struct rte_vdpa_stat_name *stats_names,\n \t\t\"invalid buffer\",\n \t\t\"completion errors\",\n \t};\n-\tstruct mlx5_vdpa_priv *priv = mlx5_vdpa_find_priv_resource_by_did(did);\n+\tstruct mlx5_vdpa_priv *priv =\n+\t\tmlx5_vdpa_find_priv_resource_by_vdev(vdev);\n \tunsigned int i;\n \n \tif (priv == NULL) {\n-\t\tDRV_LOG(ERR, \"Invalid device id: %d.\", did);\n+\t\tDRV_LOG(ERR, \"Invalid device: %s.\", vdev->device->name);\n \t\treturn -ENODEV;\n \t}\n \tif (!stats_names)\n@@ -401,51 +420,57 @@ mlx5_vdpa_get_stats_names(int did, struct rte_vdpa_stat_name *stats_names,\n }\n \n static int\n-mlx5_vdpa_get_stats(int did, int qid, struct rte_vdpa_stat *stats,\n-\t\t    unsigned int n)\n+mlx5_vdpa_get_stats(struct rte_vdpa_device *vdev, int qid,\n+\t\tstruct rte_vdpa_stat *stats, unsigned int n)\n {\n-\tstruct mlx5_vdpa_priv *priv = mlx5_vdpa_find_priv_resource_by_did(did);\n+\tstruct mlx5_vdpa_priv *priv =\n+\t\tmlx5_vdpa_find_priv_resource_by_vdev(vdev);\n \n \tif (priv == NULL) {\n-\t\tDRV_LOG(ERR, \"Invalid device id: %d.\", did);\n+\t\tDRV_LOG(ERR, \"Invalid device: %s.\", vdev->device->name);\n \t\treturn -ENODEV;\n \t}\n \tif (!priv->configured) {\n-\t\tDRV_LOG(ERR, \"Device %d was not configured.\", did);\n+\t\tDRV_LOG(ERR, \"Device %s was not configured.\",\n+\t\t\t\tvdev->device->name);\n \t\treturn -ENODATA;\n \t}\n \tif (qid >= (int)priv->nr_virtqs) {\n-\t\tDRV_LOG(ERR, \"Too big vring id: %d.\", qid);\n+\t\tDRV_LOG(ERR, \"Too big vring id: %d for device %s.\", qid,\n+\t\t\t\tvdev->device->name);\n \t\treturn -E2BIG;\n \t}\n \tif (!priv->caps.queue_counters_valid) {\n-\t\tDRV_LOG(ERR, \"Virtq statistics is not supported for device %d.\",\n-\t\t\tdid);\n+\t\tDRV_LOG(ERR, \"Virtq statistics is not supported for device %s.\",\n+\t\t\tvdev->device->name);\n \t\treturn -ENOTSUP;\n \t}\n \treturn mlx5_vdpa_virtq_stats_get(priv, qid, stats, n);\n }\n \n static int\n-mlx5_vdpa_reset_stats(int did, int qid)\n+mlx5_vdpa_reset_stats(struct rte_vdpa_device *vdev, int qid)\n {\n-\tstruct mlx5_vdpa_priv *priv = mlx5_vdpa_find_priv_resource_by_did(did);\n+\tstruct mlx5_vdpa_priv *priv =\n+\t\tmlx5_vdpa_find_priv_resource_by_vdev(vdev);\n \n \tif (priv == NULL) {\n-\t\tDRV_LOG(ERR, \"Invalid device id: %d.\", did);\n+\t\tDRV_LOG(ERR, \"Invalid device: %s.\", vdev->device->name);\n \t\treturn -ENODEV;\n \t}\n \tif (!priv->configured) {\n-\t\tDRV_LOG(ERR, \"Device %d was not configured.\", did);\n+\t\tDRV_LOG(ERR, \"Device %s was not configured.\",\n+\t\t\t\tvdev->device->name);\n \t\treturn -ENODATA;\n \t}\n \tif (qid >= (int)priv->nr_virtqs) {\n-\t\tDRV_LOG(ERR, \"Too big vring id: %d.\", qid);\n+\t\tDRV_LOG(ERR, \"Too big vring id: %d for device %s.\", qid,\n+\t\t\t\tvdev->device->name);\n \t\treturn -E2BIG;\n \t}\n \tif (!priv->caps.queue_counters_valid) {\n-\t\tDRV_LOG(ERR, \"Virtq statistics is not supported for device %d.\",\n-\t\t\tdid);\n+\t\tDRV_LOG(ERR, \"Virtq statistics is not supported for device %s.\",\n+\t\t\tvdev->device->name);\n \t\treturn -ENOTSUP;\n \t}\n \treturn mlx5_vdpa_virtq_stats_reset(priv, qid);\n@@ -687,8 +712,9 @@ mlx5_vdpa_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,\n \t\tDRV_LOG(ERR, \"Failed to allocate VAR %u.\\n\", errno);\n \t\tgoto error;\n \t}\n-\tpriv->id = rte_vdpa_register_device(&pci_dev->device, &mlx5_vdpa_ops);\n-\tif (priv->id < 0) {\n+\tpriv->vdev = rte_vdpa_register_device(&pci_dev->device,\n+\t\t\t&mlx5_vdpa_ops);\n+\tif (priv->vdev == NULL) {\n \t\tDRV_LOG(ERR, \"Failed to register vDPA device.\");\n \t\trte_errno = rte_errno ? rte_errno : EINVAL;\n \t\tgoto error;\ndiff --git a/drivers/vdpa/mlx5/mlx5_vdpa.h b/drivers/vdpa/mlx5/mlx5_vdpa.h\nindex 5fc801eff3..ea09576c5a 100644\n--- a/drivers/vdpa/mlx5/mlx5_vdpa.h\n+++ b/drivers/vdpa/mlx5/mlx5_vdpa.h\n@@ -103,7 +103,7 @@ struct mlx5_vdpa_priv {\n \tTAILQ_ENTRY(mlx5_vdpa_priv) next;\n \tuint8_t configured;\n \tuint8_t direct_notifier; /* Whether direct notifier is on or off. */\n-\tint id; /* vDPA device id. */\n+\tstruct rte_vdpa_device *vdev; /* vDPA device. */\n \tint vid; /* vhost device id. */\n \tstruct ibv_context *ctx; /* Device context. */\n \tstruct rte_pci_device *pci_dev;\ndiff --git a/examples/vdpa/main.c b/examples/vdpa/main.c\nindex e72f6646e7..bdb00603cc 100644\n--- a/examples/vdpa/main.c\n+++ b/examples/vdpa/main.c\n@@ -291,13 +291,13 @@ static void cmd_list_vdpa_devices_parsed(\n \t\tvdev = rte_vdpa_get_device(did);\n \t\tif (!vdev)\n \t\t\tcontinue;\n-\t\tif (vdev->ops->get_queue_num(did, &queue_num) < 0) {\n+\t\tif (vdev->ops->get_queue_num(vdev, &queue_num) < 0) {\n \t\t\tRTE_LOG(ERR, VDPA,\n \t\t\t\t\"failed to get vdpa queue number \"\n \t\t\t\t\"for device id %d.\\n\", did);\n \t\t\tcontinue;\n \t\t}\n-\t\tif (vdev->ops->get_features(did, &features) < 0) {\n+\t\tif (vdev->ops->get_features(vdev, &features) < 0) {\n \t\t\tRTE_LOG(ERR, VDPA,\n \t\t\t\t\"failed to get vdpa features \"\n \t\t\t\t\"for device id %d.\\n\", did);\ndiff --git a/lib/librte_vhost/rte_vdpa.h b/lib/librte_vhost/rte_vdpa.h\nindex b752dfeb96..109cf83b8f 100644\n--- a/lib/librte_vhost/rte_vdpa.h\n+++ b/lib/librte_vhost/rte_vdpa.h\n@@ -21,6 +21,8 @@\n /** Maximum name length for statistics counters */\n #define RTE_VDPA_STATS_NAME_SIZE 64\n \n+struct rte_vdpa_device;\n+\n /**\n  * A vDPA device statistic structure\n  *\n@@ -51,13 +53,14 @@ struct rte_vdpa_stat_name {\n  */\n struct rte_vdpa_dev_ops {\n \t/** Get capabilities of this device */\n-\tint (*get_queue_num)(int did, uint32_t *queue_num);\n+\tint (*get_queue_num)(struct rte_vdpa_device *dev, uint32_t *queue_num);\n \n \t/** Get supported features of this device */\n-\tint (*get_features)(int did, uint64_t *features);\n+\tint (*get_features)(struct rte_vdpa_device *dev, uint64_t *features);\n \n \t/** Get supported protocol features of this device */\n-\tint (*get_protocol_features)(int did, uint64_t *protocol_features);\n+\tint (*get_protocol_features)(struct rte_vdpa_device *dev,\n+\t\t\tuint64_t *protocol_features);\n \n \t/** Driver configure/close the device */\n \tint (*dev_conf)(int vid);\n@@ -83,15 +86,16 @@ struct rte_vdpa_dev_ops {\n \t\t\tuint64_t *offset, uint64_t *size);\n \n \t/** Get statistics name */\n-\tint (*get_stats_names)(int did, struct rte_vdpa_stat_name *stats_names,\n-\t\t\t       unsigned int size);\n+\tint (*get_stats_names)(struct rte_vdpa_device *dev,\n+\t\t\tstruct rte_vdpa_stat_name *stats_names,\n+\t\t\tunsigned int size);\n \n \t/** Get statistics of the queue */\n-\tint (*get_stats)(int did, int qid, struct rte_vdpa_stat *stats,\n-\t\t\t unsigned int n);\n+\tint (*get_stats)(struct rte_vdpa_device *dev, int qid,\n+\t\t\tstruct rte_vdpa_stat *stats, unsigned int n);\n \n \t/** Reset statistics of the queue */\n-\tint (*reset_stats)(int did, int qid);\n+\tint (*reset_stats)(struct rte_vdpa_device *dev, int qid);\n \n \t/** Reserved for future extension */\n \tvoid *reserved[2];\n@@ -118,10 +122,10 @@ struct rte_vdpa_device {\n  * @param ops\n  *  the vdpa device operations\n  * @return\n- *  device id on success, -1 on failure\n+ *  vDPA device pointer on success, NULL on failure\n  */\n __rte_experimental\n-int\n+struct rte_vdpa_device *\n rte_vdpa_register_device(struct rte_device *rte_dev,\n \t\tstruct rte_vdpa_dev_ops *ops);\n \n@@ -132,13 +136,13 @@ rte_vdpa_register_device(struct rte_device *rte_dev,\n  * Unregister a vdpa device\n  *\n  * @param did\n- *  vdpa device id\n+ *  vDPA device pointer\n  * @return\n  *  device id on success, -1 on failure\n  */\n __rte_experimental\n int\n-rte_vdpa_unregister_device(int did);\n+rte_vdpa_unregister_device(struct rte_vdpa_device *);\n \n /**\n  * @warning\ndiff --git a/lib/librte_vhost/socket.c b/lib/librte_vhost/socket.c\nindex 0a66ef9767..da575b608c 100644\n--- a/lib/librte_vhost/socket.c\n+++ b/lib/librte_vhost/socket.c\n@@ -712,7 +712,7 @@ rte_vhost_driver_get_features(const char *path, uint64_t *features)\n \t\tgoto unlock_exit;\n \t}\n \n-\tif (vdpa_dev->ops->get_features(did, &vdpa_features) < 0) {\n+\tif (vdpa_dev->ops->get_features(vdpa_dev, &vdpa_features) < 0) {\n \t\tVHOST_LOG_CONFIG(ERR,\n \t\t\t\t\"failed to get vdpa features \"\n \t\t\t\t\"for socket file %s.\\n\", path);\n@@ -767,7 +767,7 @@ rte_vhost_driver_get_protocol_features(const char *path,\n \t\tgoto unlock_exit;\n \t}\n \n-\tif (vdpa_dev->ops->get_protocol_features(did,\n+\tif (vdpa_dev->ops->get_protocol_features(vdpa_dev,\n \t\t\t\t&vdpa_protocol_features) < 0) {\n \t\tVHOST_LOG_CONFIG(ERR,\n \t\t\t\t\"failed to get vdpa protocol features \"\n@@ -809,7 +809,7 @@ rte_vhost_driver_get_queue_num(const char *path, uint32_t *queue_num)\n \t\tgoto unlock_exit;\n \t}\n \n-\tif (vdpa_dev->ops->get_queue_num(did, &vdpa_queue_num) < 0) {\n+\tif (vdpa_dev->ops->get_queue_num(vdpa_dev, &vdpa_queue_num) < 0) {\n \t\tVHOST_LOG_CONFIG(ERR,\n \t\t\t\t\"failed to get vdpa queue number \"\n \t\t\t\t\"for socket file %s.\\n\", path);\ndiff --git a/lib/librte_vhost/vdpa.c b/lib/librte_vhost/vdpa.c\nindex 87334c88c0..49ada00277 100644\n--- a/lib/librte_vhost/vdpa.c\n+++ b/lib/librte_vhost/vdpa.c\n@@ -18,52 +18,6 @@\n static struct rte_vdpa_device vdpa_devices[MAX_VHOST_DEVICE];\n static uint32_t vdpa_device_num;\n \n-int\n-rte_vdpa_register_device(struct rte_device *rte_dev,\n-\t\tstruct rte_vdpa_dev_ops *ops)\n-{\n-\tstruct rte_vdpa_device *dev;\n-\tint i;\n-\n-\tif (vdpa_device_num >= MAX_VHOST_DEVICE || ops == NULL)\n-\t\treturn -1;\n-\n-\tfor (i = 0; i < MAX_VHOST_DEVICE; i++) {\n-\t\tdev = &vdpa_devices[i];\n-\t\tif (dev->ops == NULL)\n-\t\t\tcontinue;\n-\n-\t\tif (dev->device == rte_dev)\n-\t\t\treturn -1;\n-\t}\n-\n-\tfor (i = 0; i < MAX_VHOST_DEVICE; i++) {\n-\t\tif (vdpa_devices[i].ops == NULL)\n-\t\t\tbreak;\n-\t}\n-\n-\tif (i == MAX_VHOST_DEVICE)\n-\t\treturn -1;\n-\n-\tdev = &vdpa_devices[i];\n-\tdev->device = rte_dev;\n-\tdev->ops = ops;\n-\tvdpa_device_num++;\n-\n-\treturn i;\n-}\n-\n-int\n-rte_vdpa_unregister_device(int did)\n-{\n-\tif (did < 0 || did >= MAX_VHOST_DEVICE || vdpa_devices[did].ops == NULL)\n-\t\treturn -1;\n-\n-\tmemset(&vdpa_devices[did], 0, sizeof(struct rte_vdpa_device));\n-\tvdpa_device_num--;\n-\n-\treturn did;\n-}\n \n int\n rte_vdpa_find_device_id(struct rte_vdpa_device *dev)\n@@ -116,6 +70,55 @@ rte_vdpa_get_device(int did)\n \treturn &vdpa_devices[did];\n }\n \n+struct rte_vdpa_device *\n+rte_vdpa_register_device(struct rte_device *rte_dev,\n+\t\tstruct rte_vdpa_dev_ops *ops)\n+{\n+\tstruct rte_vdpa_device *dev;\n+\tint i;\n+\n+\tif (vdpa_device_num >= MAX_VHOST_DEVICE || ops == NULL)\n+\t\treturn NULL;\n+\n+\tfor (i = 0; i < MAX_VHOST_DEVICE; i++) {\n+\t\tdev = &vdpa_devices[i];\n+\t\tif (dev->ops == NULL)\n+\t\t\tcontinue;\n+\n+\t\tif (dev->device == rte_dev)\n+\t\t\treturn NULL;\n+\t}\n+\n+\tfor (i = 0; i < MAX_VHOST_DEVICE; i++) {\n+\t\tif (vdpa_devices[i].ops == NULL)\n+\t\t\tbreak;\n+\t}\n+\n+\tif (i == MAX_VHOST_DEVICE)\n+\t\treturn NULL;\n+\n+\tdev = &vdpa_devices[i];\n+\tdev->device = rte_dev;\n+\tdev->ops = ops;\n+\tvdpa_device_num++;\n+\n+\treturn dev;\n+}\n+\n+int\n+rte_vdpa_unregister_device(struct rte_vdpa_device *vdev)\n+{\n+\tint did = rte_vdpa_find_device_id(vdev);\n+\n+\tif (did < 0 || vdpa_devices[did].ops == NULL)\n+\t\treturn -1;\n+\n+\tmemset(&vdpa_devices[did], 0, sizeof(struct rte_vdpa_device));\n+\tvdpa_device_num--;\n+\n+\treturn 0;\n+}\n+\n int\n rte_vdpa_get_device_num(void)\n {\n@@ -236,7 +239,7 @@ rte_vdpa_get_stats_names(int did, struct rte_vdpa_stat_name *stats_names,\n \n \tRTE_FUNC_PTR_OR_ERR_RET(vdpa_dev->ops->get_stats_names, -ENOTSUP);\n \n-\treturn vdpa_dev->ops->get_stats_names(did, stats_names, size);\n+\treturn vdpa_dev->ops->get_stats_names(vdpa_dev, stats_names, size);\n }\n \n int\n@@ -254,7 +257,7 @@ rte_vdpa_get_stats(int did, uint16_t qid, struct rte_vdpa_stat *stats,\n \n \tRTE_FUNC_PTR_OR_ERR_RET(vdpa_dev->ops->get_stats, -ENOTSUP);\n \n-\treturn vdpa_dev->ops->get_stats(did, qid, stats, n);\n+\treturn vdpa_dev->ops->get_stats(vdpa_dev, qid, stats, n);\n }\n \n int\n@@ -268,7 +271,7 @@ rte_vdpa_reset_stats(int did, uint16_t qid)\n \n \tRTE_FUNC_PTR_OR_ERR_RET(vdpa_dev->ops->reset_stats, -ENOTSUP);\n \n-\treturn vdpa_dev->ops->reset_stats(did, qid);\n+\treturn vdpa_dev->ops->reset_stats(vdpa_dev, qid);\n }\n \n static uint16_t\n",
    "prefixes": [
        "v3",
        "05/14"
    ]
}