* [dpdk-dev] [PATCH 0/3] fix compilation of examples for ARM
@ 2016-02-05 14:54 Thomas Monjalon
2016-02-05 14:54 ` [dpdk-dev] [PATCH 1/3] examples/distributor: fix build for non-x86 arch Thomas Monjalon
` (3 more replies)
0 siblings, 4 replies; 9+ messages in thread
From: Thomas Monjalon @ 2016-02-05 14:54 UTC (permalink / raw)
To: bruce.richardson, remy.horton; +Cc: dev
Thomas Monjalon (3):
examples/distributor: fix build for non-x86 arch
examples/ethtool: fix build
examples: fix build dependencies
examples/Makefile | 12 ++++++++----
examples/distributor/main.c | 8 ++++----
examples/ethtool/ethtool-app/main.c | 2 +-
3 files changed, 13 insertions(+), 9 deletions(-)
--
2.7.0
^ permalink raw reply [flat|nested] 9+ messages in thread
* [dpdk-dev] [PATCH 1/3] examples/distributor: fix build for non-x86 arch
2016-02-05 14:54 [dpdk-dev] [PATCH 0/3] fix compilation of examples for ARM Thomas Monjalon
@ 2016-02-05 14:54 ` Thomas Monjalon
2016-02-05 15:07 ` Pattan, Reshma
2016-02-05 14:54 ` [dpdk-dev] [PATCH 2/3] examples/ethtool: fix build Thomas Monjalon
` (2 subsequent siblings)
3 siblings, 1 reply; 9+ messages in thread
From: Thomas Monjalon @ 2016-02-05 14:54 UTC (permalink / raw)
To: bruce.richardson, remy.horton; +Cc: dev
_mm_prefetch is defined only in x86 compilers.
rte_prefetch functions are defined in EAL for each arch,
and must be preferred over compiler intrinsics.
Fixes: 07db4a975094 ("examples/distributor: new sample app")
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
---
examples/distributor/main.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/examples/distributor/main.c b/examples/distributor/main.c
index 4e74f8f..87344ac 100644
--- a/examples/distributor/main.c
+++ b/examples/distributor/main.c
@@ -335,13 +335,13 @@ lcore_tx(struct rte_ring *in_r)
/* for traffic we receive, queue it up for transmit */
uint16_t i;
- _mm_prefetch((void *)bufs[0], 0);
- _mm_prefetch((void *)bufs[1], 0);
- _mm_prefetch((void *)bufs[2], 0);
+ rte_prefetch0((void *)bufs[0]);
+ rte_prefetch0((void *)bufs[1]);
+ rte_prefetch0((void *)bufs[2]);
for (i = 0; i < nb_rx; i++) {
struct output_buffer *outbuf;
uint8_t outp;
- _mm_prefetch((void *)bufs[i + 3], 0);
+ rte_prefetch0((void *)bufs[i + 3]);
/*
* workers should update in_port to hold the
* output port value
--
2.7.0
^ permalink raw reply [flat|nested] 9+ messages in thread
* [dpdk-dev] [PATCH 2/3] examples/ethtool: fix build
2016-02-05 14:54 [dpdk-dev] [PATCH 0/3] fix compilation of examples for ARM Thomas Monjalon
2016-02-05 14:54 ` [dpdk-dev] [PATCH 1/3] examples/distributor: fix build for non-x86 arch Thomas Monjalon
@ 2016-02-05 14:54 ` Thomas Monjalon
2016-02-15 11:15 ` Remy Horton
2016-02-05 14:54 ` [dpdk-dev] [PATCH 3/3] examples: fix build dependencies Thomas Monjalon
2016-02-16 6:50 ` [dpdk-dev] [PATCH 0/3] fix compilation of examples for ARM Thomas Monjalon
3 siblings, 1 reply; 9+ messages in thread
From: Thomas Monjalon @ 2016-02-05 14:54 UTC (permalink / raw)
To: bruce.richardson, remy.horton; +Cc: dev
When building for ARM, the spinlock structure was not found.
It appears to be a mismatch with rwlock which is not used in this file.
Fixes: bda68ab9d1e7 ("examples/ethtool: add user-space ethtool sample application")
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
---
examples/ethtool/ethtool-app/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/examples/ethtool/ethtool-app/main.c b/examples/ethtool/ethtool-app/main.c
index e21abcd..2c655d8 100644
--- a/examples/ethtool/ethtool-app/main.c
+++ b/examples/ethtool/ethtool-app/main.c
@@ -36,7 +36,7 @@
#include <stdlib.h>
#include <rte_common.h>
-#include <rte_rwlock.h>
+#include <rte_spinlock.h>
#include <rte_eal.h>
#include <rte_ethdev.h>
#include <rte_ether.h>
--
2.7.0
^ permalink raw reply [flat|nested] 9+ messages in thread
* [dpdk-dev] [PATCH 3/3] examples: fix build dependencies
2016-02-05 14:54 [dpdk-dev] [PATCH 0/3] fix compilation of examples for ARM Thomas Monjalon
2016-02-05 14:54 ` [dpdk-dev] [PATCH 1/3] examples/distributor: fix build for non-x86 arch Thomas Monjalon
2016-02-05 14:54 ` [dpdk-dev] [PATCH 2/3] examples/ethtool: fix build Thomas Monjalon
@ 2016-02-05 14:54 ` Thomas Monjalon
2016-02-16 6:50 ` [dpdk-dev] [PATCH 0/3] fix compilation of examples for ARM Thomas Monjalon
3 siblings, 0 replies; 9+ messages in thread
From: Thomas Monjalon @ 2016-02-05 14:54 UTC (permalink / raw)
To: bruce.richardson, remy.horton; +Cc: dev
When building for ARM some examples were failing to compile because
of some dependencies disabled.
Declaring these dependencies prevent from trying to compile some
not supported examples.
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
---
examples/Makefile | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/examples/Makefile b/examples/Makefile
index 1cb4785..1665df1 100644
--- a/examples/Makefile
+++ b/examples/Makefile
@@ -46,21 +46,25 @@ endif
DIRS-y += ethtool
DIRS-y += exception_path
DIRS-y += helloworld
-DIRS-y += ip_pipeline
-DIRS-y += ip_reassembly
+DIRS-$(CONFIG_RTE_LIBRTE_PIPELINE) += ip_pipeline
+ifeq ($(CONFIG_RTE_LIBRTE_LPM),y)
+DIRS-$(CONFIG_RTE_IP_FRAG) += ip_reassembly
DIRS-$(CONFIG_RTE_IP_FRAG) += ip_fragmentation
+endif
DIRS-y += ipv4_multicast
DIRS-$(CONFIG_RTE_LIBRTE_KNI) += kni
DIRS-y += l2fwd
DIRS-$(CONFIG_RTE_LIBRTE_IVSHMEM) += l2fwd-ivshmem
DIRS-$(CONFIG_RTE_LIBRTE_JOBSTATS) += l2fwd-jobstats
DIRS-y += l2fwd-keepalive
-DIRS-y += l3fwd
+DIRS-$(CONFIG_RTE_LIBRTE_LPM) += l3fwd
DIRS-$(CONFIG_RTE_LIBRTE_ACL) += l3fwd-acl
+ifeq ($(CONFIG_RTE_LIBRTE_LPM),y)
DIRS-$(CONFIG_RTE_LIBRTE_POWER) += l3fwd-power
DIRS-y += l3fwd-vf
+endif
DIRS-y += link_status_interrupt
-DIRS-y += load_balancer
+DIRS-$(CONFIG_RTE_LIBRTE_LPM) += load_balancer
DIRS-y += multi_process
DIRS-y += netmap_compat/bridge
DIRS-$(CONFIG_RTE_LIBRTE_REORDER) += packet_ordering
--
2.7.0
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [dpdk-dev] [PATCH 1/3] examples/distributor: fix build for non-x86 arch
2016-02-05 14:54 ` [dpdk-dev] [PATCH 1/3] examples/distributor: fix build for non-x86 arch Thomas Monjalon
@ 2016-02-05 15:07 ` Pattan, Reshma
2016-02-05 15:15 ` Ananyev, Konstantin
0 siblings, 1 reply; 9+ messages in thread
From: Pattan, Reshma @ 2016-02-05 15:07 UTC (permalink / raw)
To: Thomas Monjalon; +Cc: dev
Hi Thomas,
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Thomas Monjalon
> Sent: Friday, February 5, 2016 2:54 PM
> To: Richardson, Bruce; Horton, Remy
> Cc: dev@dpdk.org
> Subject: [dpdk-dev] [PATCH 1/3] examples/distributor: fix build for non-x86 arch
>
> _mm_prefetch is defined only in x86 compilers.
> rte_prefetch functions are defined in EAL for each arch, and must be preferred
> over compiler intrinsics.
>
> Fixes: 07db4a975094 ("examples/distributor: new sample app")
>
> Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
> ---
> examples/distributor/main.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/examples/distributor/main.c b/examples/distributor/main.c index
> 4e74f8f..87344ac 100644
> --- a/examples/distributor/main.c
> +++ b/examples/distributor/main.c
> @@ -335,13 +335,13 @@ lcore_tx(struct rte_ring *in_r)
>
> /* for traffic we receive, queue it up for transmit */
> uint16_t i;
> - _mm_prefetch((void *)bufs[0], 0);
> - _mm_prefetch((void *)bufs[1], 0);
> - _mm_prefetch((void *)bufs[2], 0);
> + rte_prefetch0((void *)bufs[0]);
> + rte_prefetch0((void *)bufs[1]);
> + rte_prefetch0((void *)bufs[2]);
Some time back Jerin Jacob has sent patch for replacing the _mm_prefetch with rte_prefetch_non_temporal. This is FYI.
Thanks,
Reshma
> for (i = 0; i < nb_rx; i++) {
> struct output_buffer *outbuf;
> uint8_t outp;
> - _mm_prefetch((void *)bufs[i + 3], 0);
> + rte_prefetch0((void *)bufs[i + 3]);
> /*
> * workers should update in_port to hold the
> * output port value
> --
> 2.7.0
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [dpdk-dev] [PATCH 1/3] examples/distributor: fix build for non-x86 arch
2016-02-05 15:07 ` Pattan, Reshma
@ 2016-02-05 15:15 ` Ananyev, Konstantin
2016-02-05 15:55 ` Thomas Monjalon
0 siblings, 1 reply; 9+ messages in thread
From: Ananyev, Konstantin @ 2016-02-05 15:15 UTC (permalink / raw)
To: Pattan, Reshma, Thomas Monjalon; +Cc: dev
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Pattan, Reshma
> Sent: Friday, February 05, 2016 3:08 PM
> To: Thomas Monjalon
> Cc: dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH 1/3] examples/distributor: fix build for non-x86 arch
>
> Hi Thomas,
>
> > -----Original Message-----
> > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Thomas Monjalon
> > Sent: Friday, February 5, 2016 2:54 PM
> > To: Richardson, Bruce; Horton, Remy
> > Cc: dev@dpdk.org
> > Subject: [dpdk-dev] [PATCH 1/3] examples/distributor: fix build for non-x86 arch
> >
> > _mm_prefetch is defined only in x86 compilers.
> > rte_prefetch functions are defined in EAL for each arch, and must be preferred
> > over compiler intrinsics.
> >
> > Fixes: 07db4a975094 ("examples/distributor: new sample app")
> >
> > Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
> > ---
> > examples/distributor/main.c | 8 ++++----
> > 1 file changed, 4 insertions(+), 4 deletions(-)
> >
> > diff --git a/examples/distributor/main.c b/examples/distributor/main.c index
> > 4e74f8f..87344ac 100644
> > --- a/examples/distributor/main.c
> > +++ b/examples/distributor/main.c
> > @@ -335,13 +335,13 @@ lcore_tx(struct rte_ring *in_r)
> >
> > /* for traffic we receive, queue it up for transmit */
> > uint16_t i;
> > - _mm_prefetch((void *)bufs[0], 0);
> > - _mm_prefetch((void *)bufs[1], 0);
> > - _mm_prefetch((void *)bufs[2], 0);
> > + rte_prefetch0((void *)bufs[0]);
> > + rte_prefetch0((void *)bufs[1]);
> > + rte_prefetch0((void *)bufs[2]);
>
> Some time back Jerin Jacob has sent patch for replacing the _mm_prefetch with rte_prefetch_non_temporal. This is FYI.
Yep:
http://dpdk.org/dev/patchwork/patch/9369/
http://dpdk.org/dev/patchwork/patch/9370/
And on IA _mm_prefetch(p, 0) != rte_prefetch0(p).
I think, as in Jacob implementation, it should be PREFETCHNTA.
Konstantin
>
> Thanks,
> Reshma
>
> > for (i = 0; i < nb_rx; i++) {
> > struct output_buffer *outbuf;
> > uint8_t outp;
> > - _mm_prefetch((void *)bufs[i + 3], 0);
> > + rte_prefetch0((void *)bufs[i + 3]);
> > /*
> > * workers should update in_port to hold the
> > * output port value
> > --
> > 2.7.0
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [dpdk-dev] [PATCH 1/3] examples/distributor: fix build for non-x86 arch
2016-02-05 15:15 ` Ananyev, Konstantin
@ 2016-02-05 15:55 ` Thomas Monjalon
0 siblings, 0 replies; 9+ messages in thread
From: Thomas Monjalon @ 2016-02-05 15:55 UTC (permalink / raw)
To: Ananyev, Konstantin; +Cc: dev
2016-02-05 15:15, Ananyev, Konstantin:
> From: Pattan, Reshma
> > From: Thomas Monjalon
> > > _mm_prefetch is defined only in x86 compilers.
> > > rte_prefetch functions are defined in EAL for each arch, and must be preferred
> > > over compiler intrinsics.
[...]
> > > - _mm_prefetch((void *)bufs[0], 0);
> > > - _mm_prefetch((void *)bufs[1], 0);
> > > - _mm_prefetch((void *)bufs[2], 0);
> > > + rte_prefetch0((void *)bufs[0]);
> > > + rte_prefetch0((void *)bufs[1]);
> > > + rte_prefetch0((void *)bufs[2]);
> >
> > Some time back Jerin Jacob has sent patch for replacing the _mm_prefetch with rte_prefetch_non_temporal. This is FYI.
>
> Yep:
> http://dpdk.org/dev/patchwork/patch/9369/
> http://dpdk.org/dev/patchwork/patch/9370/
>
> And on IA _mm_prefetch(p, 0) != rte_prefetch0(p).
> I think, as in Jacob implementation, it should be PREFETCHNTA.
Oh yes, you're right. Thanks
patch rejected
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [dpdk-dev] [PATCH 2/3] examples/ethtool: fix build
2016-02-05 14:54 ` [dpdk-dev] [PATCH 2/3] examples/ethtool: fix build Thomas Monjalon
@ 2016-02-15 11:15 ` Remy Horton
0 siblings, 0 replies; 9+ messages in thread
From: Remy Horton @ 2016-02-15 11:15 UTC (permalink / raw)
To: Thomas Monjalon, bruce.richardson; +Cc: dev
On 05/02/2016 14:54, Thomas Monjalon wrote:
> When building for ARM, the spinlock structure was not found.
> It appears to be a mismatch with rwlock which is not used in this file.
>
> Fixes: bda68ab9d1e7 ("examples/ethtool: add user-space ethtool sample application")
>
> Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
> ---
> examples/ethtool/ethtool-app/main.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Acked-by: Remy Horton <remy.horton@intel.com>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [dpdk-dev] [PATCH 0/3] fix compilation of examples for ARM
2016-02-05 14:54 [dpdk-dev] [PATCH 0/3] fix compilation of examples for ARM Thomas Monjalon
` (2 preceding siblings ...)
2016-02-05 14:54 ` [dpdk-dev] [PATCH 3/3] examples: fix build dependencies Thomas Monjalon
@ 2016-02-16 6:50 ` Thomas Monjalon
3 siblings, 0 replies; 9+ messages in thread
From: Thomas Monjalon @ 2016-02-16 6:50 UTC (permalink / raw)
To: dev
2016-02-05 15:54, Thomas Monjalon:
> Thomas Monjalon (3):
> examples/distributor: fix build for non-x86 arch
> examples/ethtool: fix build
> examples: fix build dependencies
Patch 1 is rejected. Others are re-sent in this series:
http://dpdk.org/ml/archives/dev/2016-February/033223.html
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2016-02-16 6:52 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-05 14:54 [dpdk-dev] [PATCH 0/3] fix compilation of examples for ARM Thomas Monjalon
2016-02-05 14:54 ` [dpdk-dev] [PATCH 1/3] examples/distributor: fix build for non-x86 arch Thomas Monjalon
2016-02-05 15:07 ` Pattan, Reshma
2016-02-05 15:15 ` Ananyev, Konstantin
2016-02-05 15:55 ` Thomas Monjalon
2016-02-05 14:54 ` [dpdk-dev] [PATCH 2/3] examples/ethtool: fix build Thomas Monjalon
2016-02-15 11:15 ` Remy Horton
2016-02-05 14:54 ` [dpdk-dev] [PATCH 3/3] examples: fix build dependencies Thomas Monjalon
2016-02-16 6:50 ` [dpdk-dev] [PATCH 0/3] fix compilation of examples for ARM 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).