> From: Honnappa Nagarahalli [mailto:honnappa.nagaraha...@arm.com]
> Sent: Monday, 21 August 2023 08.04
> 
> Add a single thread safe and multi-thread unsafe ring data structure.
> This library provides an simple and efficient alternative to multi-
> thread
> safe ring when multi-thread safety is not required.
> 
> Signed-off-by: Honnappa Nagarahalli <honnappa.nagaraha...@arm.com>
> ---

Good idea.

However, I prefer it to be implemented in the ring lib as one more ring type. 
That would also give us a lot of the infrastructure (management functions, 
documentation and tests) for free.

The ring lib already has performance-optimized APIs for single-consumer and 
single-producer use, rte_ring_sc_dequeue_bulk() and 
rte_ring_sp_enqueue_burst(). Similar performance-optimized APIs for 
single-thread use could be added: rte_ring_st_dequeue_bulk() and 
rte_ring_st_enqueue_burst().

Regardless if added to the ring lib or as a separate lib, "reverse" APIs (for 
single-thread use only) and zero-copy APIs can be added at any time later.

Reply via email to