From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id D873F428CD; Tue, 4 Apr 2023 14:49:33 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 646B142D13; Tue, 4 Apr 2023 14:49:20 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id D1B2840A7E for ; Tue, 4 Apr 2023 14:49:18 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1680612558; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+QC5N7fdw2YpcSZdVy5nwVTTnJpJG+iHrtpsW8GzoNI=; b=Nyf1Ps/pHjwLVS7h2bniO9KiapB/3eXOuzjlA6XcLglKpoTm7E0aL9SZC5bv7ZkR/7ViM4 4yxskpXMMt/OTAK7qZTz/f3aitgbTokfSg7BaDrE/hl8+DV6ZljNnjtmKThU9GDQUpC1J/ UUebOVSeYK/iUMLiNuOO7YKqifMFj3I= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-10-i4bl3ijCM7Gq1vrcVdOwMg-1; Tue, 04 Apr 2023 08:49:15 -0400 X-MC-Unique: i4bl3ijCM7Gq1vrcVdOwMg-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A06A11C0879A; Tue, 4 Apr 2023 12:49:14 +0000 (UTC) Received: from dmarchan.redhat.com (unknown [10.45.225.38]) by smtp.corp.redhat.com (Postfix) with ESMTP id D15481121319; Tue, 4 Apr 2023 12:49:13 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: thomas@monjalon.net, Rahul Lakkireddy Subject: [PATCH v3 07/16] net/cxgbe: inherit lock annotations Date: Tue, 4 Apr 2023 14:48:31 +0200 Message-Id: <20230404124840.1898-8-david.marchand@redhat.com> In-Reply-To: <20230404124840.1898-1-david.marchand@redhat.com> References: <20230224081642.2566619-1-david.marchand@redhat.com> <20230404124840.1898-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-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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Due to clang limitation, inline helpers don't inherit lock annotations from the EAL lock API. Replace them with macros. Signed-off-by: David Marchand --- drivers/net/cxgbe/base/adapter.h | 35 +++++++------------------------- 1 file changed, 7 insertions(+), 28 deletions(-) diff --git a/drivers/net/cxgbe/base/adapter.h b/drivers/net/cxgbe/base/adapter.h index 16cbc1a345..8f2ffa0eeb 100644 --- a/drivers/net/cxgbe/base/adapter.h +++ b/drivers/net/cxgbe/base/adapter.h @@ -351,28 +351,19 @@ struct adapter { * t4_os_rwlock_init - initialize rwlock * @lock: the rwlock */ -static inline void t4_os_rwlock_init(rte_rwlock_t *lock) -{ - rte_rwlock_init(lock); -} +#define t4_os_rwlock_init(lock) rte_rwlock_init(lock) /** * t4_os_write_lock - get a write lock * @lock: the rwlock */ -static inline void t4_os_write_lock(rte_rwlock_t *lock) -{ - rte_rwlock_write_lock(lock); -} +#define t4_os_write_lock(lock) rte_rwlock_write_lock(lock) /** * t4_os_write_unlock - unlock a write lock * @lock: the rwlock */ -static inline void t4_os_write_unlock(rte_rwlock_t *lock) -{ - rte_rwlock_write_unlock(lock); -} +#define t4_os_write_unlock(lock) rte_rwlock_write_unlock(lock) /** * ethdev2pinfo - return the port_info structure associated with a rte_eth_dev @@ -678,37 +669,25 @@ static inline void t4_os_set_hw_addr(struct adapter *adapter, int port_idx, * t4_os_lock_init - initialize spinlock * @lock: the spinlock */ -static inline void t4_os_lock_init(rte_spinlock_t *lock) -{ - rte_spinlock_init(lock); -} +#define t4_os_lock_init(lock) rte_spinlock_init(lock) /** * t4_os_lock - spin until lock is acquired * @lock: the spinlock */ -static inline void t4_os_lock(rte_spinlock_t *lock) -{ - rte_spinlock_lock(lock); -} +#define t4_os_lock(lock) rte_spinlock_lock(lock) /** * t4_os_unlock - unlock a spinlock * @lock: the spinlock */ -static inline void t4_os_unlock(rte_spinlock_t *lock) -{ - rte_spinlock_unlock(lock); -} +#define t4_os_unlock(lock) rte_spinlock_unlock(lock) /** * t4_os_trylock - try to get a lock * @lock: the spinlock */ -static inline int t4_os_trylock(rte_spinlock_t *lock) -{ - return rte_spinlock_trylock(lock); -} +#define t4_os_trylock(lock) rte_spinlock_trylock(lock) /** * t4_os_init_list_head - initialize -- 2.39.2