[PATCH v1 68/73] net/ntnic: add aged flow event
Stephen Hemminger
stephen at networkplumber.org
Tue Oct 22 01:22:33 CEST 2024
On Mon, 21 Oct 2024 23:05:10 +0200
Serhii Iliushyk <sil-plv at napatech.com> wrote:
> From: Danylo Vodopianov <dvo-plv at napatech.com>
>
> Port thread was extended with new age event callback handler.
> LRN, INF, STA registers getter setter was added.
>
> Signed-off-by: Danylo Vodopianov <dvo-plv at napatech.com>
> ---
This patch and other parts of the flow API have problems if built
with stdatomic and Clang. It is missing use of RTE_ATOMIC()
../drivers/net/ntnic/nthw/flow_api/profile_inline/flm_age_queue.c:20:9: error: address argument to atomic operation must be a pointer to _Atomic type ('uint16_t *' (aka 'unsigned short *') invalid)
return rte_atomic_load_explicit(&age_event[port], rte_memory_order_seq_cst);
^ ~~~~~~~~~~~~~~~~
../lib/eal/include/rte_stdatomic.h:69:2: note: expanded from macro 'rte_atomic_load_explicit'
atomic_load_explicit(ptr, memorder)
^ ~~~
/usr/lib/llvm-16/lib/clang/16/include/stdatomic.h:134:30: note: expanded from macro 'atomic_load_explicit'
#define atomic_load_explicit __c11_atomic_load
^
../drivers/net/ntnic/nthw/flow_api/profile_inline/flm_age_queue.c:25:2: error: address argument to atomic operation must be a pointer to _Atomic type ('uint16_t *' (aka 'unsigned short *') invalid)
rte_atomic_store_explicit(&age_event[port], 1, rte_memory_order_seq_cst);
^ ~~~~~~~~~~~~~~~~
../lib/eal/include/rte_stdatomic.h:72:2: note: expanded from macro 'rte_atomic_store_explicit'
atomic_store_explicit(ptr, val, memorder)
^ ~~~
/usr/lib/llvm-16/lib/clang/16/include/stdatomic.h:131:31: note: expanded from macro 'atomic_store_explicit'
#define atomic_store_explicit __c11_atomic_store
^
../drivers/net/ntnic/nthw/flow_api/profile_inline/flm_age_queue.c:30:2: error: member reference base type 'uint16_t' (aka 'unsigned short') is not a structure or union
rte_atomic_flag_clear_explicit(&age_event[port], rte_memory_order_seq_cst);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../lib/eal/include/rte_stdatomic.h:109:2: note: expanded from macro 'rte_atomic_flag_clear_explicit'
atomic_flag_clear_explicit(ptr, memorder)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/llvm-16/lib/clang/16/include/stdatomic.h:181:79: note: expanded from macro 'atomic_flag_clear_explicit'
#define atomic_flag_clear_explicit(object, order) __c11_atomic_store(&(object)->_Value, 0, order)
~~~~~~~~^ ~~~~~~
../drivers/net/ntnic/nthw/flow_api/profile_inline/flm_age_queue.c:38:3: error: member reference base type 'uint16_t' (aka 'unsigned short') is not a structure or union
rte_atomic_flag_clear_explicit(&age_event[port], rte_memory_order_seq_cst);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../lib/eal/include/rte_stdatomic.h:109:2: note: expanded from macro 'rte_atomic_flag_clear_explicit'
atomic_flag_clear_explicit(ptr, memorder)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/llvm-16/lib/clang/16/include/stdatomic.h:181:79: note: expanded from macro 'atomic_flag_clear_explicit'
#define atomic_flag_clear_explicit(object, order) __c11_atomic_store(&(object)->_Value, 0, order)
~~~~~~~~^ ~~~~~~
../drivers/net/ntnic/nthw/flow_api/profile_inline/flm_age_queue.c:82:2: error: member reference base type 'uint16_t' (aka 'unsigned short') is not a structure or union
rte_atomic_flag_clear_explicit(&age_event[port], rte_memory_order_seq_cst);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../lib/eal/include/rte_stdatomic.h:109:2: note: expanded from macro 'rte_atomic_flag_clear_explicit'
atomic_flag_clear_explicit(ptr, memorder)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/llvm-16/lib/clang/16/include/stdatomic.h:181:79: note: expanded from macro 'atomic_flag_clear_explicit'
#define atomic_flag_clear_explicit(object, order) __c11_atomic_store(&(object)->_Value, 0, order)
More information about the dev
mailing list