DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] test/mempool: improve default mempool ops selection
@ 2017-11-17 18:07 Jerin Jacob
  2017-12-12 14:21 ` Olivier MATZ
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Jerin Jacob @ 2017-11-17 18:07 UTC (permalink / raw)
  To: dev; +Cc: olivier.matz, santosh.shukla, Jerin Jacob

Use of rte_eal_mbuf_default_mempool_ops() API will
allow to override pool handler through "--mbuf-pool-ops-name"
eal command line argument.

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
---
 test/test/test_mempool.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/test/test/test_mempool.c b/test/test/test_mempool.c
index 37ead503b..46eb5ce06 100644
--- a/test/test/test_mempool.c
+++ b/test/test/test_mempool.c
@@ -565,7 +565,7 @@ test_mempool(void)
 
 	/* Create a mempool based on Default handler */
 	printf("Testing %s mempool handler\n",
-	       RTE_MBUF_DEFAULT_MEMPOOL_OPS);
+	       rte_eal_mbuf_default_mempool_ops());
 	default_pool = rte_mempool_create_empty("default_pool",
 						MEMPOOL_SIZE,
 						MEMPOOL_ELT_SIZE,
@@ -577,7 +577,7 @@ test_mempool(void)
 		goto err;
 	}
 	if (rte_mempool_set_ops_byname(default_pool,
-				RTE_MBUF_DEFAULT_MEMPOOL_OPS, NULL) < 0) {
+				rte_eal_mbuf_default_mempool_ops(), NULL) < 0) {
 		printf("cannot set %s handler\n",
 			RTE_MBUF_DEFAULT_MEMPOOL_OPS);
 		goto err;
-- 
2.15.0

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [dpdk-dev] [PATCH] test/mempool: improve default mempool ops selection
  2017-11-17 18:07 [dpdk-dev] [PATCH] test/mempool: improve default mempool ops selection Jerin Jacob
@ 2017-12-12 14:21 ` Olivier MATZ
  2017-12-12 15:10 ` santosh
  2018-01-09 15:57 ` [dpdk-dev] [PATCH v2] " Jerin Jacob
  2 siblings, 0 replies; 6+ messages in thread
From: Olivier MATZ @ 2017-12-12 14:21 UTC (permalink / raw)
  To: Jerin Jacob; +Cc: dev, santosh.shukla

Hi Jerin,

On Fri, Nov 17, 2017 at 11:37:03PM +0530, Jerin Jacob wrote:
> Use of rte_eal_mbuf_default_mempool_ops() API will
> allow to override pool handler through "--mbuf-pool-ops-name"
> eal command line argument.
> 
> Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
> ---
>  test/test/test_mempool.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/test/test/test_mempool.c b/test/test/test_mempool.c
> index 37ead503b..46eb5ce06 100644
> --- a/test/test/test_mempool.c
> +++ b/test/test/test_mempool.c
> @@ -565,7 +565,7 @@ test_mempool(void)
>  
>  	/* Create a mempool based on Default handler */
>  	printf("Testing %s mempool handler\n",
> -	       RTE_MBUF_DEFAULT_MEMPOOL_OPS);
> +	       rte_eal_mbuf_default_mempool_ops());
>  	default_pool = rte_mempool_create_empty("default_pool",
>  						MEMPOOL_SIZE,
>  						MEMPOOL_ELT_SIZE,
> @@ -577,7 +577,7 @@ test_mempool(void)
>  		goto err;
>  	}
>  	if (rte_mempool_set_ops_byname(default_pool,
> -				RTE_MBUF_DEFAULT_MEMPOOL_OPS, NULL) < 0) {
> +				rte_eal_mbuf_default_mempool_ops(), NULL) < 0) {
>  		printf("cannot set %s handler\n",
>  			RTE_MBUF_DEFAULT_MEMPOOL_OPS);

The error printf should also be modified (there is another one below).
Since all uses are in the same function, it's worth putting it in a local
variable.

Regards,
Olivier

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [dpdk-dev] [PATCH] test/mempool: improve default mempool ops selection
  2017-11-17 18:07 [dpdk-dev] [PATCH] test/mempool: improve default mempool ops selection Jerin Jacob
  2017-12-12 14:21 ` Olivier MATZ
@ 2017-12-12 15:10 ` santosh
  2018-01-09 15:57 ` [dpdk-dev] [PATCH v2] " Jerin Jacob
  2 siblings, 0 replies; 6+ messages in thread
From: santosh @ 2017-12-12 15:10 UTC (permalink / raw)
  To: Jerin Jacob, dev; +Cc: olivier.matz


On Friday 17 November 2017 11:37 PM, Jerin Jacob wrote:
> Use of rte_eal_mbuf_default_mempool_ops() API will
> allow to override pool handler through "--mbuf-pool-ops-name"
> eal command line argument.
>
> Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
> ---
>  test/test/test_mempool.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/test/test/test_mempool.c b/test/test/test_mempool.c
> index 37ead503b..46eb5ce06 100644
> --- a/test/test/test_mempool.c
> +++ b/test/test/test_mempool.c
> @@ -565,7 +565,7 @@ test_mempool(void)
>  
>  	/* Create a mempool based on Default handler */
>  	printf("Testing %s mempool handler\n",
> -	       RTE_MBUF_DEFAULT_MEMPOOL_OPS);
> +	       rte_eal_mbuf_default_mempool_ops());
>  	default_pool = rte_mempool_create_empty("default_pool",
>  						MEMPOOL_SIZE,
>  						MEMPOOL_ELT_SIZE,
> @@ -577,7 +577,7 @@ test_mempool(void)
>  		goto err;
>  	}
>  	if (rte_mempool_set_ops_byname(default_pool,
> -				RTE_MBUF_DEFAULT_MEMPOOL_OPS, NULL) < 0) {
> +				rte_eal_mbuf_default_mempool_ops(), NULL) < 0) {
>  		printf("cannot set %s handler\n",
>  			RTE_MBUF_DEFAULT_MEMPOOL_OPS);

Pl. replace error printf _ops with _mbuf_default_mempool_ops.
With that:
Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>

Thanks.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [dpdk-dev] [PATCH v2] test/mempool: improve default mempool ops selection
  2017-11-17 18:07 [dpdk-dev] [PATCH] test/mempool: improve default mempool ops selection Jerin Jacob
  2017-12-12 14:21 ` Olivier MATZ
  2017-12-12 15:10 ` santosh
@ 2018-01-09 15:57 ` Jerin Jacob
  2018-01-16 14:25   ` Olivier Matz
  2 siblings, 1 reply; 6+ messages in thread
From: Jerin Jacob @ 2018-01-09 15:57 UTC (permalink / raw)
  To: dev; +Cc: olivier.matz, Jerin Jacob

Use of rte_eal_mbuf_default_mempool_ops() API will
allow to override pool handler through "--mbuf-pool-ops-name"
eal command line argument.

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
---
v2:
- Added a local variable to store the rte_eal_mbuf_default_mempool_ops()
to use across the file(Olivier)
---
 test/test/test_mempool.c | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/test/test/test_mempool.c b/test/test/test_mempool.c
index 4a3f4ae45..f39df5aa6 100644
--- a/test/test/test_mempool.c
+++ b/test/test/test_mempool.c
@@ -485,6 +485,7 @@ test_mempool(void)
 	struct rte_mempool *mp_nocache = NULL;
 	struct rte_mempool *mp_stack = NULL;
 	struct rte_mempool *default_pool = NULL;
+	const char *default_pool_ops = rte_eal_mbuf_default_mempool_ops();
 
 	rte_atomic32_init(&synchro);
 
@@ -535,8 +536,7 @@ test_mempool(void)
 	rte_mempool_obj_iter(mp_stack, my_obj_init, NULL);
 
 	/* Create a mempool based on Default handler */
-	printf("Testing %s mempool handler\n",
-	       RTE_MBUF_DEFAULT_MEMPOOL_OPS);
+	printf("Testing %s mempool handler\n", default_pool_ops);
 	default_pool = rte_mempool_create_empty("default_pool",
 						MEMPOOL_SIZE,
 						MEMPOOL_ELT_SIZE,
@@ -548,14 +548,12 @@ test_mempool(void)
 		goto err;
 	}
 	if (rte_mempool_set_ops_byname(default_pool,
-				RTE_MBUF_DEFAULT_MEMPOOL_OPS, NULL) < 0) {
-		printf("cannot set %s handler\n",
-			RTE_MBUF_DEFAULT_MEMPOOL_OPS);
+				default_pool_ops, NULL) < 0) {
+		printf("cannot set %s handler\n", default_pool_ops);
 		goto err;
 	}
 	if (rte_mempool_populate_default(default_pool) < 0) {
-		printf("cannot populate %s mempool\n",
-			RTE_MBUF_DEFAULT_MEMPOOL_OPS);
+		printf("cannot populate %s mempool\n", default_pool_ops);
 		goto err;
 	}
 	rte_mempool_obj_iter(default_pool, my_obj_init, NULL);
-- 
2.15.1

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [dpdk-dev] [PATCH v2] test/mempool: improve default mempool ops selection
  2018-01-09 15:57 ` [dpdk-dev] [PATCH v2] " Jerin Jacob
@ 2018-01-16 14:25   ` Olivier Matz
  2018-01-18 14:09     ` Thomas Monjalon
  0 siblings, 1 reply; 6+ messages in thread
From: Olivier Matz @ 2018-01-16 14:25 UTC (permalink / raw)
  To: Jerin Jacob; +Cc: dev

On Tue, Jan 09, 2018 at 09:27:08PM +0530, Jerin Jacob wrote:
> Use of rte_eal_mbuf_default_mempool_ops() API will
> allow to override pool handler through "--mbuf-pool-ops-name"
> eal command line argument.
> 
> Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
> Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>

Acked-by: Olivier Matz <olivier.matz@6wind.com>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [dpdk-dev] [PATCH v2] test/mempool: improve default mempool ops selection
  2018-01-16 14:25   ` Olivier Matz
@ 2018-01-18 14:09     ` Thomas Monjalon
  0 siblings, 0 replies; 6+ messages in thread
From: Thomas Monjalon @ 2018-01-18 14:09 UTC (permalink / raw)
  To: Jerin Jacob; +Cc: dev, Olivier Matz

16/01/2018 15:25, Olivier Matz:
> On Tue, Jan 09, 2018 at 09:27:08PM +0530, Jerin Jacob wrote:
> > Use of rte_eal_mbuf_default_mempool_ops() API will
> > allow to override pool handler through "--mbuf-pool-ops-name"
> > eal command line argument.
> > 
> > Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
> > Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
> 
> Acked-by: Olivier Matz <olivier.matz@6wind.com>

Applied, thanks

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-01-18 14:10 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-17 18:07 [dpdk-dev] [PATCH] test/mempool: improve default mempool ops selection Jerin Jacob
2017-12-12 14:21 ` Olivier MATZ
2017-12-12 15:10 ` santosh
2018-01-09 15:57 ` [dpdk-dev] [PATCH v2] " Jerin Jacob
2018-01-16 14:25   ` Olivier Matz
2018-01-18 14:09     ` 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).