Skip to content

eal: provide abstracted bit counting functions

Tyler Retzlaff dpdk-dev 8 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v8 Latest3 patches 2 repliesIn review
  2. v74 patches 1 replySuperseded
  3. v62 patches 7 repliesSuperseded
Earlier versions · 5
VersionPostedPatchesRepliesStatus
v52 patches0 repliesSuperseded
v42 patches5 repliesSuperseded
v33 patches5 repliesSuperseded
v22 patches32 repliesSuperseded
v12 patches1 replySuperseded

Changes in v8 from the cover letter

* squish patch including rte_bitops.h in lib/pipeline into first patch.

Patches in v8 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3eal: move bit count functions to bitops headerapp/test/test_common.c lib/eal/common/rte_reciprocal.c lib/eal/include/rte_bitops.h +2 more+295 -2930 replies
2/3eal: provide abstracted bit count functionsapp/test/meson.build app/test/test_bitcount.c lib/eal/include/rte_bitops.h+378 -00 replies
3/3maintainers: add bitcount test under EAL API and common codeMAINTAINERS+1 -00 replies

Reviews trailers per patch

2 of 3 patches have a Reviewed-by or Acked-by.

PatchFerruh YigitMorten BrørupBruce Richardson
1/3A-b A-b A-b
2/3A-b A-b
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v8 thread

Cover letter [PATCH v8 0/3] eal: provide abstracted bit counting functions

As discussed technical board meeting 2023-02-22
http://mails.dpdk.org/archives/dev/2023-February/263516.html

We will bring support in pieces for the MSVC compiler, there will be some abstractions and functions introduced before the compiler is capable of compiling DPDK in order to make parallel progress while waiting for standard atomics in 23.07.

A higher level plan / order of work is available in the Microsoft roadmap for 23.07 and 23.11.

note:
Bruce Richardson previous acks have been preserved but be aware of the two additional functions introduced in v7. If you wish to withdraw your ack, please let me know but I believe the 2 additions are consistent with previous.

v8:
* squish patch including rte_bitops.h in lib/pipeline into first patch.

v7:
* add 2 additional counting functions rte_popcount{32,64} including basic unit tests
* fix patch 1 title link (CI complained too long)
* add test_bitcount.c entry to MAINTAINERS file

v6:
* remove stray #include <stdio.h>

v5:
* fix implementation of msvc versions of rte_clz{32,64} incorrect use of _BitscanReverse{,64} index.
* fix and expand unit test to exercise full range of counting over uint{32,64}_t input values. (which would have caught above mistake).
* reduce commit title length
* correct commit author

v4:
* combine unit test commit into function addition commit

v3:
* rename to use 32/64 instead of l/ll suffixes
* add new functions to rte_bitops.h instead of new header
* move other bit functions from rte_common.h to rte_bitops.h

v2:
* use unsigned int instead of unsigned (checkpatches)
* match multiple include guard naming convention to rte_common.h
* add explicit extern "C" linkage to rte_bitcount.h
note: not really needed but checkpatches required
* add missing space around '-'

Tyler Retzlaff (3):
eal: move bit count functions to bitops header
eal: provide abstracted bit count functions
maintainers: add bitcount test under EAL API and common code

 MAINTAINERS                              |   1 +
 app/test/meson.build                     |   2 +
 app/test/test_bitcount.c                 | 136 ++++++++
 app/test/test_common.c                   |   1 +
 lib/eal/common/rte_reciprocal.c          |   1 +
 lib/eal/include/rte_bitops.h             | 532 +++++++++++++++++++++++++++++++
 lib/eal/include/rte_common.h             | 293 -----------------
 lib/pipeline/rte_swx_pipeline_internal.h |   1 +
 8 files changed, 674 insertions(+), 293 deletions(-)
 create mode 100644 app/test/test_bitcount.c
Signature · 1 line
1.8.3.1