* [dpdk-dev] [PATCH 0/1] PPC64 buid error in 19.08
@ 2019-08-13 11:28 Christian Ehrhardt
2019-08-13 11:28 ` [dpdk-dev] [PATCH 1/1] net/mlx4: fix build on PPC64 Christian Ehrhardt
0 siblings, 1 reply; 7+ messages in thread
From: Christian Ehrhardt @ 2019-08-13 11:28 UTC (permalink / raw)
To: dev; +Cc: Luca Boccassi, Thomas Monjalon, Frank Heimes, Christian Ehrhardt
A build of recent DPDK 19.08 on all Ubuntu architectures returned this on ppc64:
../drivers/net/mlx4/mlx4_rxtx.c: In function ‘mlx4_tx_burst’:
../drivers/net/mlx4/mlx4_rxtx.c:919:14: error: incompatible types when
initializing type ‘__vector __bool int’ {aka ‘__vector(4) __bool int’}
using type ‘int’
919 | bool tso = txq->priv->tso && (buf->ol_flags & PKT_TX_TCP_SEG);
| ^~~
../drivers/net/mlx4/mlx4_rxtx.c:938:7: error: used vector type where scalar
is required
938 | if (tso) {
| ^~~
Which reminds everyone of the sad caps-lock story [1] which happened on 18.08.
Back then the fix was [2] and a discussion around ppc64 support state
happened, given that it wasn't even build-tested before release.
We might have to have the same discussion again, but for now I provided
the fix for the build fail on mlx4 implemented the same way as it was
done on mlx5 [2].
[1]: https://mails.dpdk.org/archives/dev/2018-August/110472.html
[2]: https://git.dpdk.org/dpdk/commit/?id=725f5dd0bfb50192a2d2341d4cc69084c2c4e03d
Christian Ehrhardt (1):
net/mlx4: fix build on PPC64
drivers/net/mlx4/mlx4_utils.h | 10 ++++++++++
1 file changed, 10 insertions(+)
--
2.22.0
^ permalink raw reply [flat|nested] 7+ messages in thread
* [dpdk-dev] [PATCH 1/1] net/mlx4: fix build on PPC64
2019-08-13 11:28 [dpdk-dev] [PATCH 0/1] PPC64 buid error in 19.08 Christian Ehrhardt
@ 2019-08-13 11:28 ` Christian Ehrhardt
2019-08-13 23:49 ` David Christensen
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Christian Ehrhardt @ 2019-08-13 11:28 UTC (permalink / raw)
To: dev; +Cc: Luca Boccassi, Thomas Monjalon, Frank Heimes, 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://git.dpdk.org/dpdk/commit/?id=725f5dd0bfb50192a2d2341d4cc69084c2c4e03d
Change-Id: Iceb058c07086def4176c5ab199ca4dd5018d0340
Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
---
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [dpdk-dev] [PATCH 1/1] net/mlx4: fix build on PPC64
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-09-01 13:52 ` Matan Azrad
2019-09-02 10:12 ` Raslan Darawsheh
2 siblings, 1 reply; 7+ messages in thread
From: David Christensen @ 2019-08-13 23:49 UTC (permalink / raw)
To: Christian Ehrhardt, dev; +Cc: Luca Boccassi, Thomas Monjalon, Frank Heimes
On 8/13/19 4:28 AM, Christian Ehrhardt wrote:
> 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://git.dpdk.org/dpdk/commit/?id=725f5dd0bfb50192a2d2341d4cc69084c2c4e03d
>
> Change-Id: Iceb058c07086def4176c5ab199ca4dd5018d0340
> Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Tested-by: David Christensen <drc@linux.vnet.ibm.com>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [dpdk-dev] [PATCH 1/1] net/mlx4: fix build on PPC64
2019-08-13 23:49 ` David Christensen
@ 2019-08-28 12:30 ` Christian Ehrhardt
2019-08-29 17:06 ` David Christensen
0 siblings, 1 reply; 7+ messages in thread
From: Christian Ehrhardt @ 2019-08-28 12:30 UTC (permalink / raw)
To: David Christensen; +Cc: dev, Luca Boccassi, Thomas Monjalon, Frank Heimes
On Wed, Aug 14, 2019 at 1:49 AM David Christensen
<drc@linux.vnet.ibm.com> wrote:
>
> On 8/13/19 4:28 AM, Christian Ehrhardt wrote:
> > 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://git.dpdk.org/dpdk/commit/?id=725f5dd0bfb50192a2d2341d4cc69084c2c4e03d
> >
> > Change-Id: Iceb058c07086def4176c5ab199ca4dd5018d0340
> > Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
>
> Tested-by: David Christensen <drc@linux.vnet.ibm.com>
Thanks David, ping for considering inclusion into 19.11 ?
--
Christian Ehrhardt
Software Engineer, Ubuntu Server
Canonical Ltd
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [dpdk-dev] [PATCH 1/1] net/mlx4: fix build on PPC64
2019-08-28 12:30 ` Christian Ehrhardt
@ 2019-08-29 17:06 ` David Christensen
0 siblings, 0 replies; 7+ messages in thread
From: David Christensen @ 2019-08-29 17:06 UTC (permalink / raw)
To: Christian Ehrhardt, matan, shahafs
Cc: dev, Luca Boccassi, Thomas Monjalon, Frank Heimes
>>> 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://git.dpdk.org/dpdk/commit/?id=725f5dd0bfb50192a2d2341d4cc69084c2c4e03d
>>>
>>> Change-Id: Iceb058c07086def4176c5ab199ca4dd5018d0340
>>> Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
>>
>> Tested-by: David Christensen <drc@linux.vnet.ibm.com>
>
> Thanks David, ping for considering inclusion into 19.11 ?
Yes please. I had the same patch ready to submit but you beat me to the
punch.
Dave
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [dpdk-dev] [PATCH 1/1] net/mlx4: fix build on PPC64
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-09-01 13:52 ` Matan Azrad
2019-09-02 10:12 ` Raslan Darawsheh
2 siblings, 0 replies; 7+ messages in thread
From: Matan Azrad @ 2019-09-01 13:52 UTC (permalink / raw)
To: Christian Ehrhardt, dev
Cc: Luca Boccassi, Thomas Monjalon, Frank Heimes, Raslan Darawsheh
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&data=02%7C01%7Cmatan%40mellanox.com%7Ccaefd20ac0
> 39441c69a508d71fe16f1b%7Ca652971c7d2e4d9ba6a4d149256f461b%7C0%7C
> 0%7C637012925402095536&sdata=RP9wpAJeUdQGfEvzqlDubKsj9hHw7
> 5fEgs0JVIMTfPc%3D&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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [dpdk-dev] [PATCH 1/1] net/mlx4: fix build on PPC64
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-09-01 13:52 ` Matan Azrad
@ 2019-09-02 10:12 ` Raslan Darawsheh
2 siblings, 0 replies; 7+ messages in thread
From: Raslan Darawsheh @ 2019-09-02 10:12 UTC (permalink / raw)
To: Christian Ehrhardt, dev; +Cc: Luca Boccassi, Thomas Monjalon, Frank Heimes
Hi,
> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Christian Ehrhardt
> Sent: Tuesday, August 13, 2019 2:29 PM
> To: dev <dev@dpdk.org>
> Cc: Luca Boccassi <bluca@debian.org>; Thomas Monjalon
> <thomas@monjalon.net>; Frank Heimes <frank.heimes@canonical.com>;
> Christian Ehrhardt <christian.ehrhardt@canonical.com>
> Subject: [dpdk-dev] [PATCH 1/1] net/mlx4: 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.
>
> Related to:
> https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgit.dp
> dk.org%2Fdpdk%2Fcommit%2F%3Fid%3D725f5dd0bfb50192a2d2341d4cc690
> 84c2c4e03d&data=02%7C01%7Crasland%40mellanox.com%7C4617eec7
> ac6c4eb7bf7408d71fe17042%7Ca652971c7d2e4d9ba6a4d149256f461b%7C0%
> 7C0%7C637012925439283556&sdata=6tZDB%2F7%2Bq%2Fs%2FDsZksg6Z
> sAGTZcbufps84bT6wBe6nXs%3D&reserved=0
>
> Change-Id: Iceb058c07086def4176c5ab199ca4dd5018d0340
> Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
> ---
> drivers/net/mlx4/mlx4_utils.h | 10 ++++++++++
> 1 file changed, 10 insertions(+)
Patch applied to next-net-mlx after small change in the commit log:
1- removed Change ID.
2- replaced related to link with the SHA of the commit only
Kindest regards,
Raslan Darawsheh
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2019-09-02 10:12 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2019-09-02 10:12 ` Raslan Darawsheh
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).