From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by dpdk.org (Postfix) with ESMTP id 5488D4C9C for ; Fri, 31 Aug 2018 03:48:07 +0200 (CEST) Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w7V1ilai097086 for ; Thu, 30 Aug 2018 21:48:06 -0400 Received: from e06smtp05.uk.ibm.com (e06smtp05.uk.ibm.com [195.75.94.101]) by mx0b-001b2d01.pphosted.com with ESMTP id 2m6t9pkpxa-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 30 Aug 2018 21:48:06 -0400 Received: from localhost by e06smtp05.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 31 Aug 2018 02:48:04 +0100 Received: from b06cxnps4074.portsmouth.uk.ibm.com (9.149.109.196) by e06smtp05.uk.ibm.com (192.168.101.135) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Fri, 31 Aug 2018 02:48:02 +0100 Received: from d06av24.portsmouth.uk.ibm.com (d06av24.portsmouth.uk.ibm.com [9.149.105.60]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w7V1m1sm34734296 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 31 Aug 2018 01:48:01 GMT Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B1F2642045; Fri, 31 Aug 2018 04:47:58 +0100 (BST) Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 4DC0D42041; Fri, 31 Aug 2018 04:47:56 +0100 (BST) Received: from ADMINIB2M8Q79C (unknown [9.186.104.45]) by d06av24.portsmouth.uk.ibm.com (Postfix) with ESMTP; Fri, 31 Aug 2018 04:47:55 +0100 (BST) From: "Chao Zhu" To: "'Christian Ehrhardt'" , , "'dev'" , "'Gowrishankar Muthukrishnan'" Cc: "'Luca Boccassi'" , "'Thomas Monjalon'" References: <20180830115959.28935-1-christian.ehrhardt@canonical.com> In-Reply-To: <20180830115959.28935-1-christian.ehrhardt@canonical.com> Date: Fri, 31 Aug 2018 09:48:00 +0800 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Outlook 15.0 Thread-Index: AQFYetgVW/82SkgRX1DnNZZw0yOVLKXQovHw Content-Language: zh-cn X-TM-AS-GCONF: 00 x-cbid: 18083101-0020-0000-0000-000002BF07E5 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18083101-0021-0000-0000-0000210C13EE Message-Id: <001c01d440cc$a84d20c0$f8e76240$@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-08-31_01:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1808310015 Subject: Re: [dpdk-dev] [PATCH v3] ppc64: fix compilation of when AltiVec is enabled X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Aug 2018 01:48:07 -0000 I think this patch is good enough to solve the confliction issue. > -----Original Message----- > From: Christian Ehrhardt [mailto:christian.ehrhardt@canonical.com] > Sent: 2018=E5=B9=B48=E6=9C=8830=E6=97=A5 20:00 > To: adrien.mazarguil@6wind.com; dev ; Gowrishankar > Muthukrishnan ; Chao Zhu > > Cc: Luca Boccassi ; Thomas Monjalon > ; Christian Ehrhardt > > Subject: [PATCH v3] ppc64: fix compilation of when AltiVec is enabled >=20 > The definition of almost any newer standard like --stc=3Dc11 will drop > __APPLCE_ALTIVEC__ which otherwise would be defined. > If that is the case then altivec.h will redefine bool to a type = conflicting with > those defined by stdbool.h. >=20 > This breaks compilation of 18.08 on ppc64 like: > mlx5_nl_flow.c:407:17: error: incompatible types when assigning > to type =E2=80=98__vector __bool int=E2=80=99 {aka = =E2=80=98__vector(4) __bool int=E2=80=99} > from type =E2=80=98int=E2=80=99 in_port_id_set =3D false; >=20 > Other alternatives were pursued on [1] but they always ended up being = more > complex than what would be appropriate for the issue we face. >=20 > [1]: http://mails.dpdk.org/archives/dev/2018-August/109926.html >=20 > Tested-by: Takeshi T Yoshimura > Reviewed-by: Adrien Mazarguil > Signed-off-by: Christian Ehrhardt > --- > .../common/include/arch/ppc_64/rte_memcpy.h | 11 > +++++++++++ > 1 file changed, 11 insertions(+) >=20 > diff --git a/lib/librte_eal/common/include/arch/ppc_64/rte_memcpy.h > b/lib/librte_eal/common/include/arch/ppc_64/rte_memcpy.h > index 75f74897b..0b3b89b56 100644 > --- a/lib/librte_eal/common/include/arch/ppc_64/rte_memcpy.h > +++ b/lib/librte_eal/common/include/arch/ppc_64/rte_memcpy.h > @@ -37,6 +37,17 @@ > #include > /*To include altivec.h, GCC version must >=3D 4.8 */ #include = > +/* > + * Compilation workaround for PPC64 targets when AltiVec is fully > + * enabled e.g. with std=3Dc11. Otherwise there would be a type = conflict > + * of "bool" between stdbool and altivec. > + */ > +#if defined(__PPC64__) && !defined(__APPLE_ALTIVEC__) #undef bool > + /* redefine as in stdbool.h */ > + #define bool _Bool > +#endif > + >=20 > #ifdef __cplusplus > extern "C" { > -- > 2.17.1 Acked-by: Chao Zhu