Skip to content

RFC generalise rte_ring to allow different datatypes

Bruce Richardson dpdk-dev 2 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 RFC Latest4 patches 0 repliesNew
  2. v1 RFC11 patches 6 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4ring: create common ring fileslib/librte_ring/Makefile lib/librte_ring/rte_common_ring.c lib/librte_ring/rte_common_ring.h +1 more+1273 -12710 replies
2/4ring: separate common and rte_ring specific functionslib/librte_ring/Makefile lib/librte_ring/rte_common_ring.c lib/librte_ring/rte_common_ring.h +2 more+832 -4670 replies
3/4ring: allow common ring to use 8 or 16 byte valueslib/librte_ring/rte_common_ring.c lib/librte_ring/rte_common_ring.h lib/librte_ring/rte_ring.c +1 more+122 -500 replies
4/4ring: add new event ring classapp/test/Makefile app/test/test_event_ring.c lib/librte_ring/Makefile +2 more+869 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH RFCv2 0/4] generalise rte_ring to allow different datatypes

Following on from the previous RFC, this generalises the rte_ring structure using C constructs rather than using macros. The idea here is to have the size of the data objects passed in to all common functions and then switching the code paths, where necessary, based on those size parameters. For the standard rte_ring APIs, these work on void pointers, so the extra parameter is always specified as sizeof(void *). A new event_ring type is also added as a patch to test out creating and using rings with different size objects.

Comments welcome on this RFC, though I still hope to try out some other options, as I think there may be still better ways to achieve the same end.

Bruce Richardson (4):
ring: create common ring files
ring: separate common and rte_ring specific functions
ring: allow common ring to use 8 or 16 byte values
ring: add new event ring class

 app/test/Makefile                 |   1 +
 app/test/test_event_ring.c        |  83 ++++
 lib/librte_ring/Makefile          |   8 +-
 lib/librte_ring/rte_common_ring.c | 386 ++++++++++++++++
 lib/librte_ring/rte_common_ring.h | 925 ++++++++++++++++++++++++++++++++++++++
 lib/librte_ring/rte_event_ring.c  |  87 ++++
 lib/librte_ring/rte_event_ring.h  | 696 ++++++++++++++++++++++++++++
 lib/librte_ring/rte_ring.c        | 320 +------------
 lib/librte_ring/rte_ring.h        | 606 +------------------------
 9 files changed, 2210 insertions(+), 902 deletions(-)
 create mode 100644 app/test/test_event_ring.c
 create mode 100644 lib/librte_ring/rte_common_ring.c
 create mode 100644 lib/librte_ring/rte_common_ring.h
 create mode 100644 lib/librte_ring/rte_event_ring.c
 create mode 100644 lib/librte_ring/rte_event_ring.h
Signature · 1 line
2.9.3