From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 699402B82 for ; Tue, 23 Aug 2016 09:33:23 +0200 (CEST) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga103.jf.intel.com with ESMTP; 23 Aug 2016 00:33:23 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,564,1464678000"; d="scan'208";a="869759005" Received: from yliu-dev.sh.intel.com (HELO yliu-dev) ([10.239.67.162]) by orsmga003.jf.intel.com with ESMTP; 23 Aug 2016 00:33:21 -0700 Date: Tue, 23 Aug 2016 15:43:05 +0800 From: Yuanhan Liu To: Jerin Jacob Cc: dev@dpdk.org, thomas.monjalon@6wind.com, bruce.richardson@intel.com, jianbo.liu@linaro.org, huawei.xie@intel.com Message-ID: <20160823074305.GI30752@yliu-dev.sh.intel.com> References: <1467722966-2572-1-git-send-email-jerin.jacob@caviumnetworks.com> <1467722966-2572-3-git-send-email-jerin.jacob@caviumnetworks.com> <20160818065231.GS30752@yliu-dev.sh.intel.com> <20160819032359.GA13130@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160819032359.GA13130@localhost.localdomain> User-Agent: Mutt/1.5.23 (2014-03-12) Subject: Re: [dpdk-dev] [PATCH v3 2/4] virtio: move SSE based Rx implementation to separate file 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, 23 Aug 2016 07:33:23 -0000 On Fri, Aug 19, 2016 at 08:54:00AM +0530, Jerin Jacob wrote: > On Thu, Aug 18, 2016 at 02:52:31PM +0800, Yuanhan Liu wrote: > > On Tue, Jul 05, 2016 at 06:19:24PM +0530, Jerin Jacob wrote: > > > Split out SSE instruction based virtio simple Rx > > > implementation to a separate file > > > > > > Signed-off-by: Jerin Jacob > > > > Hi, > > > > I was about to apply this set. I then did some build test and found a > > weird issue: it breaks the build with clang (ubuntu 16.04). > > > > drivers/net/virtio/virtio_rxtx_simple_sse.c:130:2: error: cast from 'const void *' to 'void *' drops const qualifier [-Werror,-Wcast-qual] > > _mm_prefetch((const void *)rused, _MM_HINT_T0); > > ^ > > /usr/lib/llvm-3.8/bin/../lib/clang/3.8.0/include/xmmintrin.h:684:58: note: expanded from macro '_mm_prefetch' > > #define _mm_prefetch(a, sel) (__builtin_prefetch((void *)(a), 0, (sel))) > > ^ > > 1 error generated. > > > > Weird enough I don't see this issue before this commit: the error > > line is exactly the same before and after this commit. > > Yes, I looked at the pre processed output as well, it comes as same before and > after this commit. > > > > > Another note is that _mm_prefetch() is actually with different prototype > > for gcc and clang. For gcc, we have: > > > > _mm_prefetch (const void *__P, enum _mm_hint __I) > > > > Any thoughts? > > How about replacing "_mm_prefetch((const void *)rused, _MM_HINT_T0)" > with "rte_prefetch0(rused)" to have same prototype and fix the issue > with clang? Yes, it should work. BTW, I have just sent out a patch for that. I will apply yours when that patch has been applied. --yliu