From mboxrd@z Thu Jan 1 00:00:00 1970 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind_com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:organization:user-agent :in-reply-to:references:mime-version:content-transfer-encoding :content-type; bh=i6rKdwWZhnpgl5zOVBsnDt5wJHI0p2cDxhqSE13DqwE=; b=e6zAmFM2iJnFH02xGZQpt+o27XU+QZYb269HXRPGnInsNHl6hhzk6idmZJjFb/F6bt a6LV9dNSXziXAwaU5Ta7X66t0ILR2ETH+20elInK3j0+OzODqmUiY6kxvn+SGwNTjoMu BbpEwYnhoyXGBnC9YG3N+Pj7JEUdo8h+8OvVjqmmMcnQm9A6fYu5DMIWOT2gWYcavPii ko6Mqat803wDtIFRgVGJJ5wXappdyWUJqxfEmqa6TFwEJCUezBy+ILYMjv7sMHIDOsj6 dsnRzK4GMKvH3YAOZlD1WMMLjH6R48iltMvyrNRKbw0rhtjP1TK7knpCvjHWVSuJNgmb dx8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=i6rKdwWZhnpgl5zOVBsnDt5wJHI0p2cDxhqSE13DqwE=; b=T4vsPkw8abrOCpaTBp2s8o5khcDaj8ZMzqIEsQbR+BM4nlM2jOpkJvuUzacldFjBTB QurzffhkUVlgvaoiqjUjfaj2U7gzB+ZbDhRCgJUIehvuwtBswRKDoze604lyEc6XIbBd qBnB5Zg1CIEw54S1/s/Bfn91meIAVFAEnyUlY1keChIl0k7rwwxnZQyTc+Q5s1Tp5bJG C5Uifht9Rz7HnerlTkMxeq4NQvcySakp+Rsw0e+dkl7xfCq8vUmP3KRcpZp3sLHiolNB 3VdBSNqTp9wJ4rbgCISjPzKvxdrDTXP+BlMcXk2L/4+qadG06BUgBNgK3FDdF0j83KL/ gbig== X-Gm-Message-State: ALoCoQkL9BVrlm0qVh9/XfvzP86bqjn83UeLBDQluSZlUhXgBwFnjc08DP2wK5RuCL9UmsvDHkDQ X-Received: by 10.28.18.194 with SMTP id 185mr11350440wms.44.1446455063939; Mon, 02 Nov 2015 01:04:23 -0800 (PST) Received: from xps13.localnet (106.202.154.77.rev.sfr.net. [77.154.202.106]) by smtp.gmail.com with ESMTPSA id p10sm21143818wjx.36.2015.11.02.01.04.22 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 02 Nov 2015 01:04:23 -0800 (PST) From: Thomas Monjalon To: "Xie, Huawei" Date: Mon, 02 Nov 2015 10:03:07 +0100 Message-ID: <1968638.mo21Nfa4WM@xps13> Organization: 6WIND User-Agent: KMail/4.14.10 (Linux/4.1.6-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: References: <1443537953-23917-1-git-send-email-huawei.xie@intel.com> <2074733.DLSOutviVq@xps13> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH v6 5/8] virtio: virtio vec rx 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: Mon, 02 Nov 2015 09:04:24 -0000 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.