get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 123219,
    "url": "http://patchwork.dpdk.org/api/patches/123219/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20230207104532.2370869-7-david.marchand@redhat.com/",
    "project": {
        "id": 1,
        "url": "http://patchwork.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": "<20230207104532.2370869-7-david.marchand@redhat.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20230207104532.2370869-7-david.marchand@redhat.com",
    "date": "2023-02-07T10:45:29",
    "name": "[v6,6/9] vhost: always take IOTLB lock",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "0c9f52a5fbefa2d2f283ae94cbb39c49df9382fc",
    "submitter": {
        "id": 1173,
        "url": "http://patchwork.dpdk.org/api/people/1173/?format=api",
        "name": "David Marchand",
        "email": "david.marchand@redhat.com"
    },
    "delegate": {
        "id": 1,
        "url": "http://patchwork.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20230207104532.2370869-7-david.marchand@redhat.com/mbox/",
    "series": [
        {
            "id": 26843,
            "url": "http://patchwork.dpdk.org/api/series/26843/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=26843",
            "date": "2023-02-07T10:45:23",
            "name": "Lock annotations",
            "version": 6,
            "mbox": "http://patchwork.dpdk.org/series/26843/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/123219/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/123219/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 4BFCC41C2D;\n\tTue,  7 Feb 2023 11:46:32 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 04DD542D67;\n\tTue,  7 Feb 2023 11:46:10 +0100 (CET)",
            "from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [170.10.129.124])\n by mails.dpdk.org (Postfix) with ESMTP id 1BCE042D52\n for <dev@dpdk.org>; Tue,  7 Feb 2023 11:46:09 +0100 (CET)",
            "from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com\n [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS\n (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id\n us-mta-317-V3aMJW4hPMyxL2pTA1J1dw-1; Tue, 07 Feb 2023 05:46:04 -0500",
            "from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com\n [10.11.54.9])\n (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n (No client certificate requested)\n by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 4EE89293248C;\n Tue,  7 Feb 2023 10:46:04 +0000 (UTC)",
            "from dmarchan.redhat.com (ovpn-195-46.brq.redhat.com [10.40.195.46])\n by smtp.corp.redhat.com (Postfix) with ESMTP id B2160492C3F;\n Tue,  7 Feb 2023 10:46:02 +0000 (UTC)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1675766768;\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=kOBIU+X+IDSexcMm4j/+uveZOaNs9bCuFeWBDyatHIE=;\n b=THFbiSFm/neabJQBSYKdZr4pj1mqBW42ihufzWH7oY1P3akXNvkXp/9SRsmNb/IUSm7JlT\n 8Hbp1/JYu28qs6CtTr40GUSu+jLJUwuHCi+lxq2guZXqVfZo0B7gMu3wzpsJ2QsAI5x+U7\n WegjlgfWoMvv4RLyPZMgXRVD3+LNzaQ=",
        "X-MC-Unique": "V3aMJW4hPMyxL2pTA1J1dw-1",
        "From": "David Marchand <david.marchand@redhat.com>",
        "To": "dev@dpdk.org",
        "Cc": "maxime.coquelin@redhat.com, stephen@networkplumber.org,\n chenbo.xia@intel.com, jiayu.hu@intel.com, yuanx.wang@intel.com,\n xuan.ding@intel.com, mb@smartsharesystems.com",
        "Subject": "[PATCH v6 6/9] vhost: always take IOTLB lock",
        "Date": "Tue,  7 Feb 2023 11:45:29 +0100",
        "Message-Id": "<20230207104532.2370869-7-david.marchand@redhat.com>",
        "In-Reply-To": "<20230207104532.2370869-1-david.marchand@redhat.com>",
        "References": "<20220328121758.26632-1-david.marchand@redhat.com>\n <20230207104532.2370869-1-david.marchand@redhat.com>",
        "MIME-Version": "1.0",
        "X-Scanned-By": "MIMEDefang 3.1 on 10.11.54.9",
        "X-Mimecast-Spam-Score": "0",
        "X-Mimecast-Originator": "redhat.com",
        "Content-Type": "text/plain; charset=UTF-8",
        "Content-Transfer-Encoding": "8bit",
        "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": "clang does not support conditionally held locks when statically analysing\ntaken locks with thread safety checks.\nAlways take iotlb locks regardless of VIRTIO_F_IOMMU_PLATFORM feature.\n\nSigned-off-by: David Marchand <david.marchand@redhat.com>\nAcked-by: Morten Brørup <mb@smartsharesystems.com>\nReviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>\n---\n lib/vhost/vhost.c      |  8 +++-----\n lib/vhost/virtio_net.c | 24 ++++++++----------------\n 2 files changed, 11 insertions(+), 21 deletions(-)",
    "diff": "diff --git a/lib/vhost/vhost.c b/lib/vhost/vhost.c\nindex 8bccdd8584..1e0c30791e 100644\n--- a/lib/vhost/vhost.c\n+++ b/lib/vhost/vhost.c\n@@ -563,10 +563,9 @@ vring_translate(struct virtio_net *dev, struct vhost_virtqueue *vq)\n }\n \n void\n-vring_invalidate(struct virtio_net *dev, struct vhost_virtqueue *vq)\n+vring_invalidate(struct virtio_net *dev __rte_unused, struct vhost_virtqueue *vq)\n {\n-\tif (dev->features & (1ULL << VIRTIO_F_IOMMU_PLATFORM))\n-\t\tvhost_user_iotlb_wr_lock(vq);\n+\tvhost_user_iotlb_wr_lock(vq);\n \n \tvq->access_ok = false;\n \tvq->desc = NULL;\n@@ -574,8 +573,7 @@ vring_invalidate(struct virtio_net *dev, struct vhost_virtqueue *vq)\n \tvq->used = NULL;\n \tvq->log_guest_addr = 0;\n \n-\tif (dev->features & (1ULL << VIRTIO_F_IOMMU_PLATFORM))\n-\t\tvhost_user_iotlb_wr_unlock(vq);\n+\tvhost_user_iotlb_wr_unlock(vq);\n }\n \n static void\ndiff --git a/lib/vhost/virtio_net.c b/lib/vhost/virtio_net.c\nindex 6672caac49..49fc46e127 100644\n--- a/lib/vhost/virtio_net.c\n+++ b/lib/vhost/virtio_net.c\n@@ -1688,8 +1688,7 @@ virtio_dev_rx(struct virtio_net *dev, struct vhost_virtqueue *vq,\n \tif (unlikely(!vq->enabled))\n \t\tgoto out_access_unlock;\n \n-\tif (dev->features & (1ULL << VIRTIO_F_IOMMU_PLATFORM))\n-\t\tvhost_user_iotlb_rd_lock(vq);\n+\tvhost_user_iotlb_rd_lock(vq);\n \n \tif (unlikely(!vq->access_ok))\n \t\tif (unlikely(vring_translate(dev, vq) < 0))\n@@ -1707,8 +1706,7 @@ virtio_dev_rx(struct virtio_net *dev, struct vhost_virtqueue *vq,\n \tvhost_queue_stats_update(dev, vq, pkts, nb_tx);\n \n out:\n-\tif (dev->features & (1ULL << VIRTIO_F_IOMMU_PLATFORM))\n-\t\tvhost_user_iotlb_rd_unlock(vq);\n+\tvhost_user_iotlb_rd_unlock(vq);\n \n out_access_unlock:\n \trte_spinlock_unlock(&vq->access_lock);\n@@ -2499,8 +2497,7 @@ virtio_dev_rx_async_submit(struct virtio_net *dev, struct vhost_virtqueue *vq,\n \tif (unlikely(!vq->enabled || !vq->async))\n \t\tgoto out_access_unlock;\n \n-\tif (dev->features & (1ULL << VIRTIO_F_IOMMU_PLATFORM))\n-\t\tvhost_user_iotlb_rd_lock(vq);\n+\tvhost_user_iotlb_rd_lock(vq);\n \n \tif (unlikely(!vq->access_ok))\n \t\tif (unlikely(vring_translate(dev, vq) < 0))\n@@ -2520,8 +2517,7 @@ virtio_dev_rx_async_submit(struct virtio_net *dev, struct vhost_virtqueue *vq,\n \tvq->stats.inflight_submitted += nb_tx;\n \n out:\n-\tif (dev->features & (1ULL << VIRTIO_F_IOMMU_PLATFORM))\n-\t\tvhost_user_iotlb_rd_unlock(vq);\n+\tvhost_user_iotlb_rd_unlock(vq);\n \n out_access_unlock:\n \trte_spinlock_unlock(&vq->access_lock);\n@@ -3543,8 +3539,7 @@ rte_vhost_dequeue_burst(int vid, uint16_t queue_id,\n \t\tgoto out_access_unlock;\n \t}\n \n-\tif (dev->features & (1ULL << VIRTIO_F_IOMMU_PLATFORM))\n-\t\tvhost_user_iotlb_rd_lock(vq);\n+\tvhost_user_iotlb_rd_lock(vq);\n \n \tif (unlikely(!vq->access_ok))\n \t\tif (unlikely(vring_translate(dev, vq) < 0)) {\n@@ -3603,8 +3598,7 @@ rte_vhost_dequeue_burst(int vid, uint16_t queue_id,\n \tvhost_queue_stats_update(dev, vq, pkts, count);\n \n out:\n-\tif (dev->features & (1ULL << VIRTIO_F_IOMMU_PLATFORM))\n-\t\tvhost_user_iotlb_rd_unlock(vq);\n+\tvhost_user_iotlb_rd_unlock(vq);\n \n out_access_unlock:\n \trte_spinlock_unlock(&vq->access_lock);\n@@ -4150,8 +4144,7 @@ rte_vhost_async_try_dequeue_burst(int vid, uint16_t queue_id,\n \t\tgoto out_access_unlock;\n \t}\n \n-\tif (dev->features & (1ULL << VIRTIO_F_IOMMU_PLATFORM))\n-\t\tvhost_user_iotlb_rd_lock(vq);\n+\tvhost_user_iotlb_rd_lock(vq);\n \n \tif (unlikely(vq->access_ok == 0))\n \t\tif (unlikely(vring_translate(dev, vq) < 0)) {\n@@ -4215,8 +4208,7 @@ rte_vhost_async_try_dequeue_burst(int vid, uint16_t queue_id,\n \tvhost_queue_stats_update(dev, vq, pkts, count);\n \n out:\n-\tif (dev->features & (1ULL << VIRTIO_F_IOMMU_PLATFORM))\n-\t\tvhost_user_iotlb_rd_unlock(vq);\n+\tvhost_user_iotlb_rd_unlock(vq);\n \n out_access_unlock:\n \trte_spinlock_unlock(&vq->access_lock);\n",
    "prefixes": [
        "v6",
        "6/9"
    ]
}