From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.tuxdriver.com (charlotte.tuxdriver.com [70.61.120.58]) by dpdk.org (Postfix) with ESMTP id A62933F9 for ; Tue, 16 Dec 2014 14:51:54 +0100 (CET) Received: from hmsreliant.think-freely.org ([2001:470:8:a08:7aac:c0ff:fec2:933b] helo=localhost) by smtp.tuxdriver.com with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.63) (envelope-from ) id 1Y0sXX-0005G4-57; Tue, 16 Dec 2014 08:51:53 -0500 Date: Tue, 16 Dec 2014 08:51:45 -0500 From: Neil Horman To: Konstantin Ananyev Message-ID: <20141216135145.GB13806@hmsreliant.think-freely.org> References: <1418580659-12595-1-git-send-email-konstantin.ananyev@intel.com> <1418580659-12595-18-git-send-email-konstantin.ananyev@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1418580659-12595-18-git-send-email-konstantin.ananyev@intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Score: -2.9 (--) X-Spam-Status: No Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH 17/17] libte_acl: fix compilation issues with RTE_LIBRTE_ACL_STANDALONE=y. 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: Tue, 16 Dec 2014 13:51:54 -0000 On Sun, Dec 14, 2014 at 06:10:59PM +0000, Konstantin Ananyev wrote: > Signed-off-by: Konstantin Ananyev > --- > lib/librte_acl/rte_acl_osdep_alone.h | 47 ++++++++++++++++++++++++++++++++++-- > 1 file changed, 45 insertions(+), 2 deletions(-) > > diff --git a/lib/librte_acl/rte_acl_osdep_alone.h b/lib/librte_acl/rte_acl_osdep_alone.h > index a84b6f9..58c4f6a 100644 > --- a/lib/librte_acl/rte_acl_osdep_alone.h > +++ b/lib/librte_acl/rte_acl_osdep_alone.h > @@ -57,6 +57,10 @@ > #include > #endif > > +#if defined(__AVX__) > +#include > +#endif > + > #else > > #include > @@ -128,8 +132,8 @@ typedef __m128i xmm_t; > #define XMM_SIZE (sizeof(xmm_t)) > #define XMM_MASK (XMM_SIZE - 1) > > -typedef union rte_mmsse { > - xmm_t m; > +typedef union rte_xmm { > + xmm_t x; > uint8_t u8[XMM_SIZE / sizeof(uint8_t)]; > uint16_t u16[XMM_SIZE / sizeof(uint16_t)]; > uint32_t u32[XMM_SIZE / sizeof(uint32_t)]; > @@ -137,6 +141,33 @@ typedef union rte_mmsse { > double pd[XMM_SIZE / sizeof(double)]; > } rte_xmm_t; > > +#ifdef __AVX__ > + > +typedef __m256i ymm_t; > + > +#define YMM_SIZE (sizeof(ymm_t)) > +#define YMM_MASK (YMM_SIZE - 1) > + > +typedef union rte_ymm { > + ymm_t y; > + xmm_t x[YMM_SIZE / sizeof(xmm_t)]; > + uint8_t u8[YMM_SIZE / sizeof(uint8_t)]; > + uint16_t u16[YMM_SIZE / sizeof(uint16_t)]; > + uint32_t u32[YMM_SIZE / sizeof(uint32_t)]; > + uint64_t u64[YMM_SIZE / sizeof(uint64_t)]; > + double pd[YMM_SIZE / sizeof(double)]; > +} rte_ymm_t; > + > +#endif /* __AVX__ */ > + > +#ifdef RTE_ARCH_I686 > +#define _mm_cvtsi128_si64(a) ({ \ > + rte_xmm_t m; \ > + m.x = (a); \ > + (m.u64[0]); \ > +}) > +#endif > + > /* > * rte_cycles related. > */ > @@ -214,6 +245,13 @@ rte_rdtsc(void) > /* > * rte_tailq related. > */ > + > +struct rte_tailq_entry { > + TAILQ_ENTRY(rte_tailq_entry) next; /**< Pointer entries for a tailq list > + */ > + void *data; /**< Pointer to the data referenced by this tailq entry */ > +}; > + > static inline void * > rte_dummy_tailq(void) > { > @@ -248,6 +286,7 @@ rte_zmalloc_socket(__rte_unused const char *type, size_t size, unsigned align, > void *ptr; > int rc; > > + align = (align != 0) ? align : RTE_CACHE_LINE_SIZE; > rc = posix_memalign(&ptr, align, size); > if (rc != 0) { > rte_errno = rc; > @@ -258,6 +297,8 @@ rte_zmalloc_socket(__rte_unused const char *type, size_t size, unsigned align, > return ptr; > } > > +#define rte_zmalloc(type, sz, align) rte_zmalloc_socket(type, sz, align, 0) > + > /* > * rte_debug related > */ > @@ -271,6 +312,8 @@ rte_zmalloc_socket(__rte_unused const char *type, size_t size, unsigned align, > exit(err); \ > } while (0) > > +#define rte_cpu_get_flag_enabled(x) (0) > + > #ifdef __cplusplus > } > #endif > -- > 1.8.5.3 > > I think you should merge these changes with patch 10 where the problem was introduced, so that you avoid a FTBFS issue Neil