get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 93283,
    "url": "https://patches.dpdk.org/api/patches/93283/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20210517085951.28970-1-david.marchand@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": "<20210517085951.28970-1-david.marchand@redhat.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20210517085951.28970-1-david.marchand@redhat.com",
    "date": "2021-05-17T08:59:51",
    "name": "vhost: restore IOTLB mempool allocation",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "abdc665a6f41a72cf9225975744adedfb248d407",
    "submitter": {
        "id": 1173,
        "url": "https://patches.dpdk.org/api/people/1173/?format=api",
        "name": "David Marchand",
        "email": "david.marchand@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/20210517085951.28970-1-david.marchand@redhat.com/mbox/",
    "series": [
        {
            "id": 17002,
            "url": "https://patches.dpdk.org/api/series/17002/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=17002",
            "date": "2021-05-17T08:59:51",
            "name": "vhost: restore IOTLB mempool allocation",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/17002/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/93283/comments/",
    "check": "fail",
    "checks": "https://patches.dpdk.org/api/patches/93283/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 44B0BA0A02;\n\tMon, 17 May 2021 11:00:15 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id F2EFE4014E;\n\tMon, 17 May 2021 11:00:14 +0200 (CEST)",
            "from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [216.205.24.124])\n by mails.dpdk.org (Postfix) with ESMTP id 6DDF240041\n for <dev@dpdk.org>; Mon, 17 May 2021 11:00: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-527-1S6r1AXEPGyv00l__YgRYA-1; Mon, 17 May 2021 05:00:10 -0400",
            "from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com\n [10.5.11.11])\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 19DD18015DB;\n Mon, 17 May 2021 09:00:09 +0000 (UTC)",
            "from dmarchan.remote.csb (unknown [10.40.192.21])\n by smtp.corp.redhat.com (Postfix) with ESMTP id 7A2615B4A8;\n Mon, 17 May 2021 08:59:59 +0000 (UTC)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1621242012;\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 bh=P8fosMMDhVqE+1eFS3xOUKzsXfaNu5wfsM5+XUwxwKA=;\n b=dbYqmd6c1mlOgo9ubfuQ5ZR1wqM7LPvuBHLRnH2a9xdtNi/246XgDOPUsZGmLSZ2vWKsQJ\n gnHRsZxz/XoT3WjO7ITl72XWqUPmPib2W8aKSDzsBpt0TBWRFB/Ng/AOdREKrJ1m1N2TKH\n kD2VPicv0Uub58hg8Y/Siua96WvlKhQ=",
        "X-MC-Unique": "1S6r1AXEPGyv00l__YgRYA-1",
        "From": "David Marchand <david.marchand@redhat.com>",
        "To": "dev@dpdk.org",
        "Cc": "thomas@monjalon.net, ferruh.yigit@intel.com,\n Maxime Coquelin <maxime.coquelin@redhat.com>,\n Chenbo Xia <chenbo.xia@intel.com>,\n Zhihong Wang <wangzhihong.wzh@bytedance.com>,\n Junjie Wan <wanjunjie@bytedance.com>",
        "Date": "Mon, 17 May 2021 10:59:51 +0200",
        "Message-Id": "<20210517085951.28970-1-david.marchand@redhat.com>",
        "MIME-Version": "1.0",
        "X-Scanned-By": "MIMEDefang 2.79 on 10.5.11.11",
        "Authentication-Results": "relay.mimecast.com;\n auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=david.marchand@redhat.com",
        "X-Mimecast-Spam-Score": "0",
        "X-Mimecast-Originator": "redhat.com",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain; charset=\"US-ASCII\"",
        "Subject": "[dpdk-dev] [PATCH] vhost: restore IOTLB mempool allocation",
        "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",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "As explained by Chenbo, IOTLB messages will be sent when some queues\nare not enabled. If we initialize IOTLB in vhost_user_set_vring_num,\nit could happen that IOTLB update comes when IOTLB pool of disabled\nqueues are not initialized.\n\nFixes: 968bbc7e2e50 (\"vhost: avoid IOTLB mempool allocation while IOMMU disabled\")\n\nSigned-off-by: David Marchand <david.marchand@redhat.com>\n---\nSummary of a discussion with Maxime:\n\nTo keep the mempool allocation optimization, we could try to initialise\nthe per-vring mempools at reception of the first IOTLB message.\nSince those pools are used as caches, it is not an issue if some vrings\nreceived more IOTLB updates than others.\n\nBut looking/testing this now is too late for 21.05, hence reverting is\nthe safer.\n\n---\n lib/vhost/vhost.c      | 5 +++--\n lib/vhost/vhost_user.c | 6 +-----\n 2 files changed, 4 insertions(+), 7 deletions(-)",
    "diff": "diff --git a/lib/vhost/vhost.c b/lib/vhost/vhost.c\nindex 9cbcf650b6..c96f6335c8 100644\n--- a/lib/vhost/vhost.c\n+++ b/lib/vhost/vhost.c\n@@ -365,8 +365,7 @@ free_vq(struct virtio_net *dev, struct vhost_virtqueue *vq)\n \n \tvhost_free_async_mem(vq);\n \trte_free(vq->batch_copy_elems);\n-\tif (vq->iotlb_pool)\n-\t\trte_mempool_free(vq->iotlb_pool);\n+\trte_mempool_free(vq->iotlb_pool);\n \trte_free(vq->log_cache);\n \trte_free(vq);\n }\n@@ -570,6 +569,8 @@ init_vring_queue(struct virtio_net *dev, uint32_t vring_idx)\n \tvq->kickfd = VIRTIO_UNINITIALIZED_EVENTFD;\n \tvq->callfd = VIRTIO_UNINITIALIZED_EVENTFD;\n \tvq->notif_enable = VIRTIO_UNINITIALIZED_NOTIF;\n+\n+\tvhost_user_iotlb_init(dev, vring_idx);\n }\n \n static void\ndiff --git a/lib/vhost/vhost_user.c b/lib/vhost/vhost_user.c\nindex 611ff209e3..8f0eba6412 100644\n--- a/lib/vhost/vhost_user.c\n+++ b/lib/vhost/vhost_user.c\n@@ -469,10 +469,6 @@ vhost_user_set_vring_num(struct virtio_net **pdev,\n \t\treturn RTE_VHOST_MSG_RESULT_ERR;\n \t}\n \n-\tif (dev->features & (1ULL << VIRTIO_F_IOMMU_PLATFORM)) {\n-\t\tif (vhost_user_iotlb_init(dev, msg->payload.state.index))\n-\t\t\treturn RTE_VHOST_MSG_RESULT_ERR;\n-\t}\n \treturn RTE_VHOST_MSG_RESULT_OK;\n }\n \n@@ -578,7 +574,7 @@ numa_realloc(struct virtio_net *dev, int index)\n \tdev->virtqueue[index] = vq;\n \tvhost_devices[dev->vid] = dev;\n \n-\tif (old_vq != vq && (dev->features & (1ULL << VIRTIO_F_IOMMU_PLATFORM)))\n+\tif (old_vq != vq)\n \t\tvhost_user_iotlb_init(dev, index);\n \n \treturn dev;\n",
    "prefixes": []
}