DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] eal: add experimental tags for write combining store
@ 2020-10-14  8:14 David Marchand
  2020-10-14  9:30 ` Ruifeng Wang
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: David Marchand @ 2020-10-14  8:14 UTC (permalink / raw)
  To: dev, radu.nicolau
  Cc: Jerin Jacob, Ruifeng Wang, Jan Viktorin, Bruce Richardson,
	Konstantin Ananyev

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>
---
 lib/librte_eal/arm/include/rte_io_64.h | 2 ++
 lib/librte_eal/x86/include/rte_io.h    | 9 +++++++++
 2 files changed, 11 insertions(+)

diff --git a/lib/librte_eal/arm/include/rte_io_64.h b/lib/librte_eal/arm/include/rte_io_64.h
index d07d9cb226..f9a1f10ce7 100644
--- a/lib/librte_eal/arm/include/rte_io_64.h
+++ b/lib/librte_eal/arm/include/rte_io_64.h
@@ -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)
 {
diff --git a/lib/librte_eal/x86/include/rte_io.h b/lib/librte_eal/x86/include/rte_io.h
index c035eecc6a..730f958758 100644
--- a/lib/librte_eal/x86/include/rte_io.h
+++ b/lib/librte_eal/x86/include/rte_io.h
@@ -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
-- 
2.23.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-dev] [PATCH] eal: add experimental tags for write combining store
  2020-10-14  8:14 [dpdk-dev] [PATCH] eal: add experimental tags for write combining store David Marchand
@ 2020-10-14  9:30 ` Ruifeng Wang
  2020-10-14  9:57 ` Nicolau, Radu
  2020-10-14 13:49 ` [dpdk-dev] [PATCH v2] " David Marchand
  2 siblings, 0 replies; 5+ messages in thread
From: Ruifeng Wang @ 2020-10-14  9:30 UTC (permalink / raw)
  To: David Marchand, dev, radu.nicolau
  Cc: jerinj, Jan Viktorin, Bruce Richardson, Konstantin Ananyev, nd


> -----Original Message-----
> From: David Marchand <david.marchand@redhat.com>
> Sent: Wednesday, October 14, 2020 4:14 PM
> To: dev@dpdk.org; radu.nicolau@intel.com
> Cc: jerinj@marvell.com; Ruifeng Wang <Ruifeng.Wang@arm.com>; Jan
> Viktorin <viktorin@rehivetech.com>; Bruce Richardson
> <bruce.richardson@intel.com>; Konstantin Ananyev
> <konstantin.ananyev@intel.com>
> Subject: [PATCH] eal: add experimental tags for write combining store
> 
> 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>
> ---
>  lib/librte_eal/arm/include/rte_io_64.h | 2 ++
>  lib/librte_eal/x86/include/rte_io.h    | 9 +++++++++
>  2 files changed, 11 insertions(+)
> 
> diff --git a/lib/librte_eal/arm/include/rte_io_64.h
> b/lib/librte_eal/arm/include/rte_io_64.h
> index d07d9cb226..f9a1f10ce7 100644
> --- a/lib/librte_eal/arm/include/rte_io_64.h
> +++ b/lib/librte_eal/arm/include/rte_io_64.h
> @@ -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)  { diff --git
> a/lib/librte_eal/x86/include/rte_io.h b/lib/librte_eal/x86/include/rte_io.h
> index c035eecc6a..730f958758 100644
> --- a/lib/librte_eal/x86/include/rte_io.h
> +++ b/lib/librte_eal/x86/include/rte_io.h
> @@ -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
> --
> 2.23.0

Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-dev] [PATCH] eal: add experimental tags for write combining store
  2020-10-14  8:14 [dpdk-dev] [PATCH] eal: add experimental tags for write combining store David Marchand
  2020-10-14  9:30 ` Ruifeng Wang
@ 2020-10-14  9:57 ` Nicolau, Radu
  2020-10-14 13:49 ` [dpdk-dev] [PATCH v2] " David Marchand
  2 siblings, 0 replies; 5+ messages in thread
From: Nicolau, Radu @ 2020-10-14  9:57 UTC (permalink / raw)
  To: David Marchand, dev
  Cc: Jerin Jacob, Ruifeng Wang, Jan Viktorin, Bruce Richardson,
	Konstantin Ananyev


On 10/14/2020 9:14 AM, David Marchand wrote:
> 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: Radu Nicolau <radu.nicolau@intel.com 
<mailto:radu.nicolau@intel.com>>


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [dpdk-dev] [PATCH v2] eal: add experimental tags for write combining store
  2020-10-14  8:14 [dpdk-dev] [PATCH] eal: add experimental tags for write combining store David Marchand
  2020-10-14  9:30 ` Ruifeng Wang
  2020-10-14  9:57 ` Nicolau, Radu
@ 2020-10-14 13:49 ` David Marchand
  2020-10-15  8:28   ` David Marchand
  2 siblings, 1 reply; 5+ messages in thread
From: David Marchand @ 2020-10-14 13:49 UTC (permalink / raw)
  To: dev, radu.nicolau
  Cc: Ruifeng Wang, Jerin Jacob, Jan Viktorin, Bruce Richardson,
	Konstantin Ananyev

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>
---
Changelog since v1:
- fix 32-bit build by adding missing rte_compat.h include,

---
 lib/librte_eal/arm/include/rte_io_64.h  | 2 ++
 lib/librte_eal/include/generic/rte_io.h | 1 +
 lib/librte_eal/x86/include/rte_io.h     | 9 +++++++++
 3 files changed, 12 insertions(+)

diff --git a/lib/librte_eal/arm/include/rte_io_64.h b/lib/librte_eal/arm/include/rte_io_64.h
index d07d9cb226..f9a1f10ce7 100644
--- a/lib/librte_eal/arm/include/rte_io_64.h
+++ b/lib/librte_eal/arm/include/rte_io_64.h
@@ -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)
 {
diff --git a/lib/librte_eal/include/generic/rte_io.h b/lib/librte_eal/include/generic/rte_io.h
index 0669baa0b6..ebcf8051e1 100644
--- a/lib/librte_eal/include/generic/rte_io.h
+++ b/lib/librte_eal/include/generic/rte_io.h
@@ -14,6 +14,7 @@
 
 #include <stdint.h>
 #include <rte_common.h>
+#include <rte_compat.h>
 #include <rte_atomic.h>
 
 #ifdef __DOXYGEN__
diff --git a/lib/librte_eal/x86/include/rte_io.h b/lib/librte_eal/x86/include/rte_io.h
index c035eecc6a..730f958758 100644
--- a/lib/librte_eal/x86/include/rte_io.h
+++ b/lib/librte_eal/x86/include/rte_io.h
@@ -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
-- 
2.23.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-dev] [PATCH v2] eal: add experimental tags for write combining store
  2020-10-14 13:49 ` [dpdk-dev] [PATCH v2] " David Marchand
@ 2020-10-15  8:28   ` David Marchand
  0 siblings, 0 replies; 5+ messages in thread
From: David Marchand @ 2020-10-15  8:28 UTC (permalink / raw)
  To: dev, Radu Nicolau
  Cc: Ruifeng Wang, Jerin Jacob, Jan Viktorin, Bruce Richardson,
	Konstantin Ananyev

On Wed, Oct 14, 2020 at 3:50 PM David Marchand
<david.marchand@redhat.com> wrote:
>
> 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>

Applied.


-- 
David Marchand


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-10-15  8:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-14  8:14 [dpdk-dev] [PATCH] eal: add experimental tags for write combining store David Marchand
2020-10-14  9:30 ` Ruifeng Wang
2020-10-14  9:57 ` Nicolau, Radu
2020-10-14 13:49 ` [dpdk-dev] [PATCH v2] " David Marchand
2020-10-15  8:28   ` David Marchand

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).