eal: add experimental tags for write combining store
authorDavid Marchand <david.marchand@redhat.com>
Wed, 14 Oct 2020 08:14:29 +0000 (10:14 +0200)
committerDavid Marchand <david.marchand@redhat.com>
Thu, 15 Oct 2020 06:45:30 +0000 (08:45 +0200)
Only marking the doxygen declarations is not enough.
Arch specific implementations must be tagged as well since there is no
common declaration of those inlines.

Fixes: 8a00dfc738fe ("eal: add write combining store")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Radu Nicolau <radu.nicolau@intel.com>
lib/librte_eal/arm/include/rte_io_64.h
lib/librte_eal/include/generic/rte_io.h
lib/librte_eal/x86/include/rte_io.h

index d07d9cb..f9a1f10 100644 (file)
@@ -164,12 +164,14 @@ rte_write64(uint64_t value, volatile void *addr)
        rte_write64_relaxed(value, addr);
 }
 
+__rte_experimental
 static __rte_always_inline void
 rte_write32_wc(uint32_t value, volatile void *addr)
 {
        rte_write32(value, addr);
 }
 
+__rte_experimental
 static __rte_always_inline void
 rte_write32_wc_relaxed(uint32_t value, volatile void *addr)
 {
index 0669baa..ebcf805 100644 (file)
@@ -14,6 +14,7 @@
 
 #include <stdint.h>
 #include <rte_common.h>
+#include <rte_compat.h>
 #include <rte_atomic.h>
 
 #ifdef __DOXYGEN__
index c035eec..730f958 100644 (file)
@@ -28,6 +28,7 @@ __rte_x86_movdiri(uint32_t value, volatile void *addr)
                : "a" (value), "d" (addr));
 }
 
+__rte_experimental
 static __rte_always_inline void
 rte_write32_wc_relaxed(uint32_t value, volatile void *addr)
 {
@@ -47,11 +48,19 @@ rte_write32_wc_relaxed(uint32_t value, volatile void *addr)
        }
 }
 
+__rte_experimental
 static __rte_always_inline void
 rte_write32_wc(uint32_t value, volatile void *addr)
 {
+       /* gcc complains about calling this experimental function even
+        * when not using it. Hide it with ALLOW_EXPERIMENTAL_API.
+        */
+#ifdef ALLOW_EXPERIMENTAL_API
        rte_wmb();
        rte_write32_wc_relaxed(value, addr);
+#else
+       rte_write32(value, addr);
+#endif
 }
 
 #ifdef __cplusplus