Skip to content

use static_assert to catch build errors

Stephen Hemminger dpdk-dev 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest5 patches 9 repliesIn review
  2. v23 patches 18 repliesSuperseded

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5event/opdl: fix non-constant compile time assertiondrivers/event/opdl/opdl_ring.c+4 -13 replies
2/5net/sfc: fix non-constant expression in RTE_BUILD_BUG_ON()drivers/net/sfc/sfc_ef100_tx.c+5 -21 reply
3/5net/i40e: avoid using const variable in assertiondrivers/net/i40e/i40e_ethdev.h drivers/net/i40e/i40e_rxtx_vec_sse.c+5 -60 replies
4/5mempool: avoid floating point expression in static assertionlib/mempool/rte_mempool.c+1 -31 reply
5/5eal: replace out of bounds VLA with static_assertlib/eal/include/rte_common.h+2 -14 replies

Reviews trailers per patch

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

PatchBruce RichardsonTyler RetzlaffMorten BrørupAndrew Rybchenko
1/5A-b A-b
2/5A-b
3/5
4/5
5/5A-b A-b A-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 4 reviewers.

Read the v3 thread

Cover letter [PATCH v3 0/5] use static_assert to catch build errors

This series fixes a couple places where expressions that could not be evaluated as constant early in compiler passes were used. And then converts RTE_BUILD_BUG_ON() with static_assert.

static_assert() is more picky about the expression has to be a constant, which also catches some existing undefined behavior that pre-existed.

Stephen Hemminger (5):
event/opdl: fix non-constant compile time assertion net/sfc: fix non-constant expression in RTE_BUILD_BUG_ON() net/i40e: avoid using const variable in assertion
mempool: avoid floating point expression in static assertion
eal: replace out of bounds VLA with static_assert

 drivers/event/opdl/opdl_ring.c       |  5 ++++-
 drivers/net/i40e/i40e_ethdev.h       |  1 +
 drivers/net/i40e/i40e_rxtx_vec_sse.c | 10 ++++------
 drivers/net/sfc/sfc_ef100_tx.c       |  7 +++++--
 lib/eal/include/rte_common.h         |  3 ++-
 lib/mempool/rte_mempool.c            |  4 +---
 6 files changed, 17 insertions(+), 13 deletions(-)
Signature · 1 line
2.43.0