From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v6 5/8] virtio: virtio vec rx Date: Mon, 02 Nov 2015 10:03:07 +0100 Message-ID: <1968638.mo21Nfa4WM@xps13> References: <1443537953-23917-1-git-send-email-huawei.xie@intel.com> <2074733.DLSOutviVq@xps13> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org To: "Xie, Huawei" Return-path: Received: from mail-wm0-f43.google.com (mail-wm0-f43.google.com [74.125.82.43]) by dpdk.org (Postfix) with ESMTP id 22B6D5A56 for ; Mon, 2 Nov 2015 10:04:24 +0100 (CET) Received: by wmff134 with SMTP id f134so52908214wmf.1 for ; Mon, 02 Nov 2015 01:04:24 -0800 (PST) In-Reply-To: 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" 2015-11-02 08:49, Xie, Huawei: > On 11/2/2015 3:31 PM, Thomas Monjalon wrote: > > 2015-11-02 02:18, Xie, Huawei: > >> On 10/31/2015 2:21 AM, Thomas Monjalon wrote: > >>> Sorry, there is a clang error. > >>> > >>> 2015-10-29 22:53, Huawei Xie: > >>>> + _mm_prefetch((const void *)rused, _MM_HINT_T0); > >>> virtio_rxtx_simple.c:197:2: error: cast from 'const void *' to > >>> 'void *' drops const qualifier > >> This is weird. This conversion is actually from 'void *' to 'const void > >> *', not the opposite, so there should be no error. > >> I checked clang build, it doesn't report error. > >> clang version 3.3 (tags/RELEASE_33/rc2) > > I'm using clang 3.6.2. > > Anybody else to check please? > Thomas: > > I checked clang-3.5 on Fedora 22 and clang-3.6 on Ubuntu 15.04. > Clang-3.6 reports warnings, but the definition of this macro doesn't change. > > Why (const void*) conversion is used in the code is because when > __OPTIMIZE__ is defined, GCC defines first parameter to be "const void *". > > Could you add the following macro(used in other vec pmds as well) before > virtqueue_enqueue_recv_refill_simple or do i need to submit a new patchset? > > +#ifndef __INTEL_COMPILER > +#pragma GCC diagnostic ignored "-Wcast-qual" > +#endif OK I'll try it.