From: Marat Khalili <qm2k21@gmail.com>
To: Konstantin Ananyev <konstantin.v.ananyev@yandex.ru>,
Konstantin Ananyev <konstantin.ananyev@huawei.com>
Cc: dev@dpdk.org, stephen@networkplumber.org
Subject: Re: [PATCH v2 5/9] bpf: simplify callback inuse tracking to boolean flag
Date: Sat, 24 Oct 2026 15:14:49 +0100 [thread overview]
Message-ID: <f4539ddf-2893-4c36-b327-3eadd72ab057@gmail.com> (raw)
In-Reply-To: <8f751b5c-941e-467f-b4d8-6d65e2b0db5b@yandex.ru>
On 19/10/2026 21:50, Konstantin Ananyev wrote:
>> The even/odd usage counter semantics in struct bpf_eth_cbi was
>> originally used to detect when in-flight packet callbacks complete.
>> However, with at most one thread running the callback per port/queue
>> pair and no risk of the ABA problem, a boolean flag (true for in use,
>> false for idle) suffices.
>>
>> Change member use to bool and replace the counter increment in the
>> datapath with stores of true and false. Simplify bpf_eth_cbi_wait()
>> to a direct pause loop waiting until the flag is false, removing the
>> now unnecessary RTE_WAIT_UNTIL_MASKED macro and casts. Update the
>> documentation and synchronization sequence diagram accordingly.
>
> As I explained in previous mail, it is not about even/odd.
> It is about waiting while current 'quiscent' period will end.
> By 'simplifying' that to use just boll values (0/1) you introduce
> a live-lock in CP: it can be blocked for very long time waiting
> while DP thread will keep processing packets.
I do not think this explanation is correct. It was always waiting only
for the next value after the odd one, there are no cases where anything
else happens.
next prev parent reply other threads:[~2026-10-24 14:14 UTC|newest]
Thread overview: 56+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-11 18:21 [PATCH 0/9] bpf: clean up and document ethdev callback synchronization Marat Khalili
2026-10-11 18:21 ` [PATCH 1/9] bpf: document packet callback unload sequence Marat Khalili
2026-10-11 18:21 ` [PATCH 2/9] bpf: document ethdev callback threading limitations Marat Khalili
2026-10-11 18:21 ` [PATCH 3/9] bpf: reject Tx callback installation with MT_LOCKFREE Marat Khalili
2026-10-11 18:21 ` [PATCH 4/9] bpf: add callback flag to skip multi-thread check Marat Khalili
2026-10-11 19:48 ` Stephen Hemminger
2026-10-11 20:12 ` Marat Khalili
2026-10-11 18:21 ` [PATCH 5/9] bpf: remove redundant memory barrier on unload Marat Khalili
2026-10-11 19:50 ` Stephen Hemminger
2026-10-11 20:14 ` Marat Khalili
2026-10-11 18:21 ` [PATCH 6/9] bpf: simplify callback inuse tracking to boolean flag Marat Khalili
2026-10-11 19:51 ` Stephen Hemminger
2026-10-11 20:17 ` Marat Khalili
2026-10-11 18:21 ` [PATCH 7/9] bpf: reformat packet callback unload diagram Marat Khalili
2026-10-11 18:21 ` [PATCH 8/9] bpf: use relaxed stores for callback inuse tracking Marat Khalili
2026-10-11 19:52 ` Stephen Hemminger
2026-10-11 20:24 ` Marat Khalili
2026-10-11 18:21 ` [PATCH 9/9] bpf: make callback handle atomic with relaxed access Marat Khalili
2026-10-11 19:54 ` Stephen Hemminger
2026-10-11 20:31 ` Marat Khalili
2026-10-11 20:29 ` [RFC] bpf: fix callback unload with concurrent Tx burst Stephen Hemminger
2026-10-12 21:09 ` [PATCH v2 0/9] bpf: clean up and document ethdev callback synchronization Marat Khalili
2026-10-12 21:09 ` [PATCH v2 1/9] bpf: document packet callback unload sequence Marat Khalili
2026-10-19 20:44 ` Konstantin Ananyev
2026-10-12 21:09 ` [PATCH v2 2/9] bpf: document ethdev callback threading limitations Marat Khalili
2026-10-12 21:44 ` Stephen Hemminger
2026-10-19 21:10 ` Konstantin Ananyev
2026-10-19 23:35 ` Stephen Hemminger
2026-10-20 6:54 ` Konstantin Ananyev
2026-10-24 14:10 ` Marat Khalili
2026-10-24 20:47 ` Stephen Hemminger
2026-10-25 7:50 ` Konstantin Ananyev
2026-10-12 21:09 ` [PATCH v2 3/9] bpf: reject Tx callback installation with MT_LOCKFREE Marat Khalili
2026-10-19 21:22 ` Konstantin Ananyev
2026-10-19 23:36 ` Stephen Hemminger
2026-10-12 21:09 ` [PATCH v2 4/9] bpf: remove redundant memory barrier on unload Marat Khalili
2026-10-12 21:09 ` [PATCH v2 5/9] bpf: simplify callback inuse tracking to boolean flag Marat Khalili
2026-10-19 20:50 ` Konstantin Ananyev
2026-10-24 14:14 ` Marat Khalili [this message]
2026-10-25 7:40 ` Konstantin Ananyev
2026-10-25 10:24 ` Marat Khalili
2026-10-25 10:50 ` Konstantin Ananyev
2026-10-25 11:00 ` Marat Khalili
2026-10-25 12:38 ` Konstantin Ananyev
2026-10-12 21:09 ` [PATCH v2 6/9] bpf: reformat packet callback unload diagram Marat Khalili
2026-10-12 21:09 ` [PATCH v2 7/9] bpf: use relaxed accesses for callback inuse tracking Marat Khalili
2026-10-12 21:09 ` [PATCH v2 8/9] bpf: make callback handle atomic with relaxed access Marat Khalili
2026-10-19 21:27 ` Konstantin Ananyev
2026-10-24 14:24 ` Marat Khalili
2026-10-25 7:44 ` Konstantin Ananyev
2026-10-25 10:14 ` Marat Khalili
2026-10-25 10:53 ` Konstantin Ananyev
2026-10-25 10:57 ` Marat Khalili
2026-10-25 12:40 ` Konstantin Ananyev
2026-10-12 21:09 ` [PATCH v2 9/9] bpf: add callback flag to skip multi-thread check Marat Khalili
2026-10-13 16:55 ` Stephen Hemminger
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=f4539ddf-2893-4c36-b327-3eadd72ab057@gmail.com \
--to=qm2k21@gmail.com \
--cc=dev@dpdk.org \
--cc=konstantin.ananyev@huawei.com \
--cc=konstantin.v.ananyev@yandex.ru \
--cc=stephen@networkplumber.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox