From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Qiu Subject: [PATCH v3] lib/librte_sched: Fix compile with gcc 4.3.4 Date: Wed, 2 Dec 2015 10:39:27 +0800 Message-ID: <1449023967-26069-1-git-send-email-michael.qiu@intel.com> References: <1448534997-24297-1-git-send-email-michael.qiu@intel.com> To: dev@dpdk.org Return-path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id D81D1DE6 for ; Wed, 2 Dec 2015 03:39:37 +0100 (CET) In-Reply-To: <1448534997-24297-1-git-send-email-michael.qiu@intel.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- v3 --> v2: reformat commit log move rte_vect.h inside RTE_SCHED_VECTOR v2 --> v1: include header file rte_vect.h instead of gcc version check change __AVX__ to __SSE2__ since all vector function are SSE2 related lib/librte_sched/rte_sched.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/librte_sched/rte_sched.c b/lib/librte_sched/rte_sched.c index d47cfc2..21ebf25 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) -- 1.9.3