On Mon, 5 Oct 2026 19:30:36 -0700 Joshua Washington <[email protected]> wrote:
> Numerous components independently define the DIV_ROUND_UP macro, using > the same definition. Attempt to commonize by introducing > RTE_DIV_ROUND_UP to rte_common.h and replacing usages of DIV_ROUND_UP > with RTE_DIV_ROUND_UP. Similarly, replace DIV_CEIL, which is > functionally identical, to RTE_DIV_ROUND_UP. > > Changes in v4: > - eal: Fix merge conflict in release notes after rebase. > - various commits: add rte_common.h includes where missing to fix > compilation issues. > - opae: drop RTE_DIV_ROUND_UP change due to shered osdep file for RTE > and raw drivers. Looks good, some minor AI notes on commit messages and doc Review: [PATCH v4 00/15] division round up consolidation Series applies cleanly to main. Each patch touches a disjoint set of files, so with 01/15 first the series is bisect safe. Build of all affected drivers, dpdk-proc-info, dpdk-test and dpdk-test-compress-perf with -Dwerror=true is clean. No errors or warnings. Series Info: remaining private copies not covered by this series, candidates for a follow-up: drivers/raw/ifpga/base/opae_osdep.h DIV_ROUND_UP (map like cxgbe) drivers/crypto/ccp/ccp_dev.h CCP_DIV_ROUND_UP drivers/common/qat/dev/qat_dev_gen_lce.c LCE_DIV_ROUND_UP drivers/net/sfc/sfc_dp.h SFC_DIV_ROUND_UP drivers/common/sxe2/sxe2_osal.h SXE2_DIV_ROUND_UP drivers/common/cnxk/roc_platform.h PLT_DIV_CEIL sfc_efx base (EFX_DIV_ROUND_UP) is shared code and should stay. Patch 01/15 eal: introduce division round up macro Info: the Doxygen repeats itself. "Evaluated twice" is in @param d and again in the first @note; "non-negative" is in @param n and again in the second @note. Keep the @param text and drop the duplicate notes. The plain expression form (not a statement expression with typeof) is correct here: several converted users need an integer constant expression (array bound via BITS_TO_LONGS in rnp.h, MAX_KEY_DWORDS in hns3_fdir.c, CNIC_ILT_LINES in bnx2x.h). Patch 05/15 net/qede, 10/15 net/cxgbe, 11/15 net/ena Info: commit message says RTE_DIV_ROUND_UP "makes DIV_ROUND_UP redundant", but these patches keep DIV_ROUND_UP as an alias for base/ code. Say that instead, e.g.: Map DIV_ROUND_UP to RTE_DIV_ROUND_UP for the shared base code and use RTE_DIV_ROUND_UP directly elsewhere in the driver. Patch 05/15 net/qede Info: bcm_osal.h still defines RTE_ROUNDUP in the driver, squatting on the RTE_ namespace the same way the removed RTE_DIV_ROUND_UP did. RTE_ALIGN_MUL_CEIL() is the equivalent. Follow-up, not this series. Patch 06/15 net/rnp Info: nothing in DPDK defines BITS_TO_LONGS, so the new #ifndef guard does nothing; drop it.

