mbox series

[v1,0/4] Remove RTE_MACHINE_CPUFLAG_ macros

Message ID 20200902104343.31774-1-radu.nicolau@intel.com (mailing list archive)
Headers
Series Remove RTE_MACHINE_CPUFLAG_ macros |

Message

Radu Nicolau Sept. 2, 2020, 10:43 a.m. UTC
  Remove RTE_MACHINE_CPUFLAG_ macros from the build.
Deprecation notice sent, pasted here for reference:

  build macros: The macros defining RTE_MACHINE_CPUFLAG_* will be removed
  from the build. The information provided by these macros is available
  through standard compiler macros. For example, RTE_MACHINE_CPUFLAG_SSE3
  duplicates the compiler-provided macro __SSE3__.

Radu Nicolau (4):
  x86: change cpuflag macros to compiler macros
  arm: change cpuflag macros to compiler macros
  ppc: change cpuflag macros to compiler macros
  doc: remove reference to RTE_MACHINE_CPUFLAG

 app/test-pmd/macswap.c                           |  2 +-
 app/test/test_memcpy_perf.c                      |  8 ++++----
 config/arm/meson.build                           |  6 ------
 config/ppc/meson.build                           |  2 --
 config/x86/meson.build                           |  2 --
 doc/guides/prog_guide/writing_efficient_code.rst |  2 +-
 drivers/net/enic/Makefile                        |  2 +-
 drivers/net/enic/meson.build                     |  2 +-
 drivers/net/i40e/Makefile                        |  2 +-
 drivers/net/i40e/meson.build                     |  2 +-
 drivers/net/iavf/Makefile                        |  2 +-
 drivers/net/iavf/meson.build                     |  2 +-
 drivers/net/ice/Makefile                         |  2 +-
 drivers/net/ice/meson.build                      |  2 +-
 drivers/net/ixgbe/ixgbe_ethdev.c                 |  2 +-
 examples/l3fwd/l3fwd.h                           |  2 +-
 examples/l3fwd/l3fwd_em.c                        | 16 ++++++++--------
 examples/l3fwd/l3fwd_em_hlm.h                    |  2 +-
 examples/l3fwd/l3fwd_em_sequential.h             |  2 +-
 examples/l3fwd/l3fwd_lpm.c                       |  6 +++---
 lib/librte_acl/Makefile                          |  2 +-
 lib/librte_acl/meson.build                       |  2 +-
 lib/librte_eal/arm/include/rte_memcpy_32.h       |  2 +-
 lib/librte_eal/common/rte_random.c               |  4 ++--
 lib/librte_eal/x86/include/rte_memcpy.h          |  8 ++++----
 lib/librte_efd/rte_efd_x86.h                     |  2 +-
 lib/librte_hash/Makefile                         |  2 +-
 lib/librte_hash/rte_cuckoo_hash.c                |  4 ++--
 lib/librte_hash/rte_hash_crc.h                   |  2 +-
 lib/librte_hash/rte_thash.h                      |  4 ++--
 lib/librte_member/rte_member.h                   |  2 +-
 lib/librte_member/rte_member_ht.c                | 10 +++++-----
 lib/librte_member/rte_member_x86.h               |  2 +-
 lib/librte_net/rte_net_crc.c                     |  4 ++--
 lib/librte_node/ip4_lookup.c                     |  2 +-
 lib/librte_sched/rte_sched.c                     |  2 +-
 lib/librte_table/rte_lru_arm64.h                 |  2 +-
 lib/librte_table/rte_table_hash_func.h           |  2 +-
 mk/rte.cpuflags.mk                               |  1 -
 39 files changed, 58 insertions(+), 69 deletions(-)
  

Comments

David Christensen Sept. 2, 2020, 4:57 p.m. UTC | #1
On 9/2/20 3:43 AM, Radu Nicolau wrote:
> Remove RTE_MACHINE_CPUFLAG_ macros from the build.
> Deprecation notice sent, pasted here for reference:
> 
>    build macros: The macros defining RTE_MACHINE_CPUFLAG_* will be removed
>    from the build. The information provided by these macros is available
>    through standard compiler macros. For example, RTE_MACHINE_CPUFLAG_SSE3
>    duplicates the compiler-provided macro __SSE3__.
> 
> Radu Nicolau (4):
>    x86: change cpuflag macros to compiler macros
>    arm: change cpuflag macros to compiler macros
>    ppc: change cpuflag macros to compiler macros
>    doc: remove reference to RTE_MACHINE_CPUFLAG

I'm not too familiar with clang and icc.  Do all compilers use the same 
macro definitions for the same CPU features?  I would have thought the 
RTE_* definitions were there because there are compiler or compiler 
version differences that need to be supported.

Dave
  
Radu Nicolau Sept. 3, 2020, 9:48 a.m. UTC | #2
On 9/2/2020 5:57 PM, David Christensen wrote:
> On 9/2/20 3:43 AM, Radu Nicolau wrote:
>> Remove RTE_MACHINE_CPUFLAG_ macros from the build.
>> Deprecation notice sent, pasted here for reference:
>>
>>    build macros: The macros defining RTE_MACHINE_CPUFLAG_* will be 
>> removed
>>    from the build. The information provided by these macros is available
>>    through standard compiler macros. For example, 
>> RTE_MACHINE_CPUFLAG_SSE3
>>    duplicates the compiler-provided macro __SSE3__.
>>
>> Radu Nicolau (4):
>>    x86: change cpuflag macros to compiler macros
>>    arm: change cpuflag macros to compiler macros
>>    ppc: change cpuflag macros to compiler macros
>>    doc: remove reference to RTE_MACHINE_CPUFLAG
>
> I'm not too familiar with clang and icc.  Do all compilers use the 
> same macro definitions for the same CPU features?  I would have 
> thought the RTE_* definitions were there because there are compiler or 
> compiler version differences that need to be supported.
>
> Dave

All supported compilers should have these defines, and the 
RTE_MACHINE_CPU macros were defined based on the compiler defined 
macros, as an unnecessary extra step.

Furthermore, as per Bruce's comment, new features will be easily 
implemented directly in the relevant sections without needing to update 
the build system.
  
David Marchand Sept. 15, 2020, 2:28 p.m. UTC | #3
Hello Radu,

On Wed, Sep 2, 2020 at 12:43 PM Radu Nicolau <radu.nicolau@intel.com> wrote:
>
> Remove RTE_MACHINE_CPUFLAG_ macros from the build.
> Deprecation notice sent, pasted here for reference:
>
>   build macros: The macros defining RTE_MACHINE_CPUFLAG_* will be removed
>   from the build. The information provided by these macros is available
>   through standard compiler macros. For example, RTE_MACHINE_CPUFLAG_SSE3
>   duplicates the compiler-provided macro __SSE3__.
>
> Radu Nicolau (4):
>   x86: change cpuflag macros to compiler macros
>   arm: change cpuflag macros to compiler macros
>   ppc: change cpuflag macros to compiler macros
>   doc: remove reference to RTE_MACHINE_CPUFLAG

Expecting a v2 to address Bruce comment.
Thanks.