get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 122856,
    "url": "http://patchwork.dpdk.org/api/patches/122856/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20230201111411.1509520-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": "<20230201111411.1509520-7-david.marchand@redhat.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20230201111411.1509520-7-david.marchand@redhat.com",
    "date": "2023-02-01T11:14:08",
    "name": "[v5,6/9] vhost: always take IOTLB lock",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "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/20230201111411.1509520-7-david.marchand@redhat.com/mbox/",
    "series": [
        {
            "id": 26733,
            "url": "http://patchwork.dpdk.org/api/series/26733/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=26733",
            "date": "2023-02-01T11:14:02",
            "name": "Lock annotations",
            "version": 5,
            "mbox": "http://patchwork.dpdk.org/series/26733/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/122856/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/122856/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 2AAFC41B9E;\n\tWed,  1 Feb 2023 12:16:28 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 9412342D46;\n\tWed,  1 Feb 2023 12:16:16 +0100 (CET)",
            "from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [170.10.133.124])\n by mails.dpdk.org (Postfix) with ESMTP id 616B442D65\n for <dev@dpdk.org>; Wed,  1 Feb 2023 12:16:14 +0100 (CET)",
            "from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com\n [66.187.233.88]) 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-542-sKETpp8jNxyNoQMp4kZOCg-1; Wed, 01 Feb 2023 06:16:09 -0500",
            "from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com\n [10.11.54.3])\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 E981F858F0E;\n Wed,  1 Feb 2023 11:16:08 +0000 (UTC)",
            "from dmarchan.redhat.com (ovpn-192-67.brq.redhat.com [10.40.192.67])\n by smtp.corp.redhat.com (Postfix) with ESMTP id 5B7D0112132C;\n Wed,  1 Feb 2023 11:16:07 +0000 (UTC)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1675250174;\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=+lZl+t9tzywykV5ChriaeNo/RuOG5i9+upvsnJ+wBac=;\n b=fztqLMWp638Qz3qxuuoRCPWf24IGQlfnHE4S6wvG0A+O9FDvlncKAEmG1PpVSVdcRBeR7d\n cRgYhCddzSe0qeWmcZeYpE62tFMtRn8oodBLICC96S6llxUjwb/uKue7AgGgrbHwYejeMx\n 5Qzh6rBn3bFTgMUV/L0kwtR91W1BmKU=",
        "X-MC-Unique": "sKETpp8jNxyNoQMp4kZOCg-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 v5 6/9] vhost: always take IOTLB lock",
        "Date": "Wed,  1 Feb 2023 12:14:08 +0100",
        "Message-Id": "<20230201111411.1509520-7-david.marchand@redhat.com>",
        "In-Reply-To": "<20230201111411.1509520-1-david.marchand@redhat.com>",
        "References": "<20220328121758.26632-1-david.marchand@redhat.com>\n <20230201111411.1509520-1-david.marchand@redhat.com>",
        "MIME-Version": "1.0",
        "X-Scanned-By": "MIMEDefang 3.1 on 10.11.54.3",
        "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 eedaf0fbf3..ed92a855f8 100644\n--- a/lib/vhost/virtio_net.c\n+++ b/lib/vhost/virtio_net.c\n@@ -1572,8 +1572,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@@ -1591,8 +1590,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@@ -2312,8 +2310,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@@ -2333,8 +2330,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@@ -3282,8 +3278,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@@ -3342,8 +3337,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@@ -3815,8 +3809,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@@ -3880,8 +3873,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": [
        "v5",
        "6/9"
    ]
}