From patchwork Fri Nov 27 03:36:04 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Qiu X-Patchwork-Id: 9148 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 7F1C05A35; Fri, 27 Nov 2015 04:36:17 +0100 (CET) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 7C8245A08 for ; Fri, 27 Nov 2015 04:36:16 +0100 (CET) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga102.fm.intel.com with ESMTP; 26 Nov 2015 19:36:15 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,349,1444719600"; d="scan'208";a="695245039" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by orsmga003.jf.intel.com with ESMTP; 26 Nov 2015 19:36:15 -0800 Received: from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com [10.239.29.89]) by shvmail01.sh.intel.com with ESMTP id tAR3aDWH025630; Fri, 27 Nov 2015 11:36:13 +0800 Received: from shecgisg004.sh.intel.com (localhost [127.0.0.1]) by shecgisg004.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id tAR3a9Pj012846; Fri, 27 Nov 2015 11:36:11 +0800 Received: (from dayuqiu@localhost) by shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id tAR3a9LW012842; Fri, 27 Nov 2015 11:36:09 +0800 From: Michael Qiu To: dev@dpdk.org Date: Fri, 27 Nov 2015 11:36:04 +0800 Message-Id: <1448595365-12699-1-git-send-email-michael.qiu@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1448501706-21718-1-git-send-email-michael.qiu@intel.com> References: <1448501706-21718-1-git-send-email-michael.qiu@intel.com> Subject: [dpdk-dev] [PATCH 1/2 v2] examples/distributor: Fix compile issue 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" examples/distributor/main.c(338): error #167: argument of type "struct rte_mbuf *" is incompatible with parameter of type "const char *" _mm_prefetch(bufs[0], 0); The first param pass to _mm_prefetch is wrong, need convert "struct rte_mbuf *" to "void *". Fixes: 07db4a975094 ("examples/distributor: new sample app") Signed-off-by: Michael Qiu Acked-by: Pablo de Lara --- v2 --> v1: convert "const void *" to "void *" to avoid CLANG issue. add "Fixes" line in commit log examples/distributor/main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/distributor/main.c b/examples/distributor/main.c index 972bddb..a4d8e34 100644 --- a/examples/distributor/main.c +++ b/examples/distributor/main.c @@ -335,13 +335,13 @@ lcore_tx(struct rte_ring *in_r) /* for traffic we receive, queue it up for transmit */ uint16_t i; - _mm_prefetch(bufs[0], 0); - _mm_prefetch(bufs[1], 0); - _mm_prefetch(bufs[2], 0); + _mm_prefetch((void *)bufs[0], 0); + _mm_prefetch((void *)bufs[1], 0); + _mm_prefetch((void *)bufs[2], 0); for (i = 0; i < nb_rx; i++) { struct output_buffer *outbuf; uint8_t outp; - _mm_prefetch(bufs[i + 3], 0); + _mm_prefetch((void *)bufs[i + 3], 0); /* * workers should update in_port to hold the * output port value