On 2024-10-16 17:36, David Marchand wrote:
On Wed, Oct 16, 2024 at 4:14 PM Mattias Rönnblom <hof...@lysator.liu.se> wrote:

On 2024-10-16 13:38, David Marchand wrote:
For a reason similar to the change on bitops header, hide bitset
implementation relying on experimental API.

Fixes: 99a1197647d8 ("eal: add bitset type")

Signed-off-by: David Marchand <david.march...@redhat.com>
Acked-by: Morten Brørup <m...@smartsharesystems.com>
---
   lib/eal/include/rte_bitset.h | 123 +++++++++++++++++++++++++++++++++++
   1 file changed, 123 insertions(+)

diff --git a/lib/eal/include/rte_bitset.h b/lib/eal/include/rte_bitset.h
index 74c643a72a..8ae8425fc2 100644
--- a/lib/eal/include/rte_bitset.h
+++ b/lib/eal/include/rte_bitset.h
@@ -255,7 +255,13 @@ __rte_experimental
   static inline bool
   rte_bitset_test(const uint64_t *bitset, size_t bit_num)
   {
+#ifdef ALLOW_EXPERIMENTAL_API
       return __RTE_BITSET_DELEGATE(rte_bit_test, bitset, bit_num);
+#else
+     RTE_SET_USED(bitset);
+     RTE_SET_USED(bit_num);
+     return false;

This is no RTE_VERIFY(0) here, because this is just dummy code, that
will never be run. Is that correct?

Adding a RTE_VERIFY(false) is an interesting idea.
It is not supposed to be run, indeed.

Do you prefer I respin with this?



I reminded myself how ALLOW_EXPERIMENTAL_APIs works. This code may indeed be run. Experimental just generates a compiler warning.

So RTE_VERIFY(0); is needed. You should be able to remove the "return false;" statement.

Reply via email to