[dpdk-dev] examples/l3fwd: report error when no vector engine is available

Message ID 1461670259-3339-1-git-send-email-viktorin@rehivetech.com (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers

Commit Message

Jan Viktorin April 26, 2016, 11:30 a.m. UTC
  If no SSE nor NEON are available the l3fwd should complain loudly to quickly
find out the reason.

Signed-off-by: Jan Viktorin <viktorin@rehivetech.com>
---
It has happened to me once when I've accidently built a GCC without the NEON
support. It was confusing as at first I thought it is a bug... It is not,
there is just missing an error message telling the reason.
---
 examples/l3fwd/l3fwd_em.c | 2 ++
 1 file changed, 2 insertions(+)
  

Comments

Thomas Monjalon June 8, 2016, 8:21 p.m. UTC | #1
2016-04-26 13:30, Jan Viktorin:
> If no SSE nor NEON are available the l3fwd should complain loudly to quickly
> find out the reason.
> 
> Signed-off-by: Jan Viktorin <viktorin@rehivetech.com>

Applied, thanks
  

Patch

diff --git a/examples/l3fwd/l3fwd_em.c b/examples/l3fwd/l3fwd_em.c
index fc59243..259094d 100644
--- a/examples/l3fwd/l3fwd_em.c
+++ b/examples/l3fwd/l3fwd_em.c
@@ -259,6 +259,8 @@  em_mask_key(void *key, xmm_t mask)
 
 	return vandq_s32(data, mask);
 }
+#else
+#error No vector engine (SSE, NEON) available, check your toolchain
 #endif
 
 static inline uint8_t