get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 118523,
    "url": "http://patches.dpdk.org/api/patches/118523/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1666168884-104665-12-git-send-email-andy.pei@intel.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": "<1666168884-104665-12-git-send-email-andy.pei@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1666168884-104665-12-git-send-email-andy.pei@intel.com",
    "date": "2022-10-19T08:41:23",
    "name": "[v9,11/12] vhost: vDPA blk device gets ready when the first queue is ready",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "fdbb22c9dcf9b06f474d391c790deab880615140",
    "submitter": {
        "id": 1185,
        "url": "http://patches.dpdk.org/api/people/1185/?format=api",
        "name": "Pei, Andy",
        "email": "andy.pei@intel.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/1666168884-104665-12-git-send-email-andy.pei@intel.com/mbox/",
    "series": [
        {
            "id": 25297,
            "url": "http://patches.dpdk.org/api/series/25297/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=25297",
            "date": "2022-10-19T08:41:12",
            "name": "vdpa/ifc: add multi queue support",
            "version": 9,
            "mbox": "http://patches.dpdk.org/series/25297/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/118523/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/118523/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 mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id AC846A0581;\n\tWed, 19 Oct 2022 11:32:46 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 8A21742B89;\n\tWed, 19 Oct 2022 11:32:04 +0200 (CEST)",
            "from mga11.intel.com (mga11.intel.com [192.55.52.93])\n by mails.dpdk.org (Postfix) with ESMTP id 3FF6642B72\n for <dev@dpdk.org>; Wed, 19 Oct 2022 11:31:59 +0200 (CEST)",
            "from fmsmga001.fm.intel.com ([10.253.24.23])\n by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 19 Oct 2022 02:31:58 -0700",
            "from dpdk-dipei.sh.intel.com ([10.67.110.251])\n by fmsmga001.fm.intel.com with ESMTP; 19 Oct 2022 02:31:57 -0700"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n t=1666171919; x=1697707919;\n h=from:to:cc:subject:date:message-id:in-reply-to: references;\n bh=Mhrk1kAopy8EdJE3g1dK+0c0IdwoRk4koS0FSEXR2Kw=;\n b=TaKK1zvdDfa9MtGseUv2SiHurUo6gLXPLMsOnEM+fplt6C8uPYFnVRuI\n P6Pbnrdgjh2EH0n3Mz35Mv5kpvIRbKM2C5Heb2rm2bBk6GJjgRo8Kr0aM\n FSRJ/oBzQ4SCel0YhslaAZUMNf04uiqipaer62zmwAexmFoqaafCjW8nl\n 2g/fhyrIQ9DTXmdyGyfiVbU1uN5fFV6xk8Awkiuu1i/4eVKi4Fcb5NXDc\n YIS0exngAr3NB8tLdAe1LxO85Q9mIOgTU1PCuLXOdkJz/EcCACvbWxXT/\n /bpIw4Pz1yBeiLMOF+nV0mSNp9kVUvNTSPAo+6fFoPdGDu7k3jpL8WDv8 w==;",
        "X-IronPort-AV": [
            "E=McAfee;i=\"6500,9779,10504\"; a=\"303976954\"",
            "E=Sophos;i=\"5.95,195,1661842800\"; d=\"scan'208\";a=\"303976954\"",
            "E=McAfee;i=\"6500,9779,10504\"; a=\"771691051\"",
            "E=Sophos;i=\"5.95,195,1661842800\"; d=\"scan'208\";a=\"771691051\""
        ],
        "X-ExtLoop1": "1",
        "From": "Andy Pei <andy.pei@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "chenbo.xia@intel.com, rosen.xu@intel.com, wei.huang@intel.com,\n gang.cao@intel.com, maxime.coquelin@redhat.com",
        "Subject": "[PATCH v9 11/12] vhost: vDPA blk device gets ready when the first\n queue is ready",
        "Date": "Wed, 19 Oct 2022 16:41:23 +0800",
        "Message-Id": "<1666168884-104665-12-git-send-email-andy.pei@intel.com>",
        "X-Mailer": "git-send-email 1.8.3.1",
        "In-Reply-To": "<1666168884-104665-1-git-send-email-andy.pei@intel.com>",
        "References": "<1661229305-240952-2-git-send-email-andy.pei@intel.com>\n <1666168884-104665-1-git-send-email-andy.pei@intel.com>",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "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"
    },
    "content": "When boot from virtio blk device, seabios in QEMU only enables one queue.\nTo work in this scenario, vDPA BLK device back-end configure device\nwhen the first queue is ready.\n\nSigned-off-by: Andy Pei <andy.pei@intel.com>\nSigned-off-by: Huang Wei <wei.huang@intel.com>\nReviewed-by: Chenbo Xia <chenbo.xia@intel.com>\nReviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>\n---\n lib/vhost/vhost_user.c | 33 +++++++++++++++++----------------\n 1 file changed, 17 insertions(+), 16 deletions(-)",
    "diff": "diff --git a/lib/vhost/vhost_user.c b/lib/vhost/vhost_user.c\nindex cd65257..e0ff79d 100644\n--- a/lib/vhost/vhost_user.c\n+++ b/lib/vhost/vhost_user.c\n@@ -1441,11 +1441,14 @@\n }\n \n #define VIRTIO_BUILTIN_NUM_VQS_TO_BE_READY 2u\n+#define VIRTIO_BLK_NUM_VQS_TO_BE_READY 1u\n \n static int\n virtio_is_ready(struct virtio_net *dev)\n {\n+\tstruct rte_vdpa_device *vdpa_dev;\n \tstruct vhost_virtqueue *vq;\n+\tuint32_t vdpa_type;\n \tuint32_t i, nr_vring = dev->nr_vring;\n \n \tif (dev->flags & VIRTIO_DEV_READY)\n@@ -1454,13 +1457,22 @@\n \tif (!dev->nr_vring)\n \t\treturn 0;\n \n-\tif (dev->flags & VIRTIO_DEV_BUILTIN_VIRTIO_NET) {\n-\t\tnr_vring = VIRTIO_BUILTIN_NUM_VQS_TO_BE_READY;\n+\tvdpa_dev = dev->vdpa_dev;\n+\tif (vdpa_dev)\n+\t\tvdpa_type = vdpa_dev->type;\n+\telse\n+\t\tvdpa_type = -1;\n \n-\t\tif (dev->nr_vring < nr_vring)\n-\t\t\treturn 0;\n+\tif (vdpa_type == RTE_VHOST_VDPA_DEVICE_TYPE_BLK) {\n+\t\tnr_vring = VIRTIO_BLK_NUM_VQS_TO_BE_READY;\n+\t} else {\n+\t\tif (dev->flags & VIRTIO_DEV_BUILTIN_VIRTIO_NET)\n+\t\t\tnr_vring = VIRTIO_BUILTIN_NUM_VQS_TO_BE_READY;\n \t}\n \n+\tif (dev->nr_vring < nr_vring)\n+\t\treturn 0;\n+\n \tfor (i = 0; i < nr_vring; i++) {\n \t\tvq = dev->virtqueue[i];\n \n@@ -2958,7 +2970,6 @@ static int is_vring_iotlb(struct virtio_net *dev,\n \tint ret;\n \tint unlock_required = 0;\n \tbool handled;\n-\tuint32_t vdpa_type = 0;\n \tuint32_t request;\n \tuint32_t i;\n \n@@ -3170,17 +3181,7 @@ static int is_vring_iotlb(struct virtio_net *dev,\n \tif (!vdpa_dev)\n \t\tgoto out;\n \n-\tif (vdpa_dev->ops->get_dev_type) {\n-\t\tret = vdpa_dev->ops->get_dev_type(vdpa_dev, &vdpa_type);\n-\t\tif (ret) {\n-\t\t\tVHOST_LOG_CONFIG(dev->ifname, ERR, \"failed to get vdpa dev type.\\n\");\n-\t\t\tret = -1;\n-\t\t\tgoto out;\n-\t\t}\n-\t} else {\n-\t\tvdpa_type = RTE_VHOST_VDPA_DEVICE_TYPE_NET;\n-\t}\n-\tif (vdpa_type == RTE_VHOST_VDPA_DEVICE_TYPE_BLK\n+\tif (vdpa_dev->type == RTE_VHOST_VDPA_DEVICE_TYPE_BLK\n \t\t&& request != VHOST_USER_SET_VRING_CALL)\n \t\tgoto out;\n \n",
    "prefixes": [
        "v9",
        "11/12"
    ]
}