[dpdk-dev,1/2] ring: increase maximum ring size

Message ID 20170907122033.17983-1-olivier.matz@6wind.com (mailing list archive)
State Superseded, archived
Headers

Checks

Context Check Description
ci/checkpatch warning coding style issues
ci/Intel-compilation success Compilation OK

Commit Message

Olivier Matz Sept. 7, 2017, 12:20 p.m. UTC
  There is no reason to prevent ring from beeing 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 <venki497@gmail.com>
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
---
 lib/librte_ring/rte_ring.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Anatoly Burakov Sept. 18, 2017, 1:49 p.m. UTC | #1
On 07-Sep-17 1:20 PM, Olivier Matz wrote:
> There is no reason to prevent ring from beeing 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 <venki497 at gmail.com>
> Signed-off-by: Olivier Matz <olivier.matz at 6wind.com>
> ---

Checkpatch issues aside,

Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com>
  

Patch

diff --git a/lib/librte_ring/rte_ring.h b/lib/librte_ring/rte_ring.h
index 8f5a4937f..9a211264a 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  (unsigned)(0x7fffffff) /**< Ring size mask */
 
 /* @internal defines for passing to the enqueue dequeue worker functions */
 #define __IS_SP 1