From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by dpdk.org (Postfix) with ESMTP id 293761BE0 for ; Thu, 8 Nov 2018 10:47:02 +0100 (CET) Received: from pps.filterd (m0098394.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id wA89jFo5077818 for ; Thu, 8 Nov 2018 04:47:02 -0500 Received: from e06smtp01.uk.ibm.com (e06smtp01.uk.ibm.com [195.75.94.97]) by mx0a-001b2d01.pphosted.com with ESMTP id 2nmjb597e6-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 08 Nov 2018 04:47:01 -0500 Received: from localhost by e06smtp01.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 8 Nov 2018 09:46:59 -0000 Received: from b06cxnps3075.portsmouth.uk.ibm.com (9.149.109.195) by e06smtp01.uk.ibm.com (192.168.101.131) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Thu, 8 Nov 2018 09:46:56 -0000 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id wA89ktDC50331832 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 8 Nov 2018 09:46:55 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 68B2A4C040; Thu, 8 Nov 2018 09:46:55 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 79E444C05C; Thu, 8 Nov 2018 09:46:52 +0000 (GMT) Received: from DESKTOP7JL9IS1 (unknown [9.181.88.50]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTP; Thu, 8 Nov 2018 09:46:52 +0000 (GMT) From: "Chao Zhu" To: "'Thomas Monjalon'" , Cc: , , , , , , , References: <20180903092911.GU3695@6wind.com> <20181107160028.5938-1-thomas@monjalon.net> In-Reply-To: <20181107160028.5938-1-thomas@monjalon.net> Subject: 答复: [PATCH] net/mlx5: fix build on PPC64 Date: Thu, 8 Nov 2018 17:46:52 +0800 X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQDA7dojPfcWSIngEAzr7WtfEEx+EwIF0oXYp1yFVIA= Content-Language: zh-cn X-TM-AS-GCONF: 00 x-cbid: 18110809-4275-0000-0000-000002DD1B6D X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18110809-4276-0000-0000-000037EA4039 Message-Id: <006e01d47747$fc37b680$f4a72380$@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-11-08_06:, , 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-1811080085 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: Thu, 08 Nov 2018 09:47:03 -0000 > -----邮件原件----- > 发件人: Thomas Monjalon > 发送时间: 2018年11月8日 0:00 > 收件人: dev@dpdk.org > 抄送: christian.ehrhardt@canonical.com; adrien.mazarguil@6wind.com; > shahafs@mellanox.com; yskoh@mellanox.com; > gowrishankar.m@linux.vnet.ibm.com; chaozhu@linux.vnet.ibm.com; > pradeep@us.ibm.com; tyos@jp.ibm.com; dwilder@us.ibm.com > 主题: [PATCH] net/mlx5: fix build on PPC64 > > The AltiVec header file breaks boolean type: > > error: incompatible types when initializing type '__vector _bool int' {aka > '_vector(4) __bool int'} using type 'int' > > If __APPLE_ALTIVEC__ is defined, then bool type is redefined and conflicts > with stdbool.h. > > There is no good solution to fix it for the whole project without breaking > something else, so a workaround is inserted in mlx5 PMD. > This workaround is not compatible with C++ but there is no C++ in DPDK. > > Suggested-by: Christian Ehrhardt > Suggested-by: Adrien Mazarguil > Signed-off-by: Thomas Monjalon > --- > drivers/net/mlx5/mlx5_utils.h | 10 ++++++++++ > 1 file changed, 10 insertions(+) > > diff --git a/drivers/net/mlx5/mlx5_utils.h b/drivers/net/mlx5/mlx5_utils.h > index 886f60e61..97092c749 100644 > --- a/drivers/net/mlx5/mlx5_utils.h > +++ b/drivers/net/mlx5/mlx5_utils.h > @@ -15,6 +15,16 @@ > > #include "mlx5_defs.h" > > +/* > + * Compilation workaround for PPC64 when AltiVec is fully enabled, e.g. > std=c11. > + * Otherwise there would be a type conflict between stdbool and altivec. > + */ > +#if defined(__PPC64__) && !defined(__APPLE_ALTIVEC__) #undef bool > +/* redefine as in stdbool.h */ > +#define bool _Bool > +#endif > + > /* Bit-field manipulation. */ > #define BITFIELD_DECLARE(bf, type, size) \ > type bf[(((size_t)(size) / (sizeof(type) * CHAR_BIT)) + \ > -- > 2.19.0 Verified, it works. Thanks! Acked-by: Chao Zhu