From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 46E722A6C for ; Tue, 27 Sep 2016 19:24:42 +0200 (CEST) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga103.fm.intel.com with ESMTP; 27 Sep 2016 10:24:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.30,405,1470726000"; d="scan'208";a="14287136" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga004.jf.intel.com with ESMTP; 27 Sep 2016 10:24:40 -0700 Received: from fmsmsx124.amr.corp.intel.com (10.18.125.39) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 27 Sep 2016 10:24:40 -0700 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by fmsmsx124.amr.corp.intel.com (10.18.125.39) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 27 Sep 2016 10:24:40 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.15]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.96]) with mapi id 14.03.0248.002; Wed, 28 Sep 2016 01:24:36 +0800 From: "Chen, Jing D" To: Yuanhan Liu , "dev@dpdk.org" CC: Jerin Jacob , "Liang, Cunming" , "Richardson, Bruce" , Thomas Monjalon Thread-Topic: [PATCH v3] net: fix build error with clang Thread-Index: AQHSF6570R1hl1tlkk2mT6BQmYFixqCMvWuAgADa15A= Date: Tue, 27 Sep 2016 17:24:35 +0000 Message-ID: <4341B239C0EFF9468EE453F9E9F4604D3A384822@shsmsx102.ccr.corp.intel.com> References: <1474611309-20325-1-git-send-email-yuanhan.liu@linux.intel.com> <1474864153-11847-1-git-send-email-yuanhan.liu@linux.intel.com> <20160927121951.GP25823@yliu-dev.sh.intel.com> In-Reply-To: <20160927121951.GP25823@yliu-dev.sh.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiOWMzMGIwODYtZjUyYi00OTBmLWFiODUtMjlkZmExM2QyMjFlIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6IkY3RWJkZ3NDZ1BlaFpFdFYrWnRSNGVtMEU5Wk41eXVTNUUrY2hVWjQ1Tzg9In0= x-ctpclassification: CTP_IC x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v3] net: fix build error with clang 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, 27 Sep 2016 17:24:42 -0000 Hi,=20 > -----Original Message----- > From: Yuanhan Liu [mailto:yuanhan.liu@linux.intel.com] > Sent: Tuesday, September 27, 2016 5:20 AM > To: dev@dpdk.org > Cc: Jerin Jacob ; Chen, Jing D > ; Liang, Cunming ; > Richardson, Bruce ; Thomas Monjalon > > Subject: Re: [PATCH v3] net: fix build error with clang >=20 > Can any PMD guys review it? It blocks a virtio patchset apply... >=20 > Thanks. >=20 > --yliu >=20 > On Mon, Sep 26, 2016 at 12:29:13PM +0800, Yuanhan Liu wrote: > > Interestingly, clang and gcc has different prototype for _mm_prefetch()= . > > For gcc, we have > > > > _mm_prefetch (const void *__P, enum _mm_hint __I) > > > > While for clang, it's > > > > #define _mm_prefetch(a, sel) (__builtin_prefetch((void *)(a), 0, > > (sel))) > > > > That's how the following error comes with clang: > > > > 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))) > > > > What's weird is that the build was actaully Okay before. I met it > > while apply Jerin's vector support for ARM patch set: he just move > > this peiece of code to another file, nothing else changed. > > > > This patch fix the issue when Jerin's patchset is applied. Thus, I > > think it's still needed. > > > > Similarly, make the same change to other _mm_prefetch users, just in > > case this weird issue shows up again somehow later. > > > > Fixes: fc3d66212fed ("virtio: add vector Rx") > > Fixes: c95584dc2b18 ("ixgbe: new vectorized functions for Rx/Tx") > > Fixes: 9ed94e5bb04e ("i40e: add vector Rx") > > Fixes: 7092be8437bd ("fm10k: add vector Rx") > > > > Cc: Jerin Jacob > > Cc: Chen Jing D(Mark) > > Cc: Cunming Liang > > Cc: Bruce Richardson > > CC: Thomas Monjalon > > Signed-off-by: Yuanhan Liu Acked-by: Jing Chen