From: Michael Qiu Date: Wed, 2 Dec 2015 02:39:27 +0000 (+0800) Subject: sched: fix build with gcc 4.3.4 X-Git-Tag: spdx-start~7921 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=1985903e4454d9e7bc09f231c6a6b63f0eb05fb2;p=dpdk.git sched: fix build with gcc 4.3.4 gcc 4.3.4 does not include "immintrin.h", and will post below error: lib/librte_sched/rte_sched.c:56:23: error: immintrin.h: No such file or directory This compiler issue is fixed with rte_vect.h There is another issue, need SSE2 support Fixes: 42ec27a0178a ("sched: enable SSE optimizations in config") Signed-off-by: Michael Qiu --- diff --git a/lib/librte_sched/rte_sched.c b/lib/librte_sched/rte_sched.c index d47cfc2ac4..21ebf25338 100644 --- a/lib/librte_sched/rte_sched.c +++ b/lib/librte_sched/rte_sched.c @@ -53,7 +53,12 @@ #endif #ifdef RTE_SCHED_VECTOR -#include +#include + +#if defined(__SSE2__) +#define SCHED_VECTOR_SSE2 +#endif + #endif #define RTE_SCHED_TB_RATE_CONFIG_ERR (1e-7) @@ -1667,7 +1672,7 @@ grinder_schedule(struct rte_sched_port *port, uint32_t pos) return 1; } -#ifdef RTE_SCHED_VECTOR +#ifdef SCHED_VECTOR_SSE2 static inline int grinder_pipe_exists(struct rte_sched_port *port, uint32_t base_pipe)