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 CB08F436A6; Fri, 8 Dec 2023 08:08:22 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 978F242F04; Fri, 8 Dec 2023 08:08:22 +0100 (CET) Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by mails.dpdk.org (Postfix) with ESMTP id E7BB342E8D for ; Fri, 8 Dec 2023 08:08:20 +0100 (CET) Received: from kwepemd100004.china.huawei.com (unknown [172.30.72.57]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4SmhzT4Dd8zYsp5; Fri, 8 Dec 2023 15:07:33 +0800 (CST) Received: from [10.67.121.175] (10.67.121.175) by kwepemd100004.china.huawei.com (7.221.188.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.2.1258.28; Fri, 8 Dec 2023 15:08:14 +0800 Message-ID: <6ad4ec63-bd4a-9416-7500-700e759965bf@huawei.com> Date: Fri, 8 Dec 2023 15:08:13 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: [PATCH v2 4/4] net/hns3: use stdatomic API To: Ferruh Yigit , , Yisen Zhuang CC: , , References: <20231111015915.2776769-1-haijie1@huawei.com> <20231207014205.4002558-1-haijie1@huawei.com> <20231207014205.4002558-5-haijie1@huawei.com> From: Jie Hai In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.67.121.175] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To kwepemd100004.china.huawei.com (7.221.188.31) X-CFilter-Loop: Reflected 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 On 2023/12/7 21:57, Ferruh Yigit wrote: > On 12/7/2023 1:42 AM, Jie Hai wrote: >> Replace the use of gcc builtin __atomic_xxx intrinsics with >> corresponding rte_atomic_xxx optional stdatomic API. >> >> Signed-off-by: Jie Hai >> > > <...> > >> static void >> @@ -643,8 +643,8 @@ hns3vf_get_push_lsc_cap(struct hns3_hw *hw) >> uint16_t exp = HNS3_PF_PUSH_LSC_CAP_UNKNOWN; >> struct hns3_vf *vf = HNS3_DEV_HW_TO_VF(hw); >> >> - __atomic_store_n(&vf->pf_push_lsc_cap, HNS3_PF_PUSH_LSC_CAP_UNKNOWN, >> - __ATOMIC_RELEASE); >> + rte_atomic_load_explicit(&vf->pf_push_lsc_cap, >> + HNS3_PF_PUSH_LSC_CAP_UNKNOWN, rte_memory_order_release); >> > > I guess intension here is to use 'rte_atomic_store_explicit()', current > code cause a build error [1]. > > [1] > https://mails.dpdk.org/archives/test-report/2023-December/525759.html > > Hi, Ferruh, Thank, It's my mistake to use 'rte_atomic_load_explicit', will fix it. Best regards, Jie Hai > > .