From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olivier Matz Subject: Re: [PATCH v2 1/5] ring: allow rings with non power-of-2 sizes Date: Mon, 3 Jul 2017 10:46:42 +0200 Message-ID: <20170703104642.63460d89@platinum> References: <20170607133620.275801-1-bruce.richardson@intel.com> <20170630150621.156365-1-bruce.richardson@intel.com> <20170630150621.156365-2-bruce.richardson@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org, jerin.jacob@caviumnetworks.com To: Bruce Richardson Return-path: Received: from mail-wr0-f177.google.com (mail-wr0-f177.google.com [209.85.128.177]) by dpdk.org (Postfix) with ESMTP id 09CA02B99 for ; Mon, 3 Jul 2017 10:46:44 +0200 (CEST) Received: by mail-wr0-f177.google.com with SMTP id k67so229952732wrc.2 for ; Mon, 03 Jul 2017 01:46:44 -0700 (PDT) In-Reply-To: <20170630150621.156365-2-bruce.richardson@intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Fri, 30 Jun 2017 16:06:17 +0100, Bruce Richardson 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 Acked-by: Olivier Matz