Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/125761/?format=api
http://patches.dpdk.org/api/patches/125761/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20230404124840.1898-11-david.marchand@redhat.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": "<20230404124840.1898-11-david.marchand@redhat.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20230404124840.1898-11-david.marchand@redhat.com", "date": "2023-04-04T12:48:34", "name": "[v3,10/16] net/sfc: inherit lock annotations", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "ac6abd7794b59a52c875585d5490cdf0e360b950", "submitter": { "id": 1173, "url": "http://patches.dpdk.org/api/people/1173/?format=api", "name": "David Marchand", "email": "david.marchand@redhat.com" }, "delegate": { "id": 1, "url": "http://patches.dpdk.org/api/users/1/?format=api", "username": "tmonjalo", "first_name": "Thomas", "last_name": "Monjalon", "email": "thomas@monjalon.net" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/20230404124840.1898-11-david.marchand@redhat.com/mbox/", "series": [ { "id": 27617, "url": "http://patches.dpdk.org/api/series/27617/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=27617", "date": "2023-04-04T12:48:24", "name": "Enable lock annotations on most libraries and drivers", "version": 3, "mbox": "http://patches.dpdk.org/series/27617/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/125761/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/125761/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 76F05428CD;\n\tTue, 4 Apr 2023 14:49:53 +0200 (CEST)", "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 9C64742D43;\n\tTue, 4 Apr 2023 14:49:28 +0200 (CEST)", "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 6E58440A7E\n for <dev@dpdk.org>; Tue, 4 Apr 2023 14:49:27 +0200 (CEST)", "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-512-MPzBS4m2PACJ-7YRqm0YHQ-1; Tue, 04 Apr 2023 08:49:23 -0400", "from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com\n [10.11.54.4])\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 6B3FC886065;\n Tue, 4 Apr 2023 12:49:23 +0000 (UTC)", "from dmarchan.redhat.com (unknown [10.45.225.38])\n by smtp.corp.redhat.com (Postfix) with ESMTP id A8D492027061;\n Tue, 4 Apr 2023 12:49:22 +0000 (UTC)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1680612567;\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=1qc3+1DPrDMRNKtc5rxqr+4NJR2lVYVoyc4rYt37MMc=;\n b=IKe7Jb4XTJKMYbIjb8lQQNFsj8IRhp2KZqYXC18jp8wdZqKez0LxwUIPPjeDjTLRNZgXMj\n KgUujMwVXv8iEzxPQYGZLMXhw8ElwcA+Lnau7fbslX/5zuLUSs09118cZP+C3odXHBEvY9\n pSLRRMQXiMgWL5mX2hmJTDbP+BME7qw=", "X-MC-Unique": "MPzBS4m2PACJ-7YRqm0YHQ-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 v3 10/16] net/sfc: inherit lock annotations", "Date": "Tue, 4 Apr 2023 14:48:34 +0200", "Message-Id": "<20230404124840.1898-11-david.marchand@redhat.com>", "In-Reply-To": "<20230404124840.1898-1-david.marchand@redhat.com>", "References": "<20230224081642.2566619-1-david.marchand@redhat.com>\n <20230404124840.1898-1-david.marchand@redhat.com>", "MIME-Version": "1.0", "X-Scanned-By": "MIMEDefang 3.1 on 10.11.54.4", "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 919048e278..d4134ec91b 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": [ "v3", "10/16" ] }{ "id": 125761, "url": "