From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <christian.ehrhardt@canonical.com>
Received: from youngberry.canonical.com (youngberry.canonical.com
 [91.189.89.112]) by dpdk.org (Postfix) with ESMTP id 81E6F2BF7
 for <dev@dpdk.org>; Thu, 30 Aug 2018 13:58:27 +0200 (CEST)
Received: from mail-oi0-f72.google.com ([209.85.218.72])
 by youngberry.canonical.com with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
 (Exim 4.76) (envelope-from <christian.ehrhardt@canonical.com>)
 id 1fvLal-00065u-7K for dev@dpdk.org; Thu, 30 Aug 2018 11:58:27 +0000
Received: by mail-oi0-f72.google.com with SMTP id w12-v6so7086114oie.12
 for <dev@dpdk.org>; Thu, 30 Aug 2018 04:58:27 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=WSKNH/hU4YmIGmE64583hw9xOCiakmmlVQfkw1fA/SI=;
 b=PjDjWeQtFE/WPmc3YK+UHODdTfWUXVcX/fG2H5l8nmfJ4unA4IYV+NE7SU8K8MCH5M
 iOKfplqMJLc0swzuzJhiW1aFmTl6E+CtXB1b4AtnXgO9LbFKFoSM67gnIeXYWq8yiAtN
 CyXb3054At6WARtsQVrWneF2oqvZzfpQ7CdCXcS21MSa4DFvwqvokbY0DCMGN74YvwRJ
 2qiwSxKsktqItqH84b/N2SMX0ugCrJvjyeasxqAqppciLh3x5gJoaiNkC6UWUSAbUBbX
 3S5EV5v0vByxLb+SSKQZnZbFmaS0cJVxAQ/I9qWjEOELOFSWuqdxofGVfNEParW9Ysqm
 3lGw==
X-Gm-Message-State: APzg51CnAE7o/mVJmshvOtUubIYfaz1gr9/fcrXpgFvoxO1ZSY5wa7QO
 CvwD+mLUognFHQp1UAXZwkzxDkylqheWDaRCmYiumeBD3F0wBXLZwCYGdGzOCD0AyI2i7+J/rQx
 7uvb+c4t/7WXmy0fSCqVE7mh6UJ0jobNQxjMm
X-Received: by 2002:aca:cd02:: with SMTP id
 d2-v6mr2297349oig.207.1535630306220; 
 Thu, 30 Aug 2018 04:58:26 -0700 (PDT)
X-Google-Smtp-Source: ANB0VdbsGVNtp1L9D6rPs4rAt6WxmMACaKtmwlnzBEg7RZ88rWj4wC8LIgCuGNiA7iyWMyDkl2r1o5ovgT3tSVwpTY8=
X-Received: by 2002:aca:cd02:: with SMTP id
 d2-v6mr2297328oig.207.1535630306041; 
 Thu, 30 Aug 2018 04:58:26 -0700 (PDT)
MIME-Version: 1.0
References: <CAATJJ0+p6vpYOjhch0M6e5eg0Mjh6Hun61KNGf+ScQ4veNCTdg@mail.gmail.com>
 <20180830100000.23984-1-christian.ehrhardt@canonical.com>
 <OF6F595576.B86A373C-ON002582F9.003A9ACA-002582F9.003BBD25@notes.na.collabserv.com>
In-Reply-To: <OF6F595576.B86A373C-ON002582F9.003A9ACA-002582F9.003BBD25@notes.na.collabserv.com>
From: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Date: Thu, 30 Aug 2018 13:58:00 +0200
Message-ID: <CAATJJ0LBPkOUvac_keA6bGMHfU6PGfcpHOoUmpJFpSDsyU+O_Q@mail.gmail.com>
To: TYOS@jp.ibm.com
Cc: adrien.mazarguil@6wind.com, dev <dev@dpdk.org>, 
 Gowrishankar Muthukrishnan <gowrishankar.m@linux.vnet.ibm.com>,
 Chao Zhu <chaozhu@linux.vnet.ibm.com>, 
 Luca Boccassi <bluca@debian.org>, Thomas Monjalon <thomasm@mellanox.com>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Content-Filtered-By: Mailman/MimeDel 2.1.15
Subject: Re: [dpdk-dev] [PATCH] 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 <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Thu, 30 Aug 2018 11:58:27 -0000

On Thu, Aug 30, 2018 at 12:52 PM Takeshi T Yoshimura <TYOS@jp.ibm.com>
wrote:

> >=E5=AE=9B=E5=85=88: adrien.mazarguil@6wind.com, dev <dev@dpdk.org>, Gowr=
ishankar
> >Muthukrishnan <gowrishankar.m@linux.vnet.ibm.com>, Chao Zhu
> ><chaozhu@linux.vnet.ibm.com>
> >=E9=80=81=E4=BF=A1=E5=85=83: Christian Ehrhardt
> >=E9=80=81=E4=BF=A1=E8=80=85: "dev"
> >=E6=97=A5=E4=BB=98: 2018/08/30 07:00PM
> >Cc: Luca Boccassi <bluca@debian.org>, Thomas Monjalon
> ><thomasm@mellanox.com>, Christian Ehrhardt
> ><christian.ehrhardt@canonical.com>
> >=E4=BB=B6=E5=90=8D: [dpdk-dev] [PATCH] ppc64: fix compilation of when Al=
tiVec is
> >enabled
> >
> >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.
> >
> >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;
> >
> >Other alternatives were pursued on [1] but they always ended up being
> >more
> >complex than what would be appropriate for the issue we face.
> >
> >[1]:
> >INVALID URI REMOVED
> >chives_dev_2018-2DAugust_109926.html&d=3DDwIDaQ&c=3Djf_iaSHvJObTbx-siA1Z=
O
> >g&r=3DEZR6Jx10q0q3dTopeH3WIQ&m=3DbbU1KVc1ZvNW9Rz7B0MLHfS0f0oZv35d2mpRpHO=
0
> >ByY&s=3DRvMIFfk-cAAGTrYM76-iSSqIYV_X2EptYZzYIweIHRk&e=3D
> >
> >Change-Id: I1ed56da954e4951b9d120ca2ac0c0c218b4a0140
> >Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
> >---
> > .../common/include/arch/ppc_64/rte_memcpy.h           | 11
> >+++++++++++
> > 1 file changed, 11 insertions(+)
> >
> >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 <string.h>
> > /*To include altivec.h, GCC version must  >=3D 4.8 */
> > #include <altivec.h>
> >+/*
> >+ * 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
> >+
> >
> > #ifdef __cplusplus
> > extern "C" {
> >--
> >2.17.1
> >
> >
> >
>
> Hi,
> I could reproduce the issue you reported in 18.08 with my ppc64le box wit=
h
> RedHat 7.5 and GCC4.8.
> The patch resolved the issue in my environment. Thanks!
>

I added your test (tanks) and Adrien's extensive review/discussion as tags
and also addressed a few checkpatch findings.
V2 is up on the list now ...


> I am a bit newbie in dpdk-dev, but I will try contacting Chao and other
> IBM guys... Sorry for our slow reply.
>

Thanks for your participation Takeshi,
we at least now have had a few replies after Thomas used the superpowers of
"CPT. CAPSLOCK" \o/.

I also have a call later today to make sure this is brought up inside IBM
to make sure someone is maintaining it for real.


> Regards,
> Takeshi
>
>

--=20
Christian Ehrhardt
Software Engineer, Ubuntu Server
Canonical Ltd