[PATCH v2 4/4] net/hns3: use stdatomic API
Jie Hai
haijie1 at huawei.com
Fri Dec 8 08:08:13 CET 2023
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 <haijie1 at huawei.com>
>>
>
> <...>
>
>> 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
>
> .
More information about the dev
mailing list