Skip to content

implement common bit operation APIs

Joyce Kong dpdk-dev 10 versions – Applied

Status from this message: Applied, thanks

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v10 Latest6 patches 4 repliesApplied
  2. v96 patches 5 repliesSuperseded
  3. v86 patches 4 repliesSuperseded
Earlier versions · 7
VersionPostedPatchesRepliesStatus
v76 patches8 repliesSuperseded
v66 patches15 repliesSuperseded
v56 patches6 repliesSuperseded
v46 patches1 replySuperseded
v36 patches2 repliesSuperseded
v26 patches11 repliesSuperseded
v15 patches16 repliesSuperseded

Changes in v10 from the cover letter

Rename the APIs of '_relaxed' suffix to 'rte_bit_relaxed_xx'. <Tomas Monjalon>

Patches in v10 Applied

#Subject and filesSizeRepliesApplied
1/6lib/eal: implement the family of common bit operation APIsMAINTAINERS doc/api/doxy-api-index.md lib/librte_eal/include/meson.build +1 more+265 -10 replies
2/6test/bitops: add bit operation test caseMAINTAINERS app/test/Makefile app/test/autotest_data.py +2 more+147 -00 replies
3/6net/axgbe: use common rte bit operation APIs insteaddrivers/net/axgbe/axgbe_common.h drivers/net/axgbe/axgbe_ethdev.c drivers/net/axgbe/axgbe_ethdev.h +1 more+17 -430 replies
4/6net/bnx2x: use common rte bit operation APIs insteaddrivers/net/bnx2x/bnx2x.c drivers/net/bnx2x/bnx2x.h drivers/net/bnx2x/ecore_sp.c +1 more+221 -2342 replies
5/6net/qede: use common rte bit operation APIs insteaddrivers/net/qede/base/bcm_osal.c drivers/net/qede/base/bcm_osal.h drivers/net/qede/base/ecore.h +10 more+56 -780 replies
6/6net/hinic: use common rte bit operation APIs insteaddrivers/net/hinic/Makefile drivers/net/hinic/base/hinic_compat.h drivers/net/hinic/hinic_pmd_ethdev.c +2 more+15 -411 reply

Reviews trailers per patch

All 6 patches have a Reviewed-by or Acked-by.

PatchGavin HuPhil YangMorten Brørup
1/6R-b R-b A-b
2/6R-b R-b
3/6R-b
4/6R-b
5/6R-b
6/6R-b

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 v10 thread

Cover letter [dpdk-dev] [PATCH v10 0/6] implement common bit operation APIs

v10:
Rename the APIs of '_relaxed' suffix to 'rte_bit_relaxed_xx'. <Tomas Monjalon>

v9:
1. Change '*addr = (*addr) | mask' to '*addr = val | mask'. <Morten Brørup>
2. Move 'rte_bitops.h' from 'device' section to 'basic' section in 'doxy-api-index.md'. <Jerin Jacob>

v8:
1. Change 'rte_pmd_bitops.h' to 'rte_bitops.h' allowing for future extension into other cases other than PMD only.
2. Replace omissive 'unsigned long' with 'uint32_t' to fix compling errors, the reason is the fact that 32-bit and 64-bit systems have different sized 'unsigned long', which caused incompatibility.

v7:
1. Change the API's head file to 'rte_pmd_bitops.h' as a common- but-not-public file.
2. Replace C11 atomic operations with 'volatile'. As the use cases are limited to PMDs, a 'volatile' is sufficient.

v5,v6:
Trim 'unsigned long' in PMDs down to 'uint32_t', as on mainstream 64-bit OS, 'unsigned long' is 64-bit in size, but the 32-bit OS expects 32-bit 'unsigned long' argument.

v4:
Introduce uint32_t/uint64_t *addr when definiting bit operation APIs.

v3:
1. Change the API's head file back to rte_bitops.h, then implement both 32-bit and 64-bit operations with and without C11 atomic memory ordering.
2. Add multi-core test case for bit operations which implemented with memory ordering.
3. Modify the doc of both APIs and test cases.

v2:
1. Add doxygen comments for the rte bit operation API.
2. Add test cases for common rte bit operation API.
3. Change the header file to rte_io_bitops.h and the operation to rte_io_set_bit() etc., as the API uses barriers inside and the barriers are only needed for IO operations.
4. Use an well defined uint_NN_t type.

Joyce Kong (6):
lib/eal: implement the family of common bit operation APIs test/bitops: add bit operation test case net/axgbe: use common rte bit operation APIs instead net/bnx2x: use common rte bit operation APIs instead net/qede: use common rte bit operation APIs instead net/hinic: use common rte bit operation APIs instead

 MAINTAINERS                               |   5 +
 app/test/Makefile                         |   1 +
 app/test/autotest_data.py                 |   6 +
 app/test/meson.build                      |   2 +
 app/test/test_bitops.c                    | 137 +++++++++++
 doc/api/doxy-api-index.md                 |   3 +-
 drivers/net/axgbe/axgbe_common.h          |  29 +--
 drivers/net/axgbe/axgbe_ethdev.c          |  14 +-
 drivers/net/axgbe/axgbe_ethdev.h          |   2 +-
 drivers/net/axgbe/axgbe_mdio.c            |  15 +-
 drivers/net/bnx2x/bnx2x.c                 | 271 +++++++++++-----------
 drivers/net/bnx2x/bnx2x.h                 |  10 +-
 drivers/net/bnx2x/ecore_sp.c              |  68 +++---
 drivers/net/bnx2x/ecore_sp.h              | 106 ++++-----
 drivers/net/hinic/Makefile                |   1 +
 drivers/net/hinic/base/hinic_compat.h     |  33 +--
 drivers/net/hinic/hinic_pmd_ethdev.c      |  18 +-
 drivers/net/hinic/hinic_pmd_ethdev.h      |   2 +-
 drivers/net/hinic/meson.build             |   2 +
 drivers/net/qede/base/bcm_osal.c          |  22 +-
 drivers/net/qede/base/bcm_osal.h          |  14 +-
 drivers/net/qede/base/ecore.h             |   6 +-
 drivers/net/qede/base/ecore_cxt.c         |   6 +-
 drivers/net/qede/base/ecore_dcbx.c        |   8 +-
 drivers/net/qede/base/ecore_dev.c         |  38 +--
 drivers/net/qede/base/ecore_dev_api.h     |   2 +-
 drivers/net/qede/base/ecore_l2.c          |   6 +-
 drivers/net/qede/base/ecore_mcp.c         |   4 +-
 drivers/net/qede/base/ecore_sp_commands.c |  12 +-
 drivers/net/qede/base/ecore_spq.c         |   2 +-
 drivers/net/qede/base/ecore_spq.h         |  10 +-
 drivers/net/qede/qede_main.c              |   4 +-
 lib/librte_eal/include/meson.build        |   1 +
 lib/librte_eal/include/rte_bitops.h       | 258 ++++++++++++++++++++
 34 files changed, 721 insertions(+), 397 deletions(-)
 create mode 100644 app/test/test_bitops.c
 create mode 100644 lib/librte_eal/include/rte_bitops.h
Signature · 1 line
2.17.1