From mboxrd@z Thu Jan 1 00:00:00 1970 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=UOGfhLvktujiNar05inIT3wGLo1uJbbRQHqncHbSNkM=; b=f7wmYhyD+gvO6G236/JWo2sNiZ4L/QtgMqgPJhPZwmkcyO5q/nT7JAThrgK+xJ7w+D N9P25IrAqnPPQZmLSg7VcjY0ghgrs6WHJnTlBnHSgOcYZyHnO6ETse8dBX8ZQywLDwBP oCAOK3oh9UelVH2nDHsUoks9f15XOcBTRpkvvzemApeo3J62Fukmovhyo4bFfknFgJyU lLFVRMi3PrXzRKNPYQ06wJQ1RjJEVP+4SUE24T9yj2hAod+L3UXzOtRMe7/tM9Lokdk7 j1qcLlxM529ufnhheQkvd2nXHBF4GuPXbdcllx7G3S6PmxD9+XB8bbNBoWSkxM2dj3Fc tH9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=UOGfhLvktujiNar05inIT3wGLo1uJbbRQHqncHbSNkM=; b=W8ZYozZIKdnT66BrMtKRG2A0tZzY4TXkoilsP1er7yX4LvPtUIe6+eXy9frby84cCe LCi98XM7St31KkDtXH5Hg/3l1c6zKST7Stakkr/3m4l2MQYX5OIAwltaJZYmY9SfHTEK HejyGaoJtNWKqQ5XqMqdxMaliXmAkmltDQ1RiylPbZ1IZyzIgTgxNF4GX7R6kPdbsnCv eAl1Vw99t9vU1md22HyRlp9b/DMadm8yjSdxxyhYLJq2k+jMXY2VP7thrZarZyCbGGTN bVQO3mezjIBxyAK1ymnDVX1B2oFcjHWhktYXYL0Fx8vXRtfj/3RgduUWrLCpoplgcFeg yqgg== X-Gm-Message-State: AKS2vOzeTqiYQK+CecSeeSR/365TNMZ+On45m2R4x2/xPONvuWBXd4Q/ +eMsB682P2RhGfXq X-Received: by 10.223.172.67 with SMTP id v61mr35817464wrc.112.1499071604659; Mon, 03 Jul 2017 01:46:44 -0700 (PDT) Received: from platinum (2a01cb0c03c651000226b0fffeed02fc.ipv6.abo.wanadoo.fr. [2a01:cb0c:3c6:5100:226:b0ff:feed:2fc]) by smtp.gmail.com with ESMTPSA id 92sm16653988wrb.55.2017.07.03.01.46.44 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 03 Jul 2017 01:46:44 -0700 (PDT) Date: Mon, 3 Jul 2017 10:46:42 +0200 From: Olivier Matz To: Bruce Richardson Cc: dev@dpdk.org, jerin.jacob@caviumnetworks.com Message-ID: <20170703104642.63460d89@platinum> In-Reply-To: <20170630150621.156365-2-bruce.richardson@intel.com> References: <20170607133620.275801-1-bruce.richardson@intel.com> <20170630150621.156365-1-bruce.richardson@intel.com> <20170630150621.156365-2-bruce.richardson@intel.com> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v2 1/5] ring: allow rings with non power-of-2 sizes X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Jul 2017 08:46:45 -0000 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