diff mbox series

[v3,5/7] app/testpmd: set preferred mempool as default pktpool

Message ID 1516281992-6873-6-git-send-email-hemant.agrawal@nxp.com
State Superseded
Headers show
Series Dynamic HW Mempool Detection Support | expand

Commit Message

Hemant Agrawal Jan. 18, 2018, 1:26 p.m. UTC
From: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>


Set the mempool preferred by the ethernet devices as default mbuf
mempool before creating the pktpool.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>

---
 app/test-pmd/testpmd.c | 3 +++
 1 file changed, 3 insertions(+)

-- 
2.7.4

Comments

Olivier Matz Jan. 19, 2018, 10:01 a.m. UTC | #1
On Thu, Jan 18, 2018 at 06:56:30PM +0530, Hemant Agrawal wrote:
> From: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>

> 

> Set the mempool preferred by the ethernet devices as default mbuf

> mempool before creating the pktpool.

> 

> Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>

> ---

>  app/test-pmd/testpmd.c | 3 +++

>  1 file changed, 3 insertions(+)

> 

> diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c

> index 5dc8cca..34e07c1 100644

> --- a/app/test-pmd/testpmd.c

> +++ b/app/test-pmd/testpmd.c

> @@ -38,6 +38,7 @@

>  #include <rte_mempool.h>

>  #include <rte_malloc.h>

>  #include <rte_mbuf.h>

> +#include <rte_mbuf_pool_ops.h>

>  #include <rte_interrupts.h>

>  #include <rte_pci.h>

>  #include <rte_ether.h>

> @@ -499,6 +500,8 @@ mbuf_pool_create(uint16_t mbuf_seg_size, unsigned nb_mbuf,

>  		rte_mempool_obj_iter(rte_mp, rte_pktmbuf_init, NULL);

>  	} else {

>  		/* wrapper to rte_mempool_create() */

> +		RTE_LOG(INFO, USER1, "preferred mempool ops %s selected\n",

> +				rte_mbuf_best_mempool_ops());


Since 285fd1019333 ("app/testpmd: register a specific log type")
we don't use USER1 in testpmd.



>  		rte_mp = rte_pktmbuf_pool_create(pool_name, nb_mbuf,

>  			mb_mempool_cache, 0, mbuf_seg_size, socket_id);

>  	}

> -- 

> 2.7.4

>
diff mbox series

Patch

diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 5dc8cca..34e07c1 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -38,6 +38,7 @@ 
 #include <rte_mempool.h>
 #include <rte_malloc.h>
 #include <rte_mbuf.h>
+#include <rte_mbuf_pool_ops.h>
 #include <rte_interrupts.h>
 #include <rte_pci.h>
 #include <rte_ether.h>
@@ -499,6 +500,8 @@  mbuf_pool_create(uint16_t mbuf_seg_size, unsigned nb_mbuf,
 		rte_mempool_obj_iter(rte_mp, rte_pktmbuf_init, NULL);
 	} else {
 		/* wrapper to rte_mempool_create() */
+		RTE_LOG(INFO, USER1, "preferred mempool ops %s selected\n",
+				rte_mbuf_best_mempool_ops());
 		rte_mp = rte_pktmbuf_pool_create(pool_name, nb_mbuf,
 			mb_mempool_cache, 0, mbuf_seg_size, socket_id);
 	}