[PATCH 8/9] bpf: use relaxed stores for callback inuse tracking

Stephen Hemminger stephen at networkplumber.org
Sun Oct 11 21:52:56 CEST 2026


On Sun, 11 Oct 2026 18:21:56 +0000
Marat Khalili <qm2k21 at gmail.com> wrote:

> Direct assignment to an atomic variable defaults to sequentially
> consistent memory order in C11. Since cross-thread memory ordering
> for packet callback execution and unload is already explicitly
> enforced by memory barriers, sequentially consistent stores are
> unnecessary and may emit redundant barrier instructions on weakly
> ordered architectures.
> 
> Update bpf_eth_cbi_inuse() and bpf_eth_cbi_unuse() to use
> rte_atomic_store_explicit() with rte_memory_order_relaxed, matching
> the relaxed loads already used in bpf_eth_cbi_wait().
> 
> Signed-off-by: Marat Khalili <qm2k21 at gmail.com>
> ---

Already covered by smb_mb conversion patch.

If you want, can just make that into one patch which does
the conversion to bool and gets rid of smp_mb.


More information about the dev mailing list