From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v2] lib/librte_sched: Fix compile with gcc 4.3.4 Date: Wed, 02 Dec 2015 03:18:01 +0100 Message-ID: <5915028.hIVKuBcS7U@xps13> References: <1448534997-24297-1-git-send-email-michael.qiu@intel.com> <1449022194-25510-1-git-send-email-michael.qiu@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org To: Michael Qiu Return-path: Received: from mail-wm0-f54.google.com (mail-wm0-f54.google.com [74.125.82.54]) by dpdk.org (Postfix) with ESMTP id CDE2158DB for ; Wed, 2 Dec 2015 03:19:11 +0100 (CET) Received: by wmww144 with SMTP id w144so38088967wmw.0 for ; Tue, 01 Dec 2015 18:19:11 -0800 (PST) In-Reply-To: <1449022194-25510-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" 2015-12-02 10:09, Michael Qiu: > 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. > To avoid this issue, a gcc version check is need and a flag to indicate > vector ablility. It is another issue: we need SSE2 support. > --- a/lib/librte_sched/rte_sched.c > +++ b/lib/librte_sched/rte_sched.c > @@ -42,6 +42,7 @@ > #include > #include > #include > +#include Shouldn't be in #ifdef RTE_SCHED_VECTOR ? > #include "rte_sched.h" > #include "rte_bitmap.h" > @@ -53,7 +54,11 @@ > #endif > > #ifdef RTE_SCHED_VECTOR > -#include > + > +#if defined(__SSE2__) > +#define SCHED_VECTOR_ENABLE > +#endif I think the flag should SCHED_VECTOR_SSE2 With this fix, the need for disabling SCHED_VECTOR for non-x86 platforms should disappear. But it may be safe to disable it (another patch). Thanks