eal/ppc: undefine AltiVec keyword vector
PATCH 1/1 eal/ppc: undefine AltiVec keyword vector
The AltiVec header file is defining "vector", except in C++ build. The keyword "vector" may conflict easily.
As a rule, it is better to use the alternative keyword "__vector".
The DPDK header file rte_altivec.h takes care of undefining "vector", so the applications and dependencies are free to define the name "vector".
This is a compatibility breakage for applications which were using the keyword "vector" for its AltiVec meaning.
--- doc/guides/rel_notes/release_22_07.rst | 5 +++++ lib/eal/ppc/include/rte_altivec.h | 7 +++++++ 2 files changed, 12 insertions(+)
doc/guides/rel_notes/release_22_07.rst +5 -0
@@ -133,6 +133,11 @@ API Changes Also, make sure to start the actual text at the margin. ======================================================= +* The DPDK header file ``rte_altivec.h``, + which is a wrapper for the PPC header file ``altivec.h``, + undefines the AltiVec keyword ``vector``. + The alternative keyword ``__vector`` should be used instead. + ABI Changes -----------
lib/eal/ppc/include/rte_altivec.h +7 -0
@@ -9,6 +9,13 @@/* To include altivec.h, GCC version must be >= 4.8 */ #include <altivec.h> +/* +* The keyword "vector" is defined in altivec.h, +* and often conflicts with code in applications or dependencies. +* It is preferred to use the alternative keyword "__vector". +*/ +#undef vector +/* * Compilation workaround for PPC64 when AltiVec is fully enabled, e.g. std=c11. * Otherwise there would be a type conflict between stdbool and altivec.
Signature · 1 line
2.36.0
Quoted 11 lines · Thomas Monjalon
The AltiVec header file is defining "vector", except in C++ build. The keyword "vector" may conflict easily.
As a rule, it is better to use the alternative keyword "__vector".The DPDK header file
rte_altivec.htakes care of undefining "vector", so the applications and dependencies are free to define the name "vector".This is a compatibility breakage for applications which were using the keyword "vector" for its AltiVec meaning.
Signed-off-by Thomas Monjalon <[email protected]>
Quoted 12 lines
-----Original Message-----
From: Thomas Monjalon <[email protected]>
Sent: Wednesday, May 25, 2022 12:53 PM
To: [email protected]
Cc: [email protected]; [email protected]; [email protected]; David Christensen <[email protected]>
Subject: [PATCH] eal/ppc: undefine AltiVec keyword vectorThe AltiVec header file is defining "vector", except in C++ build. The keyword "vector" may conflict easily.
As a rule, it is better to use the alternative keyword "__vector".
Quoted 8 lines
The DPDK header file
rte_altivec.htakes care of undefining "vector", so the applications and dependencies are free to define the name "vector".This is a compatibility breakage for applications which were using the keyword "vector" for its AltiVec meaning.
Signed-off-by Thomas Monjalon <[email protected]>---
Build passes with latest rdma-core master (36395896) on Ubuntu 20.04.4.
Thanks,
Ali
Quoted 24 lines
-----Original Message-----
From: Ali Alnubani
Sent: Wednesday, May 25, 2022 2:09 PM
To: Thomas Monjalon <[email protected]>; [email protected]
Cc: [email protected]; [email protected]; [email protected]; David Christensen <[email protected]>
Subject: RE: [PATCH] eal/ppc: undefine AltiVec keyword vectorQuoted 8 lines
-----Original Message-----
From: Thomas Monjalon <[email protected]>
Sent: Wednesday, May 25, 2022 12:53 PM
To: [email protected]
Cc: [email protected]; [email protected]; [email protected]; David Christensen <[email protected]>
Subject: [PATCH] eal/ppc: undefine AltiVec keyword vectorQuoted 6 lines
The AltiVec header file is defining "vector", except in C++ build. The keyword "vector" may conflict easily.
As a rule, it is better to use the alternative keyword "__vector".The DPDK header file
rte_altivec.htakes care of undefining "vector", so the applications and dependencies are free to define the name"vector".
Quoted 1 line
Quoted 7 lines
Quoted 5 lines
This is a compatibility breakage for applications which were using the keyword "vector" for its AltiVec meaning.
Signed-off-by Thomas Monjalon <[email protected]>---
Build passes with latest rdma-core master (36395896) on Ubuntu 20.04.4.
Compiler: powerpc64le-linux-gnu-gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
Quoted 5 lines
Tested-by Ali Alnubani <[email protected]>Thanks,
Ali
Quoted 7 lines · Thomas Monjalon
The AltiVec header file is defining "vector", except in C++ build. The keyword "vector" may conflict easily.
As a rule, it is better to use the alternative keyword "__vector".The DPDK header file
rte_altivec.htakes care of undefining "vector", so the applications and dependencies are free to define the name "vector".
Quoted 9 lines
This is a compatibility breakage for applications which were using the keyword "vector" for its AltiVec meaning.
Signed-off-by Thomas Monjalon <[email protected]>--- doc/guides/rel_notes/release_22_07.rst | 5 +++++ lib/eal/ppc/include/rte_altivec.h | 7 +++++++ 2 files changed, 12 insertions(+)
25/05/2022 13:48, Ray Kinsella:
Quoted 13 lines
Quoted 10 lines · Thomas Monjalon
The AltiVec header file is defining "vector", except in C++ build. The keyword "vector" may conflict easily.
As a rule, it is better to use the alternative keyword "__vector".The DPDK header file
rte_altivec.htakes care of undefining "vector", so the applications and dependencies are free to define the name "vector".This is a compatibility breakage for applications which were using the keyword "vector" for its AltiVec meaning.
Quoted 8 lines
Quoted 6 lines
Signed-off-by Thomas Monjalon <[email protected]>--- doc/guides/rel_notes/release_22_07.rst | 5 +++++ lib/eal/ppc/include/rte_altivec.h | 7 +++++++ 2 files changed, 12 insertions(+)Acked-by Ray Kinsella <[email protected]>
Just to make sure, we are all OK to break compatibility of rte_altivec.h? It means the keyword vector is not available anymore with this #include. Please confirm it is OK to merge in DPDK 22.07.
Quoted 21 lines · Thomas Monjalon
25/05/2022 13:48, Ray Kinsella:
Quoted 20 lines
Quoted 16 lines · Thomas Monjalon
The AltiVec header file is defining "vector", except in C++ build. The keyword "vector" may conflict easily.
As a rule, it is better to use the alternative keyword "__vector".The DPDK header file
rte_altivec.htakes care of undefining "vector", so the applications and dependencies are free to define the name "vector".This is a compatibility breakage for applications which were using the keyword "vector" for its AltiVec meaning.
Signed-off-by Thomas Monjalon <[email protected]>--- doc/guides/rel_notes/release_22_07.rst | 5 +++++ lib/eal/ppc/include/rte_altivec.h | 7 +++++++ 2 files changed, 12 insertions(+)
Quoted 5 lines
Quoted 1 line
Acked-by Ray Kinsella <[email protected]>Just to make sure, we are all OK to break compatibility of
rte_altivec.h? It means the keyword vector is not available anymore with this #include. Please confirm it is OK to merge in DPDK 22.07.
I did think about it yes ;-).
I can't see how it would break the ABI in the short term. And it makes sense to preclude this keyword in the long term.
So I ack'ed - did I miss something?
Signature · 1 line
Regards, Ray K
Tyler Retzlaff
Acked-byQuoted 30 lines · Ray Kinsella
Quoted 21 lines · Thomas Monjalon
25/05/2022 13:48, Ray Kinsella:
Quoted 20 lines
Quoted 16 lines · Thomas Monjalon
The AltiVec header file is defining "vector", except in C++ build. The keyword "vector" may conflict easily.
As a rule, it is better to use the alternative keyword "__vector".The DPDK header file
rte_altivec.htakes care of undefining "vector", so the applications and dependencies are free to define the name "vector".This is a compatibility breakage for applications which were using the keyword "vector" for its AltiVec meaning.
Signed-off-by Thomas Monjalon <[email protected]>--- doc/guides/rel_notes/release_22_07.rst | 5 +++++ lib/eal/ppc/include/rte_altivec.h | 7 +++++++ 2 files changed, 12 insertions(+)Quoted 5 lines
Quoted 1 line
Acked-by Ray Kinsella <[email protected]>Just to make sure, we are all OK to break compatibility of
rte_altivec.h? It means the keyword vector is not available anymore with this #include. Please confirm it is OK to merge in DPDK 22.07.
Quoted 5 lines
I did think about it yes ;-).
I can't see how it would break the ABI in the short term. And it makes sense to preclude this keyword in the long term.So I ack'ed - did I miss something?
double ack, impact of break is understood as follows.
* this is not an issue with abi it is an issue with api.
* the break will cause a compile failure, the action to resolve is to replace vector with __vector.
Quoted 4 lines
Signature · 2 lines
-- Regards, Ray K
25/05/2022 20:34, Tyler Retzlaff:
Quoted 34 lines · Ray Kinsella
Quoted 27 lines
Quoted 20 lines · Thomas Monjalon
25/05/2022 13:48, Ray Kinsella:
Quoted 19 lines
Quoted 16 lines · Thomas Monjalon
The AltiVec header file is defining "vector", except in C++ build. The keyword "vector" may conflict easily.
As a rule, it is better to use the alternative keyword "__vector".The DPDK header file
rte_altivec.htakes care of undefining "vector", so the applications and dependencies are free to define the name "vector".This is a compatibility breakage for applications which were using the keyword "vector" for its AltiVec meaning.
Signed-off-by Thomas Monjalon <[email protected]>--- doc/guides/rel_notes/release_22_07.rst | 5 +++++ lib/eal/ppc/include/rte_altivec.h | 7 +++++++ 2 files changed, 12 insertions(+)Quoted 5 lines
Quoted 1 line
Acked-by Ray Kinsella <[email protected]>Just to make sure, we are all OK to break compatibility of
rte_altivec.h? It means the keyword vector is not available anymore with this #include. Please confirm it is OK to merge in DPDK 22.07.Quoted 5 lines
I did think about it yes ;-).
I can't see how it would break the ABI in the short term. And it makes sense to preclude this keyword in the long term.So I ack'ed - did I miss something?
Quoted 7 lines
Acked-by Tyler Retzlaff <[email protected]>double ack, impact of break is understood as follows.
* this is not an issue with abi it is an issue with api.
* the break will cause a compile failure, the action to resolve is to replace vector with__vector.
Exactly
I'll wait few days or acks from the techboard, and will apply.
Quoted 39 lines · Thomas Monjalon
25/05/2022 20:34, Tyler Retzlaff:
Quoted 38 lines · Ray Kinsella
Quoted 27 lines
Quoted 20 lines · Thomas Monjalon
25/05/2022 13:48, Ray Kinsella:
Quoted 19 lines
Quoted 16 lines · Thomas Monjalon
The AltiVec header file is defining "vector", except in C++ build. The keyword "vector" may conflict easily.
As a rule, it is better to use the alternative keyword "__vector".The DPDK header file
rte_altivec.htakes care of undefining "vector", so the applications and dependencies are free to define the name "vector".This is a compatibility breakage for applications which were using the keyword "vector" for its AltiVec meaning.
Signed-off-by Thomas Monjalon <[email protected]>--- doc/guides/rel_notes/release_22_07.rst | 5 +++++ lib/eal/ppc/include/rte_altivec.h | 7 +++++++ 2 files changed, 12 insertions(+)Quoted 5 lines
Quoted 1 line
Acked-by Ray Kinsella <[email protected]>Just to make sure, we are all OK to break compatibility of
rte_altivec.h? It means the keyword vector is not available anymore with this #include. Please confirm it is OK to merge in DPDK 22.07.Quoted 5 lines
I did think about it yes ;-).
I can't see how it would break the ABI in the short term. And it makes sense to preclude this keyword in the long term.So I ack'ed - did I miss something?
Acked-by Tyler Retzlaff <[email protected]>double ack, impact of break is understood as follows.
Quoted 7 lines
Quoted 3 lines
* this is not an issue with abi it is an issue with api.
* the break will cause a compile failure, the action to resolve is to replace vector with__vector.Exactly
I'll wait few days or acks from the techboard, and will apply.
+1
Signature · 1 line
Regards, Ray K
Thomas Monjalon
Applied26/05/2022 13:02, Ray Kinsella:
Quoted 44 lines
Quoted 43 lines · Thomas Monjalon
25/05/2022 20:34, Tyler Retzlaff:
Quoted 41 lines · Ray Kinsella
Quoted 27 lines
Quoted 20 lines · Thomas Monjalon
25/05/2022 13:48, Ray Kinsella:
Quoted 19 lines
Quoted 16 lines · Thomas Monjalon
The AltiVec header file is defining "vector", except in C++ build. The keyword "vector" may conflict easily.
As a rule, it is better to use the alternative keyword "__vector".The DPDK header file
rte_altivec.htakes care of undefining "vector", so the applications and dependencies are free to define the name "vector".This is a compatibility breakage for applications which were using the keyword "vector" for its AltiVec meaning.
Signed-off-by Thomas Monjalon <[email protected]>--- doc/guides/rel_notes/release_22_07.rst | 5 +++++ lib/eal/ppc/include/rte_altivec.h | 7 +++++++ 2 files changed, 12 insertions(+)Quoted 5 lines
Quoted 1 line
Acked-by Ray Kinsella <[email protected]>Just to make sure, we are all OK to break compatibility of
rte_altivec.h? It means the keyword vector is not available anymore with this #include. Please confirm it is OK to merge in DPDK 22.07.Quoted 5 lines
I did think about it yes ;-).
I can't see how it would break the ABI in the short term. And it makes sense to preclude this keyword in the long term.So I ack'ed - did I miss something?
Acked-by Tyler Retzlaff <[email protected]>double ack, impact of break is understood as follows.
* this is not an issue with abi it is an issue with api.
* the break will cause a compile failure, the action to resolve is to replace vector with__vector.
Quoted 5 lines
Quoted 3 lines
Exactly
I'll wait few days or acks from the techboard, and will apply.
+1
Applied