[dpdk-dev] [PATCH v9 0/6] lib/ring: APIs to support custom element size
Olivier Matz
olivier.matz at 6wind.com
Fri Jan 17 18:15:20 CET 2020
On Wed, Jan 15, 2020 at 11:25:05PM -0600, Honnappa Nagarahalli wrote:
> The current rte_ring hard-codes the type of the ring element to 'void *',
> hence the size of the element is hard-coded to 32b/64b. Since the ring
> element type is not an input to rte_ring APIs, it results in couple
> of issues:
>
> 1) If an application requires to store an element which is not 64b, it
> needs to write its own ring APIs similar to rte_event_ring APIs. This
> creates additional burden on the programmers, who end up making
> work-arounds and often waste memory.
> 2) If there are multiple libraries that store elements of the same
> type, currently they would have to write their own rte_ring APIs. This
> results in code duplication.
>
> This patch adds new APIs to support configurable ring element size.
> The APIs support custom element sizes by allowing to define the ring
> element to be a multiple of 32b.
>
> The aim is to achieve same performance as the existing ring
> implementation.
>
This is a nice improvement to the ring library, thanks!
It looks globally good to me, few comments as reply to individual
patches.
Olivier
More information about the dev
mailing list