From: Mike Sowka Date: Sat, 5 Dec 2015 22:27:56 +0000 (-0500) Subject: sched: fix build without SSE4 X-Git-Tag: spdx-start~7904 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=90f455f3d337273ccaf122463982de157ada6ff6;p=dpdk.git sched: fix build without SSE4 Irrelevant of the target, the preprocessor #ifdef SSE2 for the grinder_pipe_exists function is inadequate since the __mm_testz_si128 function requires SSE4.1, PTEST instruction described in https://en.wikipedia.org/wiki/SSE4#SSE4.1 (I do no have better spec reference). I have bumped the preprocessor #ifdef to require SSE4. The Atom N2600 does not have SSE4, http://ark.intel.com/products/58916, and so I had trouble building rte_sched with optimized version of grinder_pipe_exists, with following: error: inlining failed in call to always_inline _mm_testz_si128’: target specific option mismatch GCC 4.9 correctly identifies my target as not having SSE4, and with provided patch builds the non-optimized version of grinder_pipe_exists. Signed-off-by: Mike Sowka --- diff --git a/lib/librte_sched/rte_sched.c b/lib/librte_sched/rte_sched.c index 21ebf25338..6f92aa6cc1 100644 --- a/lib/librte_sched/rte_sched.c +++ b/lib/librte_sched/rte_sched.c @@ -55,8 +55,8 @@ #ifdef RTE_SCHED_VECTOR #include -#if defined(__SSE2__) -#define SCHED_VECTOR_SSE2 +#if defined(__SSE4__) +#define SCHED_VECTOR_SSE4 #endif #endif @@ -1672,7 +1672,7 @@ grinder_schedule(struct rte_sched_port *port, uint32_t pos) return 1; } -#ifdef SCHED_VECTOR_SSE2 +#ifdef SCHED_VECTOR_SSE4 static inline int grinder_pipe_exists(struct rte_sched_port *port, uint32_t base_pipe)