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 3067545E08; Mon, 2 Dec 2024 17:58:07 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C2B5E40270; Mon, 2 Dec 2024 17:58:06 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 791414025D for ; Mon, 2 Dec 2024 17:58:05 +0100 (CET) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 4B2ATBqJ014518 for ; Mon, 2 Dec 2024 08:58:04 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=pfpt0220; bh=0 Pg4MwDlV90QT4IkWbA9/OXpuNdMmBbkb5UAmc+F+ro=; b=KH9HurAaXutk5NfjF 4iunzLfGSobC0uz8VyhjHOhj1erQewTAmK4hhB401G22y37UgQ9lW3MQARPej90i Wntr50ORIrsn5TQk60NA8dmBXUeMqtKv57J+WWuulB19D2cJa/KAi+pJbwt4jMzG ueqVjZLKEhsOXrsKd9Hfjpcum/LlS5AnQfNDcUmjvfnkqxm6MgUXZFEPE4kBLMmX dxOOCuJGrn3UvG27msSkv+l/NkpMSem4XZmp3Entp0LdjL0cCuGIPbxFBG6+rH2l dmd0zPu/inqUY4eF7LPPPo0wZIZ6RXBqaAcjRpQDdbDlB8C5BEU19CAKBW62dBLx C+j4Q== Received: from dc6wp-exch02.marvell.com ([4.21.29.225]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 439agjgsvh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 02 Dec 2024 08:58:03 -0800 (PST) Received: from DC6WP-EXCH02.marvell.com (10.76.176.209) by DC6WP-EXCH02.marvell.com (10.76.176.209) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Mon, 2 Dec 2024 08:58:02 -0800 Received: from maili.marvell.com (10.69.176.80) by DC6WP-EXCH02.marvell.com (10.76.176.209) with Microsoft SMTP Server id 15.2.1544.4 via Frontend Transport; Mon, 2 Dec 2024 08:58:02 -0800 Received: from cavium-DT-30.. (unknown [10.28.36.108]) by maili.marvell.com (Postfix) with ESMTP id 15B2B3F706B; Mon, 2 Dec 2024 08:57:47 -0800 (PST) From: Nawal Kishor To: , Nithin Dabilpuram , Kiran Kumar K , Sunil Kumar Kori , Satha Rao , Harman Kalra , "Ashwin Sekhar T K" , Jerin Jacob CC: Nawal Kishor Subject: [PATCH v2] common/cnxk: fix atomic load in batch ops Date: Mon, 2 Dec 2024 22:27:39 +0530 Message-ID: <20241202165739.1896876-1-nkishor@marvell.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240823065104.2254919-1-nkishor@marvell.com> References: <20240823065104.2254919-1-nkishor@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-GUID: znUh6K8xwjIu5tNM4tdurcj1duglfc9- X-Proofpoint-ORIG-GUID: znUh6K8xwjIu5tNM4tdurcj1duglfc9- X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.60.29 definitions=2024-09-06_09,2024-09-06_01,2024-09-02_01 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 In roc batch alloc wait code, __ATOMIC_RELAXED is changed to __ATOMIC_ACQUIRE in order to avoid potential out of order loads. Fixes: 50d08d3934ec ("common/cnxk: fix batch alloc completion poll logic") Signed-off-by: Nawal Kishor --- v2: Fixed review comments drivers/common/cnxk/roc_npa.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/common/cnxk/roc_npa.h b/drivers/common/cnxk/roc_npa.h index f7cb4460e7..8525038810 100644 --- a/drivers/common/cnxk/roc_npa.h +++ b/drivers/common/cnxk/roc_npa.h @@ -255,7 +255,7 @@ roc_npa_batch_alloc_wait(uint64_t *cache_line, unsigned int wait_us) /* Batch alloc status code is updated in bits [5:6] of the first word * of the 128 byte cache line. */ - while (((__atomic_load_n(cache_line, __ATOMIC_RELAXED) >> 5) & 0x3) == + while (((__atomic_load_n(cache_line, __ATOMIC_ACQUIRE) >> 5) & 0x3) == ALLOC_CCODE_INVAL) if (wait_us && (plt_tsc_cycles() - start) >= ticks) break; -- 2.34.1