mbox

[v8,0/3] eal: provide abstracted bit counting functions

Message ID 1680567118-6435-1-git-send-email-roretzla@linux.microsoft.com (mailing list archive)
Headers

Message

Tyler Retzlaff April 4, 2023, 12:11 a.m. UTC
  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
  

Comments

David Marchand Aug. 25, 2023, 8:41 a.m. UTC | #1
On Tue, Apr 4, 2023 at 2:12 AM Tyler Retzlaff
<roretzla@linux.microsoft.com> wrote:
>
> 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.

I rebased this series following Bruce rework on app/test/ and applied it.
Thanks.