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 19C3F41D5D; Fri, 24 Feb 2023 09:17:48 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7595642D29; Fri, 24 Feb 2023 09:17:21 +0100 (CET) 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 6D04D41611 for ; Fri, 24 Feb 2023 09:17:20 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1677226640; 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=EVFPrv4m5PsmY2v777bqJTenKOM3m1+GvPnQkif0Sy5JFqrNi7bAsMoO3SslCihjdSchR6 uaXliGycQCOjeF59ixq2anHZqAMvZOBxAd6n2ysAUD8v+pRVBUai55y1bJWTj99B9pHSMn 3stvWAqj/auyjeQfyrgpaSfdJPGMtD4= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-140-fFWbbh-cN3qLdSlcFIUi1A-1; Fri, 24 Feb 2023 03:17:16 -0500 X-MC-Unique: fFWbbh-cN3qLdSlcFIUi1A-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 1C3511875043; Fri, 24 Feb 2023 08:17:16 +0000 (UTC) Received: from dmarchan.redhat.com (unknown [10.45.224.55]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3A0FF2166B29; Fri, 24 Feb 2023 08:17:15 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: thomas@monjalon.net, Qi Zhang , Xiao Wang Subject: [PATCH 08/14] net/fm10k: annotate mailbox lock Date: Fri, 24 Feb 2023 09:16:36 +0100 Message-Id: <20230224081642.2566619-9-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.6 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