Skip to content

Enforce checking on flag values in API's

Stephen Hemminger dpdk-dev 3 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. v3 Latest4 patches 7 repliesApplied
  2. v24 patches 3 repliesSuperseded
  3. v1 RFC4 patches 1 replySuperseded

Patches in v3 Applied

#Subject and filesSizeRepliesApplied
1/4ring: future proof flag settingslib/librte_ring/rte_ring.c+12 -01 reply
2/4hash: check flags on creationlib/librte_hash/rte_cuckoo_hash.c+14 -01 reply
3/4stack: check flags on creationlib/librte_stack/rte_stack.c+5 -01 reply
4/4cfgfile: check flags valuelib/librte_cfgfile/rte_cfgfile.c+4 -01 reply

Reviews trailers per patch

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

PatchHonnappa NagarahalliBruce RichardsonYipeng WangGage Eads
SeriesSeries-acked-by
1/4R-b
2/4A-b
3/4A-b
4/4A-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 [dpdk-dev] [PATCH v3 0/4] Enforce checking on flag values in API's

The DPDK API's are lax about checking for undefined flag values. This makes it impossible to add new bits to existing API's without causing ABI breakage. This means we end up doing unnecessary symbol versioning just to work around applications that might pass in naughty bits.

This is the DPDK analog of the Linux kernel openat() problem. Openat api was added but since kernel did not check flags it ended up that another syscall openat2() was necessary before the flags could be used.

v3 - define mask based on existing defines for ring and hash

Stephen Hemminger (4):
ring: future proof flag settings
hash: check flags on creation
stack: check flags on creation
cfgfile: check flags value

 lib/librte_cfgfile/rte_cfgfile.c  |  4 ++++
 lib/librte_hash/rte_cuckoo_hash.c | 14 ++++++++++++++
 lib/librte_ring/rte_ring.c        | 12 ++++++++++++
 lib/librte_stack/rte_stack.c      |  5 +++++
 4 files changed, 35 insertions(+)
Signature · 1 line
2.20.1