get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 124500,
    "url": "https://patches.dpdk.org/api/patches/124500/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20230224081642.2566619-11-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": "<20230224081642.2566619-11-david.marchand@redhat.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20230224081642.2566619-11-david.marchand@redhat.com",
    "date": "2023-02-24T08:16:38",
    "name": "[10/14] net/sfc: inherit lock annotations",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "ac6abd7794b59a52c875585d5490cdf0e360b950",
    "submitter": {
        "id": 1173,
        "url": "https://patches.dpdk.org/api/people/1173/?format=api",
        "name": "David Marchand",
        "email": "david.marchand@redhat.com"
    },
    "delegate": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20230224081642.2566619-11-david.marchand@redhat.com/mbox/",
    "series": [
        {
            "id": 27167,
            "url": "https://patches.dpdk.org/api/series/27167/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=27167",
            "date": "2023-02-24T08:16:28",
            "name": "Enable lock annotations on most libraries and drivers",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/27167/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/124500/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/124500/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 7E38A41D5D;\n\tFri, 24 Feb 2023 09:17:59 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id D3D1542D1A;\n\tFri, 24 Feb 2023 09:17:27 +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 C11D842D0E\n for <dev@dpdk.org>; Fri, 24 Feb 2023 09:17:25 +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-352-fqmpdo14MPy8STzguYFwCw-1; Fri, 24 Feb 2023 03:17:21 -0500",
            "from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com\n [10.11.54.8])\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 8EA6029A9D2A;\n Fri, 24 Feb 2023 08:17:21 +0000 (UTC)",
            "from dmarchan.redhat.com (unknown [10.45.224.55])\n by smtp.corp.redhat.com (Postfix) with ESMTP id CE8A7C15BA0;\n Fri, 24 Feb 2023 08:17:20 +0000 (UTC)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1677226645;\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=9QDwi+7WhFrIcDtHhsxTZ9Ark+m4xRxs7VV2a6EW9og=;\n b=haPL9WEOKkE7nZyuCwKvLouksj4hbNik8ttygu+gkM/ZvYf4A6fwRl/FzVJB4DE2RZ7OCs\n JN6BKEKm8LH1CA4CJJfeTjgORrJXStG/Iam5qrUJmlV0ZTcIkzddZOiuj1kEuErleHbRj7\n +ZFFUldzlXfLj8+h9w8EPJz/CW0BnNE=",
        "X-MC-Unique": "fqmpdo14MPy8STzguYFwCw-1",
        "From": "David Marchand <david.marchand@redhat.com>",
        "To": "dev@dpdk.org",
        "Cc": "thomas@monjalon.net,\n\tAndrew Rybchenko <andrew.rybchenko@oktetlabs.ru>",
        "Subject": "[PATCH 10/14] net/sfc: inherit lock annotations",
        "Date": "Fri, 24 Feb 2023 09:16:38 +0100",
        "Message-Id": "<20230224081642.2566619-11-david.marchand@redhat.com>",
        "In-Reply-To": "<20230224081642.2566619-1-david.marchand@redhat.com>",
        "References": "<20230224081642.2566619-1-david.marchand@redhat.com>",
        "MIME-Version": "1.0",
        "X-Scanned-By": "MIMEDefang 3.1 on 10.11.54.8",
        "X-Mimecast-Spam-Score": "0",
        "X-Mimecast-Originator": "redhat.com",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain; charset=\"US-ASCII\"; x-default=true",
        "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": "Due to clang limitation, inline helpers don't inherit lock annotations\nfrom the EAL lock API.\nReplace them with macros.\n\nOne additional change is required in sfc_ev_qpoll() so that clang does\nsee the same lock is being manipulated.\n\nSigned-off-by: David Marchand <david.marchand@redhat.com>\n---\n drivers/net/sfc/sfc.h      | 41 ++++++--------------------------------\n drivers/net/sfc/sfc_ev.c   |  6 ++++--\n drivers/net/sfc/sfc_repr.c | 38 +++++------------------------------\n 3 files changed, 15 insertions(+), 70 deletions(-)",
    "diff": "diff --git a/drivers/net/sfc/sfc.h b/drivers/net/sfc/sfc.h\nindex 0a1e224fa2..730d054aea 100644\n--- a/drivers/net/sfc/sfc.h\n+++ b/drivers/net/sfc/sfc.h\n@@ -333,41 +333,12 @@ sfc_sa2shared(struct sfc_adapter *sa)\n  * change the lock in one place.\n  */\n \n-static inline void\n-sfc_adapter_lock_init(struct sfc_adapter *sa)\n-{\n-\trte_spinlock_init(&sa->lock);\n-}\n-\n-static inline int\n-sfc_adapter_is_locked(struct sfc_adapter *sa)\n-{\n-\treturn rte_spinlock_is_locked(&sa->lock);\n-}\n-\n-static inline void\n-sfc_adapter_lock(struct sfc_adapter *sa)\n-{\n-\trte_spinlock_lock(&sa->lock);\n-}\n-\n-static inline int\n-sfc_adapter_trylock(struct sfc_adapter *sa)\n-{\n-\treturn rte_spinlock_trylock(&sa->lock);\n-}\n-\n-static inline void\n-sfc_adapter_unlock(struct sfc_adapter *sa)\n-{\n-\trte_spinlock_unlock(&sa->lock);\n-}\n-\n-static inline void\n-sfc_adapter_lock_fini(__rte_unused struct sfc_adapter *sa)\n-{\n-\t/* Just for symmetry of the API */\n-}\n+#define sfc_adapter_lock_init(sa) rte_spinlock_init(&(sa)->lock)\n+#define sfc_adapter_is_locked(sa) rte_spinlock_is_locked(&(sa)->lock)\n+#define sfc_adapter_lock(sa) rte_spinlock_lock(&(sa)->lock)\n+#define sfc_adapter_trylock(sa) rte_spinlock_trylock(&(sa)->lock)\n+#define sfc_adapter_unlock(sa) rte_spinlock_unlock(&(sa)->lock)\n+#define sfc_adapter_lock_fini(sa) RTE_SET_USED(sa)\n \n static inline unsigned int\n sfc_nb_counter_rxq(const struct sfc_adapter_shared *sas)\ndiff --git a/drivers/net/sfc/sfc_ev.c b/drivers/net/sfc/sfc_ev.c\nindex f949abbfc3..c0d58c9554 100644\n--- a/drivers/net/sfc/sfc_ev.c\n+++ b/drivers/net/sfc/sfc_ev.c\n@@ -570,6 +570,8 @@ static const efx_ev_callbacks_t sfc_ev_callbacks_dp_tx = {\n void\n sfc_ev_qpoll(struct sfc_evq *evq)\n {\n+\tstruct sfc_adapter *sa;\n+\n \tSFC_ASSERT(evq->init_state == SFC_EVQ_STARTED ||\n \t\t   evq->init_state == SFC_EVQ_STARTING);\n \n@@ -577,8 +579,8 @@ sfc_ev_qpoll(struct sfc_evq *evq)\n \n \tefx_ev_qpoll(evq->common, &evq->read_ptr, evq->callbacks, evq);\n \n-\tif (unlikely(evq->exception) && sfc_adapter_trylock(evq->sa)) {\n-\t\tstruct sfc_adapter *sa = evq->sa;\n+\tsa = evq->sa;\n+\tif (unlikely(evq->exception) && sfc_adapter_trylock(sa)) {\n \t\tint rc;\n \n \t\tif (evq->dp_rxq != NULL) {\ndiff --git a/drivers/net/sfc/sfc_repr.c b/drivers/net/sfc/sfc_repr.c\nindex 4b03b101d8..017c3fb247 100644\n--- a/drivers/net/sfc/sfc_repr.c\n+++ b/drivers/net/sfc/sfc_repr.c\n@@ -112,39 +112,11 @@ sfc_repr_by_eth_dev(struct rte_eth_dev *eth_dev)\n  * change the lock in one place.\n  */\n \n-static inline void\n-sfc_repr_lock_init(struct sfc_repr *sr)\n-{\n-\trte_spinlock_init(&sr->lock);\n-}\n-\n-#if defined(RTE_LIBRTE_SFC_EFX_DEBUG) || defined(RTE_ENABLE_ASSERT)\n-\n-static inline int\n-sfc_repr_lock_is_locked(struct sfc_repr *sr)\n-{\n-\treturn rte_spinlock_is_locked(&sr->lock);\n-}\n-\n-#endif\n-\n-static inline void\n-sfc_repr_lock(struct sfc_repr *sr)\n-{\n-\trte_spinlock_lock(&sr->lock);\n-}\n-\n-static inline void\n-sfc_repr_unlock(struct sfc_repr *sr)\n-{\n-\trte_spinlock_unlock(&sr->lock);\n-}\n-\n-static inline void\n-sfc_repr_lock_fini(__rte_unused struct sfc_repr *sr)\n-{\n-\t/* Just for symmetry of the API */\n-}\n+#define sfc_repr_lock_init(sr) rte_spinlock_init(&(sr)->lock)\n+#define sfc_repr_lock_is_locked(sr) rte_spinlock_is_locked(&(sr)->lock)\n+#define sfc_repr_lock(sr) rte_spinlock_lock(&(sr)->lock)\n+#define sfc_repr_unlock(sr) rte_spinlock_unlock(&(sr)->lock)\n+#define sfc_repr_lock_fini(sr) RTE_SET_USED(sr)\n \n static void\n sfc_repr_rx_queue_stop(void *queue)\n",
    "prefixes": [
        "10/14"
    ]
}