From patchwork Wed Sep 20 11:32:15 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Olivier Matz X-Patchwork-Id: 29014 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id DFE939FE; Wed, 20 Sep 2017 13:32:37 +0200 (CEST) Received: from proxy.6wind.com (host.76.145.23.62.rev.coltfrance.com [62.23.145.76]) by dpdk.org (Postfix) with ESMTP id 8CD7A9FE for ; Wed, 20 Sep 2017 13:32:36 +0200 (CEST) Received: from glumotte.dev.6wind.com (unknown [10.16.0.195]) by proxy.6wind.com (Postfix) with ESMTP id E5A80E3DFB; Wed, 20 Sep 2017 13:28:16 +0200 (CEST) From: Olivier Matz To: dev@dpdk.org Cc: venki497@gmail.com, bruce.richardson@intel.com, anatoly.burakov@intel.com Date: Wed, 20 Sep 2017 13:32:15 +0200 Message-Id: <20170920113216.1869-1-olivier.matz@6wind.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170907122033.17983-1-olivier.matz@6wind.com> References: <20170907122033.17983-1-olivier.matz@6wind.com> Subject: [dpdk-dev] [PATCH v2 1/2] ring: increase maximum ring size 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" There is no reason to prevent ring from being larger than 0x0FFFFFFF. Increase the maximum size to 0x7FFFFFFF, which is the maximum possible without changing the code and the structure definition (size is stored on a uint32_t). Link: http://dpdk.org/ml/archives/dev/2017-September/074701.html Suggested-by: Venkatesh Nuthula Signed-off-by: Olivier Matz Reviewed-by: Anatoly Burakov --- v1->v2 - fix checkpatch issues lib/librte_ring/rte_ring.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_ring/rte_ring.h b/lib/librte_ring/rte_ring.h index 8f5a4937f..5e9b3b7b4 100644 --- a/lib/librte_ring/rte_ring.h +++ b/lib/librte_ring/rte_ring.h @@ -174,7 +174,7 @@ struct rte_ring { * ring space will be wasted. */ #define RING_F_EXACT_SZ 0x0004 -#define RTE_RING_SZ_MASK (unsigned)(0x0fffffff) /**< Ring size mask */ +#define RTE_RING_SZ_MASK (0x7fffffffU) /**< Ring size mask */ /* @internal defines for passing to the enqueue dequeue worker functions */ #define __IS_SP 1