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 39CFF45843; Fri, 23 Aug 2024 08:51:17 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C47024025E; Fri, 23 Aug 2024 08:51:16 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 9C5D240150 for ; Fri, 23 Aug 2024 08:51:14 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 47MLM8iZ016873; Thu, 22 Aug 2024 23:51:13 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h= cc:content-transfer-encoding:content-type:date:from:message-id :mime-version:subject:to; s=pfpt0220; bh=V3O3PudnKJyCeIwrc/tDJm0 cNNuINkvjd7W2FlK48gU=; b=AbJDv4O3HNl3SpGmAnnZ/3KeEOkJULR1hts5/Q+ EbZT4aEbl7QWb7V1toBKxSTND723/GcMj0XwN86wRlyXZdjcPxrr5/cCupwYN01T DKoVq2YSJZD6l7TdNHpf6RUVeo1eIM0fLw17NuBMBCgwKNcxVOWb4pjXos7cAaFz 5puYs+ByyTq97LZUmSRW4zWB/mSt6ZNCgFPRXrGp6J8GpbDAM/0z8lxtEtt/WYu2 k1WXM+MHHOHE3ESHlEPdcQq+DORUFXvzZ2QViPvobuizlYfrZQf5asbVvQP3B97Z Jzkf3eSGgIrnKR01gVIjcqrc2cNF/brM5cRKha2jRsR3ITg== Received: from dc5-exch05.marvell.com ([199.233.59.128]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 41650uv5w7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 22 Aug 2024 23:51:12 -0700 (PDT) Received: from DC5-EXCH05.marvell.com (10.69.176.209) by DC5-EXCH05.marvell.com (10.69.176.209) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Thu, 22 Aug 2024 23:51:11 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH05.marvell.com (10.69.176.209) with Microsoft SMTP Server id 15.2.1544.4 via Frontend Transport; Thu, 22 Aug 2024 23:51:11 -0700 Received: from cavium-DT-30.. (unknown [10.28.36.108]) by maili.marvell.com (Postfix) with ESMTP id EB3723F7078; Thu, 22 Aug 2024 23:51:07 -0700 (PDT) From: Nawal Kishor To: , Thomas Monjalon , Nithin Dabilpuram , Kiran Kumar K , "Sunil Kumar Kori" , Satha Rao , "Harman Kalra" CC: , , Nawal Kishor Subject: [PATCH] common/cnxk: use atomic load acquire in batch ops Date: Fri, 23 Aug 2024 12:21:04 +0530 Message-ID: <20240823065104.2254919-1-nkishor@marvell.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-GUID: feuoxT-xBPy-7ZQwWVos-4Rj7Q2TCtUc X-Proofpoint-ORIG-GUID: feuoxT-xBPy-7ZQwWVos-4Rj7Q2TCtUc X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.28.16 definitions=2024-08-23_04,2024-08-22_01,2024-05-17_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. Signed-off-by: Nawal Kishor --- .mailmap | 1 + drivers/common/cnxk/roc_npa.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.mailmap b/.mailmap index 4a508bafad..14226ccd2d 100644 --- a/.mailmap +++ b/.mailmap @@ -1046,6 +1046,7 @@ Natanael Copa Nathan Brown Nathan Law Nathan Skrzypczak +Nawal Kishor Neel Patel Neil Horman Nelio Laranjeiro diff --git a/drivers/common/cnxk/roc_npa.h b/drivers/common/cnxk/roc_npa.h index 4ad5f044b5..ebc2a62536 100644 --- a/drivers/common/cnxk/roc_npa.h +++ b/drivers/common/cnxk/roc_npa.h @@ -247,7 +247,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