DPDK patches and discussions
 help / color / mirror / Atom feed
From: Matan Azrad <matan@mellanox.com>
To: Christian Ehrhardt <christian.ehrhardt@canonical.com>,
	dev <dev@dpdk.org>
Cc: Luca Boccassi <bluca@debian.org>,
	Thomas Monjalon <thomas@monjalon.net>,
	Frank Heimes <frank.heimes@canonical.com>,
	Raslan Darawsheh <rasland@mellanox.com>
Subject: Re: [dpdk-dev] [PATCH 1/1] net/mlx4: fix build on PPC64
Date: Sun, 1 Sep 2019 13:52:50 +0000	[thread overview]
Message-ID: <AM0PR0502MB4019803BBD7E90EB76A80B98D2BF0@AM0PR0502MB4019.eurprd05.prod.outlook.com> (raw)
In-Reply-To: <20190813112843.27072-2-christian.ehrhardt@canonical.com>

Hi

> From: dev <dev-bounces@dpdk.org> On Behalf Of Christian Ehrhardt
> 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.
> 
> Related to:
> https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgit.dp
> dk.org%2Fdpdk%2Fcommit%2F%3Fid%3D725f5dd0bfb50192a2d2341d4cc690
> 84c2c4e03d&amp;data=02%7C01%7Cmatan%40mellanox.com%7Ccaefd20ac0
> 39441c69a508d71fe16f1b%7Ca652971c7d2e4d9ba6a4d149256f461b%7C0%7C
> 0%7C637012925402095536&amp;sdata=RP9wpAJeUdQGfEvzqlDubKsj9hHw7
> 5fEgs0JVIMTfPc%3D&amp;reserved=0
> 
> Change-Id: Iceb058c07086def4176c5ab199ca4dd5018d0340

No need the Change-Id ...

> Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>

Besides that,
Acked-by: Matan Azrad <matan@mellanox.com>

Thanks

> ---
>  drivers/net/mlx4/mlx4_utils.h | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/drivers/net/mlx4/mlx4_utils.h b/drivers/net/mlx4/mlx4_utils.h
> index a49190252..74b9d2ecd 100644
> --- a/drivers/net/mlx4/mlx4_utils.h
> +++ b/drivers/net/mlx4/mlx4_utils.h
> @@ -15,6 +15,16 @@
> 
>  #include "mlx4.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
> +
>  extern int mlx4_logtype;
> 
>  #ifndef NDEBUG
> --
> 2.22.0


  parent reply	other threads:[~2019-09-01 13:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-13 11:28 [dpdk-dev] [PATCH 0/1] PPC64 buid error in 19.08 Christian Ehrhardt
2019-08-13 11:28 ` [dpdk-dev] [PATCH 1/1] net/mlx4: fix build on PPC64 Christian Ehrhardt
2019-08-13 23:49   ` David Christensen
2019-08-28 12:30     ` Christian Ehrhardt
2019-08-29 17:06       ` David Christensen
2019-09-01 13:52   ` Matan Azrad [this message]
2019-09-02 10:12   ` Raslan Darawsheh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AM0PR0502MB4019803BBD7E90EB76A80B98D2BF0@AM0PR0502MB4019.eurprd05.prod.outlook.com \
    --to=matan@mellanox.com \
    --cc=bluca@debian.org \
    --cc=christian.ehrhardt@canonical.com \
    --cc=dev@dpdk.org \
    --cc=frank.heimes@canonical.com \
    --cc=rasland@mellanox.com \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).