[v3,3/4] ppc: change cpuflag macros to compiler macros

Message ID 20200924081832.21581-4-radu.nicolau@intel.com (mailing list archive)
State Accepted, archived
Delegated to: David Marchand
Headers
Series Remove RTE_MACHINE_CPUFLAG_ macros |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Radu Nicolau Sept. 24, 2020, 8:18 a.m. UTC
  Replace use of RTE_MACHINE_CPUFLAG macros with regular compiler
macros, which are more complete than those provided by DPDK, and as such
it allows new instruction sets to be leveraged without having to do
extra work to set them up in DPDK.

Signed-off-by: Sean Morrissey <sean.morrissey@intel.com>
Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
---
 config/ppc/meson.build    | 2 --
 examples/l3fwd/l3fwd_em.c | 2 +-
 2 files changed, 1 insertion(+), 3 deletions(-)
  

Comments

David Christensen Oct. 5, 2020, 7:43 p.m. UTC | #1
On 9/24/20 1:18 AM, Radu Nicolau wrote:
> Replace use of RTE_MACHINE_CPUFLAG macros with regular compiler
> macros, which are more complete than those provided by DPDK, and as such
> it allows new instruction sets to be leveraged without having to do
> extra work to set them up in DPDK.
> 
> Signed-off-by: Sean Morrissey <sean.morrissey@intel.com>
> Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
> ---

Reviewed-by: David Christensen <drc@linux.vnet.ibm.com>
  

Patch

diff --git a/config/ppc/meson.build b/config/ppc/meson.build
index aa7d73d11..0d8da87e6 100644
--- a/config/ppc/meson.build
+++ b/config/ppc/meson.build
@@ -21,5 +21,3 @@  endif
 dpdk_conf.set('RTE_MAX_LCORE', 1536)
 dpdk_conf.set('RTE_MAX_NUMA_NODES', 32)
 dpdk_conf.set('RTE_CACHE_LINE_SIZE', 128)
-dpdk_conf.set('RTE_MACHINE_CPUFLAG_ALTIVEC', 1)
-dpdk_conf.set('RTE_MACHINE_CPUFLAG_VSX', 1)
diff --git a/examples/l3fwd/l3fwd_em.c b/examples/l3fwd/l3fwd_em.c
index 3b35fa3e5..c529dcd3e 100644
--- a/examples/l3fwd/l3fwd_em.c
+++ b/examples/l3fwd/l3fwd_em.c
@@ -231,7 +231,7 @@  em_mask_key(void *key, xmm_t mask)
 
 	return vandq_s32(data, mask);
 }
-#elif defined(RTE_MACHINE_CPUFLAG_ALTIVEC)
+#elif defined(__ALTIVEC__)
 static inline xmm_t
 em_mask_key(void *key, xmm_t mask)
 {