DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev]  [PATCH] eal/ppc64: add support for rte pause
@ 2018-10-07  6:18 Jerin Jacob
  2018-10-12  2:24 ` [dpdk-dev] 答复: " Chao Zhu
  2018-10-26 12:41 ` [dpdk-dev] " Thomas Monjalon
  0 siblings, 2 replies; 6+ messages in thread
From: Jerin Jacob @ 2018-10-07  6:18 UTC (permalink / raw)
  To: Chao Zhu; +Cc: dev, thomas, gowrishankar.m, ola.liljedahl, Jerin Jacob

Add support for rte_pause() implementation for ppc64.

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
---

The reference implementation for Linux's cpu_relax() for ppc64 is at
https://elixir.bootlin.com/linux/latest/source/arch/powerpc/include/asm/processor.h#L440

---
 lib/librte_eal/common/include/arch/ppc_64/rte_pause.h | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/lib/librte_eal/common/include/arch/ppc_64/rte_pause.h b/lib/librte_eal/common/include/arch/ppc_64/rte_pause.h
index 8bd835764..16e47ce22 100644
--- a/lib/librte_eal/common/include/arch/ppc_64/rte_pause.h
+++ b/lib/librte_eal/common/include/arch/ppc_64/rte_pause.h
@@ -9,10 +9,17 @@
 extern "C" {
 #endif
 
+#include "rte_atomic.h"
+
 #include "generic/rte_pause.h"
 
 static inline void rte_pause(void)
 {
+	/* Set hardware multi-threading low priority */
+	asm volatile("or 1,1,1");
+	/* Set hardware multi-threading medium priority */
+	asm volatile("or 2,2,2");
+	rte_compiler_barrier();
 }
 
 #ifdef __cplusplus
-- 
2.19.0

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

* [dpdk-dev] 答复:  [PATCH] eal/ppc64: add support for rte pause
  2018-10-07  6:18 [dpdk-dev] [PATCH] eal/ppc64: add support for rte pause Jerin Jacob
@ 2018-10-12  2:24 ` Chao Zhu
  2018-10-12  4:12   ` Jerin Jacob
  2018-10-26 12:41 ` [dpdk-dev] " Thomas Monjalon
  1 sibling, 1 reply; 6+ messages in thread
From: Chao Zhu @ 2018-10-12  2:24 UTC (permalink / raw)
  To: 'Jerin Jacob'; +Cc: dev, thomas, gowrishankar.m, ola.liljedahl

-----邮件原件-----
发件人: Jerin Jacob <jerin.jacob@caviumnetworks.com> 
发送时间: 2018年10月7日 14:19
收件人: Chao Zhu <chaozhu@linux.vnet.ibm.com>
抄送: dev@dpdk.org; thomas@monjalon.net; gowrishankar.m@linux.vnet.ibm.com;
ola.liljedahl@arm.com; Jerin Jacob <jerin.jacob@caviumnetworks.com>
主题: [dpdk-dev] [PATCH] eal/ppc64: add support for rte pause

Add support for rte_pause() implementation for ppc64.

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
---

The reference implementation for Linux's cpu_relax() for ppc64 is at
https://elixir.bootlin.com/linux/latest/source/arch/powerpc/include/asm/proc
essor.h#L440

---
 lib/librte_eal/common/include/arch/ppc_64/rte_pause.h | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/lib/librte_eal/common/include/arch/ppc_64/rte_pause.h
b/lib/librte_eal/common/include/arch/ppc_64/rte_pause.h
index 8bd835764..16e47ce22 100644
--- a/lib/librte_eal/common/include/arch/ppc_64/rte_pause.h
+++ b/lib/librte_eal/common/include/arch/ppc_64/rte_pause.h
@@ -9,10 +9,17 @@
 extern "C" {
 #endif

+#include "rte_atomic.h"
+
 #include "generic/rte_pause.h"

 static inline void rte_pause(void)
 {
+	/* Set hardware multi-threading low priority */
+	asm volatile("or 1,1,1");
+	/* Set hardware multi-threading medium priority */
+	asm volatile("or 2,2,2");
+	rte_compiler_barrier();
 }

 #ifdef __cplusplus
-- 
2.19.0

Acked-by: Chao Zhu <chaozhu@linux.vnet.ibm.com>

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

* Re: [dpdk-dev] 答复:  [PATCH] eal/ppc64: add support for rte pause
  2018-10-12  2:24 ` [dpdk-dev] 答复: " Chao Zhu
@ 2018-10-12  4:12   ` Jerin Jacob
  2018-10-12  6:50     ` Thomas Monjalon
  0 siblings, 1 reply; 6+ messages in thread
From: Jerin Jacob @ 2018-10-12  4:12 UTC (permalink / raw)
  To: Chao Zhu; +Cc: dev, thomas, gowrishankar.m, ola.liljedahl

-----Original Message-----
> Date: Fri, 12 Oct 2018 10:24:16 +0800
> From: Chao Zhu <chaozhu@linux.vnet.ibm.com>
> To: 'Jerin Jacob' <jerin.jacob@caviumnetworks.com>
> CC: dev@dpdk.org, thomas@monjalon.net, gowrishankar.m@linux.vnet.ibm.com,
>  ola.liljedahl@arm.com
> Subject: 答复: [dpdk-dev] [PATCH] eal/ppc64: add support for rte pause
> X-Mailer: Microsoft Outlook 16.0
> 
> 
> -----邮件原件-----
> 发件人: Jerin Jacob <jerin.jacob@caviumnetworks.com>
> 发送时间: 2018年10月7日 14:19
> 收件人: Chao Zhu <chaozhu@linux.vnet.ibm.com>
> 抄送: dev@dpdk.org; thomas@monjalon.net; gowrishankar.m@linux.vnet.ibm.com;
> ola.liljedahl@arm.com; Jerin Jacob <jerin.jacob@caviumnetworks.com>
> 主题: [dpdk-dev] [PATCH] eal/ppc64: add support for rte pause
> 
> Add support for rte_pause() implementation for ppc64.
> 
> Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
> ---
> 
> The reference implementation for Linux's cpu_relax() for ppc64 is at
> https://elixir.bootlin.com/linux/latest/source/arch/powerpc/include/asm/proc
> essor.h#L440
> 
> ---
>  lib/librte_eal/common/include/arch/ppc_64/rte_pause.h | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/lib/librte_eal/common/include/arch/ppc_64/rte_pause.h
> b/lib/librte_eal/common/include/arch/ppc_64/rte_pause.h
> index 8bd835764..16e47ce22 100644
> --- a/lib/librte_eal/common/include/arch/ppc_64/rte_pause.h
> +++ b/lib/librte_eal/common/include/arch/ppc_64/rte_pause.h
> @@ -9,10 +9,17 @@
>  extern "C" {
>  #endif
> 
> +#include "rte_atomic.h"
> +
>  #include "generic/rte_pause.h"
> 
>  static inline void rte_pause(void)
>  {
> +       /* Set hardware multi-threading low priority */
> +       asm volatile("or 1,1,1");
> +       /* Set hardware multi-threading medium priority */
> +       asm volatile("or 2,2,2");
> +       rte_compiler_barrier();
>  }
> 
>  #ifdef __cplusplus
> --
> 2.19.0
> 
> Acked-by: Chao Zhu <chaozhu@linux.vnet.ibm.com>

Thomas,

Just noticed, due to some reason, The above Acked-by: is not reflected in patchwork.

http://patches.dpdk.org/patch/46195/

Probably because, it was not a "inline" reply which patchwork couldn't parse it.


> 
> 

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

* Re: [dpdk-dev] 答复:  [PATCH] eal/ppc64: add support for rte pause
  2018-10-12  4:12   ` Jerin Jacob
@ 2018-10-12  6:50     ` Thomas Monjalon
  2018-10-26 12:40       ` Thomas Monjalon
  0 siblings, 1 reply; 6+ messages in thread
From: Thomas Monjalon @ 2018-10-12  6:50 UTC (permalink / raw)
  To: Jerin Jacob; +Cc: Chao Zhu, dev, gowrishankar.m, ola.liljedahl

12/10/2018 06:12, Jerin Jacob:
> -----Original Message-----
> > Date: Fri, 12 Oct 2018 10:24:16 +0800
> > From: Chao Zhu <chaozhu@linux.vnet.ibm.com>
> > To: 'Jerin Jacob' <jerin.jacob@caviumnetworks.com>
> > CC: dev@dpdk.org, thomas@monjalon.net, gowrishankar.m@linux.vnet.ibm.com,
> >  ola.liljedahl@arm.com
> > Subject: 答复: [dpdk-dev] [PATCH] eal/ppc64: add support for rte pause
> > X-Mailer: Microsoft Outlook 16.0
> > 
> > 
> > -----邮件原件-----
> > 发件人: Jerin Jacob <jerin.jacob@caviumnetworks.com>
> > 发送时间: 2018年10月7日 14:19
> > 收件人: Chao Zhu <chaozhu@linux.vnet.ibm.com>
> > 抄送: dev@dpdk.org; thomas@monjalon.net; gowrishankar.m@linux.vnet.ibm.com;
> > ola.liljedahl@arm.com; Jerin Jacob <jerin.jacob@caviumnetworks.com>
> > 主题: [dpdk-dev] [PATCH] eal/ppc64: add support for rte pause
> > 
> > Add support for rte_pause() implementation for ppc64.
> > 
> > Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
> > ---
> > 
> > The reference implementation for Linux's cpu_relax() for ppc64 is at
> > https://elixir.bootlin.com/linux/latest/source/arch/powerpc/include/asm/proc
> > essor.h#L440
> > 
> > ---
> >  lib/librte_eal/common/include/arch/ppc_64/rte_pause.h | 7 +++++++
> >  1 file changed, 7 insertions(+)
> > 
> > diff --git a/lib/librte_eal/common/include/arch/ppc_64/rte_pause.h
> > b/lib/librte_eal/common/include/arch/ppc_64/rte_pause.h
> > index 8bd835764..16e47ce22 100644
> > --- a/lib/librte_eal/common/include/arch/ppc_64/rte_pause.h
> > +++ b/lib/librte_eal/common/include/arch/ppc_64/rte_pause.h
> > @@ -9,10 +9,17 @@
> >  extern "C" {
> >  #endif
> > 
> > +#include "rte_atomic.h"
> > +
> >  #include "generic/rte_pause.h"
> > 
> >  static inline void rte_pause(void)
> >  {
> > +       /* Set hardware multi-threading low priority */
> > +       asm volatile("or 1,1,1");
> > +       /* Set hardware multi-threading medium priority */
> > +       asm volatile("or 2,2,2");
> > +       rte_compiler_barrier();
> >  }
> > 
> >  #ifdef __cplusplus
> > --
> > 2.19.0
> > 
> > Acked-by: Chao Zhu <chaozhu@linux.vnet.ibm.com>
> 
> Thomas,
> 
> Just noticed, due to some reason, The above Acked-by: is not reflected in patchwork.
> 
> http://patches.dpdk.org/patch/46195/
> 
> Probably because, it was not a "inline" reply which patchwork couldn't parse it.

Or more probably, there are some special characters in the email or headers
which make patchwork parsing to fail.

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

* Re: [dpdk-dev] 答复: [PATCH] eal/ppc64: add support for rte pause
  2018-10-12  6:50     ` Thomas Monjalon
@ 2018-10-26 12:40       ` Thomas Monjalon
  0 siblings, 0 replies; 6+ messages in thread
From: Thomas Monjalon @ 2018-10-26 12:40 UTC (permalink / raw)
  To: Jerin Jacob; +Cc: dev, Chao Zhu, gowrishankar.m, ola.liljedahl

12/10/2018 08:50, Thomas Monjalon:
> 12/10/2018 06:12, Jerin Jacob:
> > > --
> > > 2.19.0
> > > 
> > > Acked-by: Chao Zhu <chaozhu@linux.vnet.ibm.com>
> > 
> > Thomas,
> > 
> > Just noticed, due to some reason, The above Acked-by: is not reflected in patchwork.
> > 
> > http://patches.dpdk.org/patch/46195/
> > 
> > Probably because, it was not a "inline" reply which patchwork couldn't parse it.
> 
> Or more probably, there are some special characters in the email or headers
> which make patchwork parsing to fail.

I know why:
Chao was not quoting original mail and answered below the "git signature"
so it was ignored.

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

* Re: [dpdk-dev] [PATCH] eal/ppc64: add support for rte pause
  2018-10-07  6:18 [dpdk-dev] [PATCH] eal/ppc64: add support for rte pause Jerin Jacob
  2018-10-12  2:24 ` [dpdk-dev] 答复: " Chao Zhu
@ 2018-10-26 12:41 ` Thomas Monjalon
  1 sibling, 0 replies; 6+ messages in thread
From: Thomas Monjalon @ 2018-10-26 12:41 UTC (permalink / raw)
  To: Jerin Jacob; +Cc: dev, Chao Zhu, gowrishankar.m, ola.liljedahl

07/10/2018 08:18, Jerin Jacob:
> Add support for rte_pause() implementation for ppc64.
> 
> Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>

Acked-by: Chao Zhu <chaozhu@linux.vnet.ibm.com>

Applied, thanks

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

end of thread, other threads:[~2018-10-26 12:41 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-07  6:18 [dpdk-dev] [PATCH] eal/ppc64: add support for rte pause Jerin Jacob
2018-10-12  2:24 ` [dpdk-dev] 答复: " Chao Zhu
2018-10-12  4:12   ` Jerin Jacob
2018-10-12  6:50     ` Thomas Monjalon
2018-10-26 12:40       ` Thomas Monjalon
2018-10-26 12:41 ` [dpdk-dev] " Thomas Monjalon

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).