Skip to content

Enhance CPU flag support

Bruce Richardson dpdk-dev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 9 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4build: fix quoting on RTE_ARCH string valueconfig/ppc_64/meson.build config/x86/meson.build+3 -31 reply
2/4config/arm: fix missing define for arm platformsconfig/arm/meson.build+2 -00 replies
3/4eal: allow checking CPU flags by namelib/librte_eal/common/eal_common_cpuflags.c lib/librte_eal/common/include/generic/rte_cpuflags.h lib/librte_eal/rte_eal_version.map+87 -13 replies
4/4net: replace ifdefs with runtime brancheslib/librte_net/rte_net_crc.c+25 -134 replies

Reviews trailers per patch

1 of 4 patches has a Reviewed-by or Acked-by.

PatchLuca Boccassi
1/4A-b
2/4
3/4
4/4

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [dpdk-dev] [PATCH 0/4] Enhance CPU flag support

Currently in DPDK, any checks for the presence or absense of specific CPU flags has to be enclosed in #ifdef blocks, since the flags are conditionally defined per architecture as enums. This set attempts to improve this situation by allowing the flags to be queried as strings, with a CPU architecture type also specified. One new public API is provided for this. [Other APIs used by that are internal for now, but have an rte_ prefix in case we want to expose them publically later]

To test out this new functionality the crc code in the net library is updated to use this, demonstrating how the code can be simplified and the use of #ifdef's reduced.

Bruce Richardson (4):
build: fix quoting on RTE_ARCH string value config/arm: fix missing define for arm platforms
eal: allow checking CPU flags by name
net: replace ifdefs with runtime branches

 config/arm/meson.build                        |  2 +
 config/ppc_64/meson.build                     |  2 +-
 config/x86/meson.build                        |  4 +-
 lib/librte_eal/common/eal_common_cpuflags.c   | 41 +++++++++++++++++
 .../common/include/generic/rte_cpuflags.h     | 44 ++++++++++++++++++-
 lib/librte_eal/rte_eal_version.map            |  3 ++
 lib/librte_net/rte_net_crc.c                  | 38 ++++++++++------
 7 files changed, 117 insertions(+), 17 deletions(-)
Signature · 1 line
2.21.0