Skip to content

eliminate dependency on non-portable __SIZEOF_LONG__

Andre Muezerie dpdk-dev 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest7 patches 5 repliesIn review
  2. v37 patches 6 repliesSuperseded
  3. v26 patches 0 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v16 patches3 repliesSuperseded

Changes in v4 from the cover letter

* rebased on latest main as previous patch was not applying cleanly anymore.

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7eal: eliminate dependency on non-portable __SIZEOF_LONG__lib/eal/include/rte_common.h+5 -00 replies
2/7drivers/bus: eliminate dependency on non-portable __SIZEOF_LONG__drivers/bus/fslmc/mc/fsl_mc_cmd.h+1 -20 replies
3/7drivers/common: eliminate dependency on non-portable __SIZEOF_LONG__drivers/common/cnxk/cnxk_security_ar.h drivers/common/cnxk/roc_bits.h drivers/common/cnxk/roc_ie_ot.h +3 more+16 -200 replies
4/7drivers/dma: eliminate dependency on non-portable __SIZEOF_LONG__drivers/dma/dpaa/dpaa_qdma.h drivers/dma/hisilicon/hisi_dmadev.h+2 -40 replies
5/7drivers/net: eliminate dependency on non-portable __SIZEOF_LONG__drivers/net/ena/base/ena_plat_dpdk.h drivers/net/hns3/hns3_ethdev.h+3 -60 replies
6/7drivers/raw: eliminate dependency on non-portable __SIZEOF_LONG__drivers/raw/ifpga/base/opae_osdep.h+4 -80 replies
7/7mldev: eliminate dependency on non-portable __SIZEOF_LONG__lib/mldev/mldev_utils_scalar.h+1 -50 replies

Reviews trailers per patch

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

PatchChaoyong He
1/7
2/7
3/7A-b
4/7
5/7
6/7
7/7

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

Read the v4 thread

Cover letter [PATCH v4 0/7] eliminate dependency on non-portable __SIZEOF_LONG__

Macro __SIZEOF_LONG__ is not standardized and MSVC does not define it. Therefore the errors below are seen with MSVC:

../lib/mldev/mldev_utils_scalar.c(465): error C2065:
'__SIZEOF_LONG__': undeclared identifier
../lib/mldev/mldev_utils_scalar.c(478): error C2051:
case expression not constant

../lib/mldev/mldev_utils_scalar_bfloat16.c(33): error C2065:
'__SIZEOF_LONG__': undeclared identifier
../lib/mldev/mldev_utils_scalar_bfloat16.c(49): error C2051:
case expression not constant

Turns out that the places where __SIZEOF_LONG__ is currently being used can equally well use sizeof(long) instead.

v4:
* rebased on latest main as previous patch was not applying cleanly anymore.

v3:
* added prefix RTE_ to BITS_PER_LONG* and moved them to rte_common.h
* defined PLT_BITS_PER_LONG* in drivers/common/cnxk/roc_platform.h to avoid warnings from checkpatches.sh like:

Warning in drivers/common/cnxk/roc_bits.h:
Warning in drivers/common/cnxk/roc_ie_ot.h:
Warning in drivers/common/cnxk/roc_ie_ot_tls.h:
Use plt_ symbols instead of rte_ API in cnxk base driver

It can be seen that the same was done in the past for similar macros like PLT_CACHE_LINE_SIZE

v2:
* fixed typo in commit message

Andre Muezerie (7):
eal: eliminate dependency on non-portable __SIZEOF_LONG__ drivers/bus: eliminate dependency on non-portable __SIZEOF_LONG__ drivers/common: eliminate dependency on non-portable __SIZEOF_LONG__ drivers/dma: eliminate dependency on non-portable __SIZEOF_LONG__ drivers/net: eliminate dependency on non-portable __SIZEOF_LONG__ drivers/raw: eliminate dependency on non-portable __SIZEOF_LONG__
mldev: eliminate dependency on non-portable __SIZEOF_LONG__

 drivers/bus/fslmc/mc/fsl_mc_cmd.h      |  3 +--
 drivers/common/cnxk/cnxk_security_ar.h |  4 ++--
 drivers/common/cnxk/roc_bits.h         | 13 ++++---------
 drivers/common/cnxk/roc_ie_ot.h        |  4 ++--
 drivers/common/cnxk/roc_ie_ot_tls.h    |  5 +++--
 drivers/common/cnxk/roc_platform.h     |  2 ++
 drivers/common/nfp/nfp_platform.h      |  8 +++-----
 drivers/dma/dpaa/dpaa_qdma.h           |  3 +--
 drivers/dma/hisilicon/hisi_dmadev.h    |  3 +--
 drivers/net/ena/base/ena_plat_dpdk.h   |  6 ++----
 drivers/net/hns3/hns3_ethdev.h         |  3 +--
 drivers/raw/ifpga/base/opae_osdep.h    | 12 ++++--------
 lib/eal/include/rte_common.h           |  5 +++++
 lib/mldev/mldev_utils_scalar.h         |  6 +-----
 14 files changed, 32 insertions(+), 45 deletions(-)

--
2.47.2.vfs.0.1