From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io0-f172.google.com (mail-io0-f172.google.com [209.85.223.172]) by dpdk.org (Postfix) with ESMTP id EE44191F8 for ; Sat, 5 Dec 2015 23:28:05 +0100 (CET) Received: by iofh3 with SMTP id h3so149513343iof.3 for ; Sat, 05 Dec 2015 14:28:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:mime-version:content-type :content-transfer-encoding; bh=/711jC+okQV1mr57Bxm/ygZKt0mKDbJOPfx8iH6PGHw=; b=UMN00L2yklEyHl83b6vKGbyv086/b9uUJY31OpJcE60gQ5rtMcOOtLbAXF6+8eWMim e9TLbKedF4CEAP/UR36duAmF7CjnLUVQ+rh/iPlGKS2ylZU5+T72vXWuGtqLkfYsa7A5 tT3EaQGvYKcrwYPS1XwoyPF2uOBZs/vj21NrmN6+IR4W/bSOqHQO3q+SjR3CQJK6tpLu cxr05TPNF/OOarwC4gIbSOfnu26vTDGNdy3dbSvfB/PxcrROeoGoofpm8bDU3T5Jr5ro USJpbLhn6fNP0Ele96Ssac4LMsJtb12m9lMJH3piy/E7hWT8g7jMnwiNiEn59WmjEAGV qrGQ== X-Received: by 10.107.160.7 with SMTP id j7mr23206503ioe.52.1449354485464; Sat, 05 Dec 2015 14:28:05 -0800 (PST) Received: from localhost.localdomain.localdomain (23-91-250-175.cpe.distributel.net. [23.91.250.175]) by smtp.gmail.com with ESMTPSA id z6sm3718609ign.1.2015.12.05.14.28.03 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 05 Dec 2015 14:28:04 -0800 (PST) From: Mike Sowka To: dev@dpdk.org Date: Sat, 5 Dec 2015 17:27:56 -0500 Message-Id: <1449354476-8275-1-git-send-email-msowka@gmail.com> X-Mailer: git-send-email 2.1.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Mike Sowka Subject: [dpdk-dev] [PATCH] sched: fix build on Atom without SSE4 support 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: Sat, 05 Dec 2015 22:28:06 -0000 Thanks for the pointers Thomas. Here is a signed-off patch re-submission with some explanation, to the best of my experience. Irrelevant of the target, the preprocessor #ifdef SSE2 for the grinder_pipe_exists function is inadequate since the __mm_testz_si128 function requires SSE4.1, PTEST instruction described in https://en.wikipedia.org/wiki/SSE4#SSE4.1 (I do no have better spec reference). I have bumped the preprocessor #ifdef to require SSE4. The Atom N2600 does not have SSE4, http://ark.intel.com/products/58916, and so I had trouble building rte_sched with optimized version of grinder_pipe_exists, with following: error: inlining failed in call to always_inline _mm_testz_si128’: target specific option mismatch GCC 4.9 correctly identifies my target as not having SSE4, and with provided patch builds the non-optimized version of grinder_pipe_exists. Signed-off-by: Mike Sowka --- lib/librte_sched/rte_sched.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/librte_sched/rte_sched.c b/lib/librte_sched/rte_sched.c index 21ebf25..6f92aa6 100644 --- a/lib/librte_sched/rte_sched.c +++ b/lib/librte_sched/rte_sched.c @@ -55,8 +55,8 @@ #ifdef RTE_SCHED_VECTOR #include -#if defined(__SSE2__) -#define SCHED_VECTOR_SSE2 +#if defined(__SSE4__) +#define SCHED_VECTOR_SSE4 #endif #endif @@ -1672,7 +1672,7 @@ grinder_schedule(struct rte_sched_port *port, uint32_t pos) return 1; } -#ifdef SCHED_VECTOR_SSE2 +#ifdef SCHED_VECTOR_SSE4 static inline int grinder_pipe_exists(struct rte_sched_port *port, uint32_t base_pipe) -- 2.1.0