[PATCH v2 1/4] bitops: fix build for GCC without experimental API
David Marchand
david.marchand at redhat.com
Wed Oct 16 13:38:13 CEST 2024
Building OVS against current DPDK fails with following warnings:
In file included from .../ovs/dpdk-dir/include/rte_memory.h:18,
from .../ovs/dpdk-dir/include/rte_ring_core.h:29,
from .../ovs/dpdk-dir/include/rte_ring.h:37,
from .../ovs/dpdk-dir/include/rte_mempool.h:49,
from .../ovs/dpdk-dir/include/rte_mbuf.h:38,
from lib/dp-packet.h:25,
from lib/ofp-packet.c:20:
.../ovs/dpdk-dir/include/rte_bitops.h: In function ‘__rte_bit_assign32’:
.../ovs/dpdk-dir/include/rte_bitops.h:528:1: error:
‘__rte_bit_set32’ is deprecated: Symbol is not yet part of
stable ABI [-Werror=deprecated-declarations]
...
This comes from the fact that some (experimental) inline helpers
are calling other experimental API.
Hide those calls.
Fixes: 471de107ae23 ("bitops: add new bit manipulation API")
Reported-by: Kevin Traynor <ktraynor at redhat.com>
Signed-off-by: David Marchand <david.marchand at redhat.com>
Acked-by: Morten Brørup <mb at smartsharesystems.com>
---
lib/eal/include/rte_bitops.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/lib/eal/include/rte_bitops.h b/lib/eal/include/rte_bitops.h
index e08e41199a..deb1fd43f2 100644
--- a/lib/eal/include/rte_bitops.h
+++ b/lib/eal/include/rte_bitops.h
@@ -525,8 +525,10 @@ __rte_bit_ ## variant ## flip ## size(qualifier uint ## size ## _t *addr, unsign
__RTE_GEN_BIT_OPS(,, size) \
__RTE_GEN_BIT_OPS(v_, volatile, size)
+#ifdef ALLOW_EXPERIMENTAL_API
__RTE_GEN_BIT_OPS_SIZE(32)
__RTE_GEN_BIT_OPS_SIZE(64)
+#endif
#define __RTE_GEN_BIT_ATOMIC_TEST(variant, qualifier, size) \
__rte_experimental \
@@ -651,8 +653,10 @@ __rte_bit_atomic_ ## variant ## test_and_assign ## size( \
__RTE_GEN_BIT_ATOMIC_OPS(,, size) \
__RTE_GEN_BIT_ATOMIC_OPS(v_, volatile, size)
+#ifdef ALLOW_EXPERIMENTAL_API
__RTE_GEN_BIT_ATOMIC_OPS_SIZE(32)
__RTE_GEN_BIT_ATOMIC_OPS_SIZE(64)
+#endif
/*------------------------ 32-bit relaxed operations ------------------------*/
@@ -1481,6 +1485,7 @@ rte_bit_ ## family ## fun(qualifier uint ## size ## _t *addr, arg1_type arg1_nam
__RTE_BIT_OVERLOAD_SZ_4R(family, fun, qualifier, 64, ret_type, arg1_type, arg1_name, \
arg2_type, arg2_name, arg3_type, arg3_name)
+#ifdef ALLOW_EXPERIMENTAL_API
__RTE_BIT_OVERLOAD_2R(, test, const, bool, unsigned int, nr)
__RTE_BIT_OVERLOAD_2(, set,, unsigned int, nr)
__RTE_BIT_OVERLOAD_2(, clear,, unsigned int, nr)
@@ -1496,6 +1501,7 @@ __RTE_BIT_OVERLOAD_3R(atomic_, test_and_set,, bool, unsigned int, nr, int, memor
__RTE_BIT_OVERLOAD_3R(atomic_, test_and_clear,, bool, unsigned int, nr, int, memory_order)
__RTE_BIT_OVERLOAD_4R(atomic_, test_and_assign,, bool, unsigned int, nr, bool, value,
int, memory_order)
+#endif
#endif
--
2.46.2
More information about the dev
mailing list