* [dpdk-dev] [PATCH 1/2] ring: increase maximum ring size @ 2017-09-07 12:20 Olivier Matz 2017-09-07 12:20 ` [dpdk-dev] [PATCH 2/2] test/ring: do not mask result of enqueue or dequeue Olivier Matz ` (2 more replies) 0 siblings, 3 replies; 7+ messages in thread From: Olivier Matz @ 2017-09-07 12:20 UTC (permalink / raw) To: dev; +Cc: venki497, bruce.richardson 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(-) 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 -- 2.11.0 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [dpdk-dev] [PATCH 2/2] test/ring: do not mask result of enqueue or dequeue 2017-09-07 12:20 [dpdk-dev] [PATCH 1/2] ring: increase maximum ring size Olivier Matz @ 2017-09-07 12:20 ` Olivier Matz 2017-09-18 13:50 ` Burakov, Anatoly 2017-09-18 13:49 ` [dpdk-dev] [PATCH 1/2] ring: increase maximum ring size Burakov, Anatoly 2017-09-20 11:32 ` [dpdk-dev] [PATCH v2 " Olivier Matz 2 siblings, 1 reply; 7+ messages in thread From: Olivier Matz @ 2017-09-07 12:20 UTC (permalink / raw) To: dev; +Cc: venki497, bruce.richardson The define RTE_RING_SZ_MASK is the maximum size supported by the rte_ring. The size is checked at ring creation. There is no reason today to mask the result of rte_ring_sp_enqueue_burst() or rte_ring_sc_dequeue_burst() with this value. The flag RTE_RING_QUOT_EXCEED was previously included in the returned value but it was removed in commit 77dd3064270c ("ring: remove watermark support"). Signed-off-by: Olivier Matz <olivier.matz@6wind.com> --- test/test/test_ring.c | 58 +++++++++++++++++++++++++-------------------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/test/test/test_ring.c b/test/test/test_ring.c index d664b04b7..87771ed16 100644 --- a/test/test/test_ring.c +++ b/test/test/test_ring.c @@ -375,37 +375,37 @@ test_ring_burst_basic(void) printf("enqueue 1 obj\n"); ret = rte_ring_sp_enqueue_burst(r, cur_src, 1, NULL); cur_src += 1; - if ((ret & RTE_RING_SZ_MASK) != 1) + if (ret != 1) goto fail; printf("enqueue 2 objs\n"); ret = rte_ring_sp_enqueue_burst(r, cur_src, 2, NULL); cur_src += 2; - if ((ret & RTE_RING_SZ_MASK) != 2) + if (ret != 2) goto fail; printf("enqueue MAX_BULK objs\n"); ret = rte_ring_sp_enqueue_burst(r, cur_src, MAX_BULK, NULL); cur_src += MAX_BULK; - if ((ret & RTE_RING_SZ_MASK) != MAX_BULK) + if (ret != MAX_BULK) goto fail; printf("dequeue 1 obj\n"); ret = rte_ring_sc_dequeue_burst(r, cur_dst, 1, NULL); cur_dst += 1; - if ((ret & RTE_RING_SZ_MASK) != 1) + if (ret != 1) goto fail; printf("dequeue 2 objs\n"); ret = rte_ring_sc_dequeue_burst(r, cur_dst, 2, NULL); cur_dst += 2; - if ((ret & RTE_RING_SZ_MASK) != 2) + if (ret != 2) goto fail; printf("dequeue MAX_BULK objs\n"); ret = rte_ring_sc_dequeue_burst(r, cur_dst, MAX_BULK, NULL); cur_dst += MAX_BULK; - if ((ret & RTE_RING_SZ_MASK) != MAX_BULK) + if (ret != MAX_BULK) goto fail; /* check data */ @@ -423,7 +423,7 @@ test_ring_burst_basic(void) for (i = 0; i< (RING_SIZE/MAX_BULK - 1); i++) { ret = rte_ring_sp_enqueue_burst(r, cur_src, MAX_BULK, NULL); cur_src += MAX_BULK; - if ((ret & RTE_RING_SZ_MASK) != MAX_BULK) { + if (ret != MAX_BULK) { goto fail; } } @@ -431,14 +431,14 @@ test_ring_burst_basic(void) printf("Enqueue 2 objects, free entries = MAX_BULK - 2 \n"); ret = rte_ring_sp_enqueue_burst(r, cur_src, 2, NULL); cur_src += 2; - if ((ret & RTE_RING_SZ_MASK) != 2) + if (ret != 2) goto fail; printf("Enqueue the remaining entries = MAX_BULK - 2 \n"); /* Always one free entry left */ ret = rte_ring_sp_enqueue_burst(r, cur_src, MAX_BULK, NULL); cur_src += MAX_BULK - 3; - if ((ret & RTE_RING_SZ_MASK) != MAX_BULK - 3) + if (ret != MAX_BULK - 3) goto fail; printf("Test if ring is full \n"); @@ -447,26 +447,26 @@ test_ring_burst_basic(void) printf("Test enqueue for a full entry \n"); ret = rte_ring_sp_enqueue_burst(r, cur_src, MAX_BULK, NULL); - if ((ret & RTE_RING_SZ_MASK) != 0) + if (ret != 0) goto fail; printf("Test dequeue without enough objects \n"); for (i = 0; i<RING_SIZE/MAX_BULK - 1; i++) { ret = rte_ring_sc_dequeue_burst(r, cur_dst, MAX_BULK, NULL); cur_dst += MAX_BULK; - if ((ret & RTE_RING_SZ_MASK) != MAX_BULK) + if (ret != MAX_BULK) goto fail; } /* Available memory space for the exact MAX_BULK entries */ ret = rte_ring_sc_dequeue_burst(r, cur_dst, 2, NULL); cur_dst += 2; - if ((ret & RTE_RING_SZ_MASK) != 2) + if (ret != 2) goto fail; ret = rte_ring_sc_dequeue_burst(r, cur_dst, MAX_BULK, NULL); cur_dst += MAX_BULK - 3; - if ((ret & RTE_RING_SZ_MASK) != MAX_BULK - 3) + if (ret != MAX_BULK - 3) goto fail; printf("Test if ring is empty \n"); @@ -490,37 +490,37 @@ test_ring_burst_basic(void) printf("enqueue 1 obj\n"); ret = rte_ring_mp_enqueue_burst(r, cur_src, 1, NULL); cur_src += 1; - if ((ret & RTE_RING_SZ_MASK) != 1) + if (ret != 1) goto fail; printf("enqueue 2 objs\n"); ret = rte_ring_mp_enqueue_burst(r, cur_src, 2, NULL); cur_src += 2; - if ((ret & RTE_RING_SZ_MASK) != 2) + if (ret != 2) goto fail; printf("enqueue MAX_BULK objs\n"); ret = rte_ring_mp_enqueue_burst(r, cur_src, MAX_BULK, NULL); cur_src += MAX_BULK; - if ((ret & RTE_RING_SZ_MASK) != MAX_BULK) + if (ret != MAX_BULK) goto fail; printf("dequeue 1 obj\n"); ret = rte_ring_mc_dequeue_burst(r, cur_dst, 1, NULL); cur_dst += 1; - if ((ret & RTE_RING_SZ_MASK) != 1) + if (ret != 1) goto fail; printf("dequeue 2 objs\n"); ret = rte_ring_mc_dequeue_burst(r, cur_dst, 2, NULL); cur_dst += 2; - if ((ret & RTE_RING_SZ_MASK) != 2) + if (ret != 2) goto fail; printf("dequeue MAX_BULK objs\n"); ret = rte_ring_mc_dequeue_burst(r, cur_dst, MAX_BULK, NULL); cur_dst += MAX_BULK; - if ((ret & RTE_RING_SZ_MASK) != MAX_BULK) + if (ret != MAX_BULK) goto fail; /* check data */ @@ -538,11 +538,11 @@ test_ring_burst_basic(void) for (i = 0; i<RING_SIZE/MAX_BULK; i++) { ret = rte_ring_mp_enqueue_burst(r, cur_src, MAX_BULK, NULL); cur_src += MAX_BULK; - if ((ret & RTE_RING_SZ_MASK) != MAX_BULK) + if (ret != MAX_BULK) goto fail; ret = rte_ring_mc_dequeue_burst(r, cur_dst, MAX_BULK, NULL); cur_dst += MAX_BULK; - if ((ret & RTE_RING_SZ_MASK) != MAX_BULK) + if (ret != MAX_BULK) goto fail; } @@ -561,19 +561,19 @@ test_ring_burst_basic(void) for (i = 0; i<RING_SIZE/MAX_BULK - 1; i++) { ret = rte_ring_mp_enqueue_burst(r, cur_src, MAX_BULK, NULL); cur_src += MAX_BULK; - if ((ret & RTE_RING_SZ_MASK) != MAX_BULK) + if (ret != MAX_BULK) goto fail; } /* Available memory space for the exact MAX_BULK objects */ ret = rte_ring_mp_enqueue_burst(r, cur_src, 2, NULL); cur_src += 2; - if ((ret & RTE_RING_SZ_MASK) != 2) + if (ret != 2) goto fail; ret = rte_ring_mp_enqueue_burst(r, cur_src, MAX_BULK, NULL); cur_src += MAX_BULK - 3; - if ((ret & RTE_RING_SZ_MASK) != MAX_BULK - 3) + if (ret != MAX_BULK - 3) goto fail; @@ -581,19 +581,19 @@ test_ring_burst_basic(void) for (i = 0; i<RING_SIZE/MAX_BULK - 1; i++) { ret = rte_ring_mc_dequeue_burst(r, cur_dst, MAX_BULK, NULL); cur_dst += MAX_BULK; - if ((ret & RTE_RING_SZ_MASK) != MAX_BULK) + if (ret != MAX_BULK) goto fail; } /* Available objects - the exact MAX_BULK */ ret = rte_ring_mc_dequeue_burst(r, cur_dst, 2, NULL); cur_dst += 2; - if ((ret & RTE_RING_SZ_MASK) != 2) + if (ret != 2) goto fail; ret = rte_ring_mc_dequeue_burst(r, cur_dst, MAX_BULK, NULL); cur_dst += MAX_BULK - 3; - if ((ret & RTE_RING_SZ_MASK) != MAX_BULK - 3) + if (ret != MAX_BULK - 3) goto fail; /* check data */ @@ -611,7 +611,7 @@ test_ring_burst_basic(void) ret = rte_ring_enqueue_burst(r, cur_src, 2, NULL); cur_src += 2; - if ((ret & RTE_RING_SZ_MASK) != 2) + if (ret != 2) goto fail; ret = rte_ring_dequeue_burst(r, cur_dst, 2, NULL); @@ -749,7 +749,7 @@ test_ring_basic_ex(void) /* Covering the ring burst operation */ ret = rte_ring_enqueue_burst(rp, obj, 2, NULL); - if ((ret & RTE_RING_SZ_MASK) != 2) { + if (ret != 2) { printf("test_ring_basic_ex: rte_ring_enqueue_burst fails \n"); goto fail_test; } -- 2.11.0 ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [dpdk-dev] [PATCH 2/2] test/ring: do not mask result of enqueue or dequeue 2017-09-07 12:20 ` [dpdk-dev] [PATCH 2/2] test/ring: do not mask result of enqueue or dequeue Olivier Matz @ 2017-09-18 13:50 ` Burakov, Anatoly 0 siblings, 0 replies; 7+ messages in thread From: Burakov, Anatoly @ 2017-09-18 13:50 UTC (permalink / raw) To: Olivier Matz, dev On 07-Sep-17 1:20 PM, Olivier Matz wrote: > The define RTE_RING_SZ_MASK is the maximum size supported by the > rte_ring. The size is checked at ring creation. > > There is no reason today to mask the result of > rte_ring_sp_enqueue_burst() or rte_ring_sc_dequeue_burst() with this > value. The flag RTE_RING_QUOT_EXCEED was previously included in the > returned value but it was removed in > commit 77dd3064270c ("ring: remove watermark support"). > > Signed-off-by: Olivier Matz <olivier.matz at 6wind.com> > --- Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com> ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [dpdk-dev] [PATCH 1/2] ring: increase maximum ring size 2017-09-07 12:20 [dpdk-dev] [PATCH 1/2] ring: increase maximum ring size Olivier Matz 2017-09-07 12:20 ` [dpdk-dev] [PATCH 2/2] test/ring: do not mask result of enqueue or dequeue Olivier Matz @ 2017-09-18 13:49 ` Burakov, Anatoly 2017-09-20 11:32 ` [dpdk-dev] [PATCH v2 " Olivier Matz 2 siblings, 0 replies; 7+ messages in thread From: Burakov, Anatoly @ 2017-09-18 13:49 UTC (permalink / raw) To: Olivier Matz, dev 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> ^ permalink raw reply [flat|nested] 7+ messages in thread
* [dpdk-dev] [PATCH v2 1/2] ring: increase maximum ring size 2017-09-07 12:20 [dpdk-dev] [PATCH 1/2] ring: increase maximum ring size Olivier Matz 2017-09-07 12:20 ` [dpdk-dev] [PATCH 2/2] test/ring: do not mask result of enqueue or dequeue Olivier Matz 2017-09-18 13:49 ` [dpdk-dev] [PATCH 1/2] ring: increase maximum ring size Burakov, Anatoly @ 2017-09-20 11:32 ` Olivier Matz 2017-09-20 11:32 ` [dpdk-dev] [PATCH v2 2/2] test/ring: do not mask result of enqueue or dequeue Olivier Matz 2017-10-05 21:25 ` [dpdk-dev] [PATCH v2 1/2] ring: increase maximum ring size Thomas Monjalon 2 siblings, 2 replies; 7+ messages in thread From: Olivier Matz @ 2017-09-20 11:32 UTC (permalink / raw) To: dev; +Cc: venki497, bruce.richardson, anatoly.burakov 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 <venki497@gmail.com> Signed-off-by: Olivier Matz <olivier.matz@6wind.com> Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com> --- 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 -- 2.11.0 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [dpdk-dev] [PATCH v2 2/2] test/ring: do not mask result of enqueue or dequeue 2017-09-20 11:32 ` [dpdk-dev] [PATCH v2 " Olivier Matz @ 2017-09-20 11:32 ` Olivier Matz 2017-10-05 21:25 ` [dpdk-dev] [PATCH v2 1/2] ring: increase maximum ring size Thomas Monjalon 1 sibling, 0 replies; 7+ messages in thread From: Olivier Matz @ 2017-09-20 11:32 UTC (permalink / raw) To: dev; +Cc: venki497, bruce.richardson, anatoly.burakov The define RTE_RING_SZ_MASK is the maximum size supported by the rte_ring. The size is checked at ring creation. There is no reason today to mask the result of rte_ring_sp_enqueue_burst() or rte_ring_sc_dequeue_burst() with this value. The flag RTE_RING_QUOT_EXCEED was previously included in the returned value but it was removed in commit 77dd3064270c ("ring: remove watermark support"). Signed-off-by: Olivier Matz <olivier.matz@6wind.com> Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com> --- v1->v2 - fix checkpatch issues test/test/test_ring.c | 59 +++++++++++++++++++++++++-------------------------- 1 file changed, 29 insertions(+), 30 deletions(-) diff --git a/test/test/test_ring.c b/test/test/test_ring.c index d664b04b7..d26e75269 100644 --- a/test/test/test_ring.c +++ b/test/test/test_ring.c @@ -375,37 +375,37 @@ test_ring_burst_basic(void) printf("enqueue 1 obj\n"); ret = rte_ring_sp_enqueue_burst(r, cur_src, 1, NULL); cur_src += 1; - if ((ret & RTE_RING_SZ_MASK) != 1) + if (ret != 1) goto fail; printf("enqueue 2 objs\n"); ret = rte_ring_sp_enqueue_burst(r, cur_src, 2, NULL); cur_src += 2; - if ((ret & RTE_RING_SZ_MASK) != 2) + if (ret != 2) goto fail; printf("enqueue MAX_BULK objs\n"); ret = rte_ring_sp_enqueue_burst(r, cur_src, MAX_BULK, NULL); cur_src += MAX_BULK; - if ((ret & RTE_RING_SZ_MASK) != MAX_BULK) + if (ret != MAX_BULK) goto fail; printf("dequeue 1 obj\n"); ret = rte_ring_sc_dequeue_burst(r, cur_dst, 1, NULL); cur_dst += 1; - if ((ret & RTE_RING_SZ_MASK) != 1) + if (ret != 1) goto fail; printf("dequeue 2 objs\n"); ret = rte_ring_sc_dequeue_burst(r, cur_dst, 2, NULL); cur_dst += 2; - if ((ret & RTE_RING_SZ_MASK) != 2) + if (ret != 2) goto fail; printf("dequeue MAX_BULK objs\n"); ret = rte_ring_sc_dequeue_burst(r, cur_dst, MAX_BULK, NULL); cur_dst += MAX_BULK; - if ((ret & RTE_RING_SZ_MASK) != MAX_BULK) + if (ret != MAX_BULK) goto fail; /* check data */ @@ -423,22 +423,21 @@ test_ring_burst_basic(void) for (i = 0; i< (RING_SIZE/MAX_BULK - 1); i++) { ret = rte_ring_sp_enqueue_burst(r, cur_src, MAX_BULK, NULL); cur_src += MAX_BULK; - if ((ret & RTE_RING_SZ_MASK) != MAX_BULK) { + if (ret != MAX_BULK) goto fail; - } } printf("Enqueue 2 objects, free entries = MAX_BULK - 2 \n"); ret = rte_ring_sp_enqueue_burst(r, cur_src, 2, NULL); cur_src += 2; - if ((ret & RTE_RING_SZ_MASK) != 2) + if (ret != 2) goto fail; printf("Enqueue the remaining entries = MAX_BULK - 2 \n"); /* Always one free entry left */ ret = rte_ring_sp_enqueue_burst(r, cur_src, MAX_BULK, NULL); cur_src += MAX_BULK - 3; - if ((ret & RTE_RING_SZ_MASK) != MAX_BULK - 3) + if (ret != MAX_BULK - 3) goto fail; printf("Test if ring is full \n"); @@ -447,26 +446,26 @@ test_ring_burst_basic(void) printf("Test enqueue for a full entry \n"); ret = rte_ring_sp_enqueue_burst(r, cur_src, MAX_BULK, NULL); - if ((ret & RTE_RING_SZ_MASK) != 0) + if (ret != 0) goto fail; printf("Test dequeue without enough objects \n"); for (i = 0; i<RING_SIZE/MAX_BULK - 1; i++) { ret = rte_ring_sc_dequeue_burst(r, cur_dst, MAX_BULK, NULL); cur_dst += MAX_BULK; - if ((ret & RTE_RING_SZ_MASK) != MAX_BULK) + if (ret != MAX_BULK) goto fail; } /* Available memory space for the exact MAX_BULK entries */ ret = rte_ring_sc_dequeue_burst(r, cur_dst, 2, NULL); cur_dst += 2; - if ((ret & RTE_RING_SZ_MASK) != 2) + if (ret != 2) goto fail; ret = rte_ring_sc_dequeue_burst(r, cur_dst, MAX_BULK, NULL); cur_dst += MAX_BULK - 3; - if ((ret & RTE_RING_SZ_MASK) != MAX_BULK - 3) + if (ret != MAX_BULK - 3) goto fail; printf("Test if ring is empty \n"); @@ -490,37 +489,37 @@ test_ring_burst_basic(void) printf("enqueue 1 obj\n"); ret = rte_ring_mp_enqueue_burst(r, cur_src, 1, NULL); cur_src += 1; - if ((ret & RTE_RING_SZ_MASK) != 1) + if (ret != 1) goto fail; printf("enqueue 2 objs\n"); ret = rte_ring_mp_enqueue_burst(r, cur_src, 2, NULL); cur_src += 2; - if ((ret & RTE_RING_SZ_MASK) != 2) + if (ret != 2) goto fail; printf("enqueue MAX_BULK objs\n"); ret = rte_ring_mp_enqueue_burst(r, cur_src, MAX_BULK, NULL); cur_src += MAX_BULK; - if ((ret & RTE_RING_SZ_MASK) != MAX_BULK) + if (ret != MAX_BULK) goto fail; printf("dequeue 1 obj\n"); ret = rte_ring_mc_dequeue_burst(r, cur_dst, 1, NULL); cur_dst += 1; - if ((ret & RTE_RING_SZ_MASK) != 1) + if (ret != 1) goto fail; printf("dequeue 2 objs\n"); ret = rte_ring_mc_dequeue_burst(r, cur_dst, 2, NULL); cur_dst += 2; - if ((ret & RTE_RING_SZ_MASK) != 2) + if (ret != 2) goto fail; printf("dequeue MAX_BULK objs\n"); ret = rte_ring_mc_dequeue_burst(r, cur_dst, MAX_BULK, NULL); cur_dst += MAX_BULK; - if ((ret & RTE_RING_SZ_MASK) != MAX_BULK) + if (ret != MAX_BULK) goto fail; /* check data */ @@ -538,11 +537,11 @@ test_ring_burst_basic(void) for (i = 0; i<RING_SIZE/MAX_BULK; i++) { ret = rte_ring_mp_enqueue_burst(r, cur_src, MAX_BULK, NULL); cur_src += MAX_BULK; - if ((ret & RTE_RING_SZ_MASK) != MAX_BULK) + if (ret != MAX_BULK) goto fail; ret = rte_ring_mc_dequeue_burst(r, cur_dst, MAX_BULK, NULL); cur_dst += MAX_BULK; - if ((ret & RTE_RING_SZ_MASK) != MAX_BULK) + if (ret != MAX_BULK) goto fail; } @@ -561,19 +560,19 @@ test_ring_burst_basic(void) for (i = 0; i<RING_SIZE/MAX_BULK - 1; i++) { ret = rte_ring_mp_enqueue_burst(r, cur_src, MAX_BULK, NULL); cur_src += MAX_BULK; - if ((ret & RTE_RING_SZ_MASK) != MAX_BULK) + if (ret != MAX_BULK) goto fail; } /* Available memory space for the exact MAX_BULK objects */ ret = rte_ring_mp_enqueue_burst(r, cur_src, 2, NULL); cur_src += 2; - if ((ret & RTE_RING_SZ_MASK) != 2) + if (ret != 2) goto fail; ret = rte_ring_mp_enqueue_burst(r, cur_src, MAX_BULK, NULL); cur_src += MAX_BULK - 3; - if ((ret & RTE_RING_SZ_MASK) != MAX_BULK - 3) + if (ret != MAX_BULK - 3) goto fail; @@ -581,19 +580,19 @@ test_ring_burst_basic(void) for (i = 0; i<RING_SIZE/MAX_BULK - 1; i++) { ret = rte_ring_mc_dequeue_burst(r, cur_dst, MAX_BULK, NULL); cur_dst += MAX_BULK; - if ((ret & RTE_RING_SZ_MASK) != MAX_BULK) + if (ret != MAX_BULK) goto fail; } /* Available objects - the exact MAX_BULK */ ret = rte_ring_mc_dequeue_burst(r, cur_dst, 2, NULL); cur_dst += 2; - if ((ret & RTE_RING_SZ_MASK) != 2) + if (ret != 2) goto fail; ret = rte_ring_mc_dequeue_burst(r, cur_dst, MAX_BULK, NULL); cur_dst += MAX_BULK - 3; - if ((ret & RTE_RING_SZ_MASK) != MAX_BULK - 3) + if (ret != MAX_BULK - 3) goto fail; /* check data */ @@ -611,7 +610,7 @@ test_ring_burst_basic(void) ret = rte_ring_enqueue_burst(r, cur_src, 2, NULL); cur_src += 2; - if ((ret & RTE_RING_SZ_MASK) != 2) + if (ret != 2) goto fail; ret = rte_ring_dequeue_burst(r, cur_dst, 2, NULL); @@ -749,7 +748,7 @@ test_ring_basic_ex(void) /* Covering the ring burst operation */ ret = rte_ring_enqueue_burst(rp, obj, 2, NULL); - if ((ret & RTE_RING_SZ_MASK) != 2) { + if (ret != 2) { printf("test_ring_basic_ex: rte_ring_enqueue_burst fails \n"); goto fail_test; } -- 2.11.0 ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [dpdk-dev] [PATCH v2 1/2] ring: increase maximum ring size 2017-09-20 11:32 ` [dpdk-dev] [PATCH v2 " Olivier Matz 2017-09-20 11:32 ` [dpdk-dev] [PATCH v2 2/2] test/ring: do not mask result of enqueue or dequeue Olivier Matz @ 2017-10-05 21:25 ` Thomas Monjalon 1 sibling, 0 replies; 7+ messages in thread From: Thomas Monjalon @ 2017-10-05 21:25 UTC (permalink / raw) To: Olivier Matz; +Cc: dev, venki497, bruce.richardson, anatoly.burakov 20/09/2017 13:32, Olivier Matz: > 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 <venki497@gmail.com> > Signed-off-by: Olivier Matz <olivier.matz@6wind.com> > Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com> Applied, thanks ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2017-10-05 21:25 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2017-09-07 12:20 [dpdk-dev] [PATCH 1/2] ring: increase maximum ring size Olivier Matz 2017-09-07 12:20 ` [dpdk-dev] [PATCH 2/2] test/ring: do not mask result of enqueue or dequeue Olivier Matz 2017-09-18 13:50 ` Burakov, Anatoly 2017-09-18 13:49 ` [dpdk-dev] [PATCH 1/2] ring: increase maximum ring size Burakov, Anatoly 2017-09-20 11:32 ` [dpdk-dev] [PATCH v2 " Olivier Matz 2017-09-20 11:32 ` [dpdk-dev] [PATCH v2 2/2] test/ring: do not mask result of enqueue or dequeue Olivier Matz 2017-10-05 21:25 ` [dpdk-dev] [PATCH v2 1/2] ring: increase maximum ring size Thomas Monjalon
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).