[dpdk-dev] [PATCH v2 1/5] ring: allow rings with non power-of-2 sizes

Olivier Matz olivier.matz at 6wind.com
Mon Jul 3 10:46:42 CEST 2017


On Fri, 30 Jun 2017 16:06:17 +0100, Bruce Richardson <bruce.richardson at intel.com> wrote:
> The rte_rings traditionally have only supported having ring sizes as powers
> of 2, with the actual usable space being the size - 1. In some cases, for
> example, with an eventdev where we want to precisely control queue depths
> for latency, we need to allow ring sizes which are not powers of two so we
> add in an additional ring capacity value to allow that. For existing rings,
> this value will be size-1, i.e. the same as the mask, but if the new
> EXACT_SZ flag is passed on ring creation, the ring will have exactly the
> usable space requested, although the underlying memory size may be bigger.
> 
> Signed-off-by: Bruce Richardson <bruce.richardson at intel.com>

Acked-by: Olivier Matz <olivier.matz at 6wind.com>


More information about the dev mailing list