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 986E5428CD; Tue, 4 Apr 2023 14:49:39 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7792342D35; Tue, 4 Apr 2023 14:49:21 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id A1FAF42D33 for ; Tue, 4 Apr 2023 14:49:19 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1680612559; 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=UWJfb+3aQQrRzRxS4nxjHkV05O/I7utrsuNQe+4sVz8=; b=G+VcZMuHEatT698UzZ6dyskiuQ2bB+TLVQs4ZhQ5wZXSWEfUJ+r59+h8F2nyBF0EG9xLE+ lJT0vp57nSy8Kchviqi7TdsEChzs3pdWylC4eVszDTsj0+OkRyT4dsKfMch1SmdFGa21AJ JINynOyPyOkl6tEBvTht6KlMvhTBYhg= 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-73-_PKAz_lWOOeUWDYinVoh9A-1; Tue, 04 Apr 2023 08:49:18 -0400 X-MC-Unique: _PKAz_lWOOeUWDYinVoh9A-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 A00501C08799; Tue, 4 Apr 2023 12:49:17 +0000 (UTC) Received: from dmarchan.redhat.com (unknown [10.45.225.38]) by smtp.corp.redhat.com (Postfix) with ESMTP id B96D81121315; Tue, 4 Apr 2023 12:49:16 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: thomas@monjalon.net, Qi Zhang , Xiao Wang Subject: [PATCH v3 08/16] net/fm10k: annotate mailbox lock Date: Tue, 4 Apr 2023 14:48:32 +0200 Message-Id: <20230404124840.1898-9-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 Expose requirements for helpers dealing with the FM10K_DEV_PRIVATE_TO_MBXLOCK(hw->back) lock. Signed-off-by: David Marchand --- drivers/net/fm10k/fm10k_ethdev.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c index 8b83063f0a..4d3c4c10cf 100644 --- a/drivers/net/fm10k/fm10k_ethdev.c +++ b/drivers/net/fm10k/fm10k_ethdev.c @@ -116,6 +116,7 @@ fm10k_mbx_initlock(struct fm10k_hw *hw) static void fm10k_mbx_lock(struct fm10k_hw *hw) + __rte_exclusive_lock_function(FM10K_DEV_PRIVATE_TO_MBXLOCK(hw->back)) { while (!rte_spinlock_trylock(FM10K_DEV_PRIVATE_TO_MBXLOCK(hw->back))) rte_delay_us(FM10K_MBXLOCK_DELAY_US); @@ -123,6 +124,7 @@ fm10k_mbx_lock(struct fm10k_hw *hw) static void fm10k_mbx_unlock(struct fm10k_hw *hw) + __rte_unlock_function(FM10K_DEV_PRIVATE_TO_MBXLOCK(hw->back)) { rte_spinlock_unlock(FM10K_DEV_PRIVATE_TO_MBXLOCK(hw->back)); } -- 2.39.2