From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f41.google.com (mail-wm0-f41.google.com [74.125.82.41]) by dpdk.org (Postfix) with ESMTP id 29C875A31 for ; Fri, 27 Nov 2015 10:00:58 +0100 (CET) Received: by wmec201 with SMTP id c201so60757097wme.0 for ; Fri, 27 Nov 2015 01:00:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:organization:user-agent :in-reply-to:references:mime-version:content-transfer-encoding :content-type; bh=uoCb/4GtIMfMKun1N7OzBtTwEmoty5jH+Nnsn2mpu0k=; b=Hjh1gyzOJRstRy4sEfskAw347FfQBLTaAToeq2U+rYQLc5LBpJqlRomYzybUdnx4fG L9+izgbgkFux6LV6m/oQNyrXVlHz4VUzzbSL8TUJGTecB0gNM3qM/R9fpTj/zSDIO897 Ww2OiAyo2YR7NiJRAONuCmtOC3xc8cpROOhLbgnYhu9m8MndCV22lOO4H8WrnB4DXC21 NXwQlDle1mHd8V5V9sMnlNtpl2MleqLu3f7iTG2xt1SdEhEqkIx88nnmZAR5CzpeCOry WwTutQOA0EhnE417HT0k3efwZCAYAxKmc4Hnjge53Sy4B5Ao6ecR6AFKYeDDN9Zd0XCD CW/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=uoCb/4GtIMfMKun1N7OzBtTwEmoty5jH+Nnsn2mpu0k=; b=jprVe9H24U+oumf8T7fhly/hvrDvZ9i2XtnjMgXC/8TG3wVVwKgqHPvofvS1vwplyp PmDwklUELO8dZ/49G9AJDiXZjSB59I0Lp5iioAck1Aidrcy/hHGC9q19VZet5+m30hTV 7YpYB/eGF6NfsHI53KaJ44RInh2bfLd7DU97SLojgNKRikcm5hNZCXDIANmd9pF9GH3j Prk/9rCiwUOuSWaXxxuBklFiwQSKsQXerdZn53WLIk8Zyz/KFvQWfKi9HFqScF5L5ZDl P8B9W8T+KQIGjg+BuXjQR21DQ7XA4KkIoNIGIzWcgxREPZvDRaTNFyZVXhsIQ2Wtvsez Xx7A== X-Gm-Message-State: ALoCoQlbDQywyXHWzJgKbDdTKCVpvKwI871SgWtp9F7ZVDNDjDOCETgu4LCNrTkmZ5B/bLTdGT4v X-Received: by 10.194.24.70 with SMTP id s6mr5828524wjf.74.1448614857989; Fri, 27 Nov 2015 01:00:57 -0800 (PST) Received: from xps13.localnet (136-92-190-109.dsl.ovh.fr. [109.190.92.136]) by smtp.gmail.com with ESMTPSA id b82sm6480467wmf.9.2015.11.27.01.00.56 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 27 Nov 2015 01:00:57 -0800 (PST) From: Thomas Monjalon To: "Qiu, Michael" Date: Fri, 27 Nov 2015 09:59:38 +0100 Message-ID: <14808329.F48z9c4v47@xps13> Organization: 6WIND User-Agent: KMail/4.14.10 (Linux/4.1.6-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: <533710CFB86FA344BFBF2D6802E6028621B8CCF5@SHSMSX101.ccr.corp.intel.com> References: <1448534997-24297-1-git-send-email-michael.qiu@intel.com> <40264692.U54vlS2tjY@xps13> <533710CFB86FA344BFBF2D6802E6028621B8CCF5@SHSMSX101.ccr.corp.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH] lib/librte_sched: Fix compile with gcc 4.3.4 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Nov 2015 09:00:58 -0000 2015-11-27 02:26, Qiu, Michael: > On 2015/11/27 5:29, Thomas Monjalon wrote: > > 2015-11-26 18:49, 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 > >> > >> To avoid this issue, a gcc version check is need and a flag to indicate > >> vector ablility. > > [...] > >> +#if (defined(__ICC) || (__GNUC__ == 4 && __GNUC_MINOR__ < 4)) > >> + > >> +#if defined(__AVX__) > >> #include > >> +#define SCHED_VECTOR_ENABLE > >> +#endif > >> + > >> +#else > >> + > >> +#include > >> +#define SCHED_VECTOR_ENABLE > >> + > >> +#endif > > This kind of complication is managed by EAL. > > I think we should include rte_vect.h. > > As I know here it needs a flag to identify whether the platform support > AVX, if not it will not use it, so I don't know if we could only simply > include rte_vect.h? It's not exclusive. You can include rte_vect.h and check AVX to define SCHED_VECTOR_ENABLE.