Message ID | 20240312210308.8788-1-stephen@networkplumber.org (mailing list archive) |
---|---|
State | Rejected |
Delegated to: | Thomas Monjalon |
Headers | |
Series | [RFC] eal: add rte_counted_by attribute | |
Checks
Context | Check | Description |
---|---|---|
ci/checkpatch | warning | coding style issues |
ci/loongarch-compilation | success | Compilation OK |
ci/loongarch-unit-testing | success | Unit Testing PASS |
ci/Intel-compilation | success | Compilation OK |
ci/intel-Testing | success | Testing PASS |
ci/intel-Functional | success | Functional PASS |
ci/github-robot: build | fail | github build: failed |
ci/iol-intel-Performance | success | Performance Testing PASS |
ci/iol-intel-Functional | success | Functional Testing PASS |
ci/iol-mellanox-Performance | success | Performance Testing PASS |
ci/iol-abi-testing | success | Testing PASS |
ci/iol-unit-arm64-testing | success | Testing PASS |
ci/iol-compile-arm64-testing | success | Testing PASS |
ci/iol-unit-amd64-testing | success | Testing PASS |
ci/iol-compile-amd64-testing | success | Testing PASS |
ci/iol-sample-apps-testing | success | Testing PASS |
ci/iol-broadcom-Performance | success | Performance Testing PASS |
ci/iol-broadcom-Functional | success | Functional Testing PASS |
Commit Message
diff --git a/lib/eal/include/rte_compat.h b/lib/eal/include/rte_compat.h index 716bc0361640..6bf6b0baaccf 100644 --- a/lib/eal/include/rte_compat.h +++ b/lib/eal/include/rte_compat.h @@ -68,6 +68,16 @@ _Pragma("GCC diagnostic pop") __attribute__((section(".text.internal"))) #endif +/* + * Used to by ASAN bounds checker for flexible arrays + * Supported by Gcc >= 14 and clang >=18 + */ +#if __has_attribute(__element_count__) +# define __rte_counted_by(member) __attribute__((__element_count__(member))) +#else +# define __rte_counted_by(member) +#endif + #endif #ifdef __cplusplus