From: Ferruh Yigit <ferruh.yigit@amd.com>
To: Jie Hai <haijie1@huawei.com>,
dev@dpdk.org, Yisen Zhuang <yisen.zhuang@huawei.com>
Cc: lihuisong@huawei.com, fengchengwen@huawei.com, liudongdong3@huawei.com
Subject: Re: [PATCH v2 4/4] net/hns3: use stdatomic API
Date: Fri, 8 Dec 2023 09:54:12 +0000 [thread overview]
Message-ID: <a901eeef-153a-4a81-8474-9d23363cdca2@amd.com> (raw)
In-Reply-To: <a4e2a163-0e79-1d88-d59b-11f81d53a082@huawei.com>
On 12/8/2023 7:24 AM, Jie Hai wrote:
> On 2023/12/8 1:42, Ferruh Yigit wrote:
>> On 12/7/2023 1:57 PM, 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@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
>>>
>>>
>> Another build error is when stdatomic enabled [2].
>>
>> [2]
>> meson setup --werror -Denable_stdatomic=true build && ninja -C build
>>
>>
> Hi,Ferruh,
>
> Thanks, and I will fix it.
>
> Since both the following two patches[1][2](in different patchsets) uses
> __atomic_XXX,
> I will keep using __atomic_XX in the patches first.
> After the two patches are accepted, resend the fixed patch[3]
> and change all __atomic_XX to rte_atomic_XXX.
>
ack
> [1][PATCH] net/hns3: fix VF multiple count on one reset
> [2][PATCH] net/hns3: refactor handle mailbox function
> [3][PATCH] net/hns3: use stdatomic API
>
> Best regards,
> Jie Hai
next prev parent reply other threads:[~2023-12-08 9:54 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-11 1:59 [PATCH 0/2] net/hns3: fix mailbox bug and replace __atomic_xxx API Jie Hai
2023-11-11 1:59 ` [PATCH 1/2] net/hns3: fix sync mailbox failure forever Jie Hai
2023-11-11 3:21 ` lihuisong (C)
2023-11-11 5:20 ` Ferruh Yigit
2023-11-11 1:59 ` [PATCH 2/2] net/hns3: use stdatomic API Jie Hai
2023-11-11 3:20 ` lihuisong (C)
2023-11-11 5:22 ` [PATCH 0/2] net/hns3: fix mailbox bug and replace __atomic_xxx API Ferruh Yigit
2023-12-07 1:42 ` [PATCH v2 0/4] net/hns3: bugfix on reset and stdatomic API Jie Hai
2023-12-07 1:42 ` [PATCH v2 1/4] net/hns3: fix VF multiple count on one reset Jie Hai
2023-12-07 1:42 ` [PATCH v2 2/4] net/hns3: fix disable command with firmware Jie Hai
2023-12-07 1:42 ` [PATCH v2 3/4] net/hns3: fix incorrect reset level comparison Jie Hai
2023-12-07 1:42 ` [PATCH v2 4/4] net/hns3: use stdatomic API Jie Hai
2023-12-07 13:57 ` Ferruh Yigit
2023-12-07 17:42 ` Ferruh Yigit
2023-12-08 7:24 ` Jie Hai
2023-12-08 9:54 ` Ferruh Yigit [this message]
2023-12-08 7:08 ` Jie Hai
2023-12-07 13:57 ` Ferruh Yigit
2023-12-08 7:44 ` [PATCH v3 0/3] net/hns3: bugfix on reset Jie Hai
2023-12-08 7:44 ` [PATCH v3 1/3] net/hns3: fix VF multiple count on one reset Jie Hai
2023-12-08 7:44 ` [PATCH v3 2/3] net/hns3: fix disable command with firmware Jie Hai
2023-12-08 7:44 ` [PATCH v3 3/3] net/hns3: fix incorrect reset level comparison Jie Hai
2023-12-08 12:31 ` [PATCH v3 0/3] net/hns3: bugfix on reset Ferruh Yigit
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a901eeef-153a-4a81-8474-9d23363cdca2@amd.com \
--to=ferruh.yigit@amd.com \
--cc=dev@dpdk.org \
--cc=fengchengwen@huawei.com \
--cc=haijie1@huawei.com \
--cc=lihuisong@huawei.com \
--cc=liudongdong3@huawei.com \
--cc=yisen.zhuang@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.