[v1] mempool: dump socket id attribute

Message ID 20200911081316.6278-1-sachin.saxena@oss.nxp.com (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers
Series [v1] mempool: dump socket id attribute |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/Intel-compilation success Compilation OK
ci/iol-testing success Testing PASS

Commit Message

Sachin Saxena (OSS) Sept. 11, 2020, 8:13 a.m. UTC
  From: Sachin Saxena <sachin.saxena@oss.nxp.com>

Enhance the dump function to also print socket_id attribute
passed at creation time.

Signed-off-by: Sachin Saxena <sachin.saxena@oss.nxp.com>
---
 lib/librte_mempool/rte_mempool.c | 1 +
 1 file changed, 1 insertion(+)
  

Comments

Andrew Rybchenko Sept. 11, 2020, 8:31 a.m. UTC | #1
On 9/11/20 11:13 AM, Sachin Saxena (OSS) wrote:
> From: Sachin Saxena <sachin.saxena@oss.nxp.com>
> 
> Enhance the dump function to also print socket_id attribute
> passed at creation time.
> 
> Signed-off-by: Sachin Saxena <sachin.saxena@oss.nxp.com>

Please, include maintainers in the recipient list the next time.

Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>

> ---
>  lib/librte_mempool/rte_mempool.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/lib/librte_mempool/rte_mempool.c b/lib/librte_mempool/rte_mempool.c
> index 7774f0c8d..2d49ecd2b 100644
> --- a/lib/librte_mempool/rte_mempool.c
> +++ b/lib/librte_mempool/rte_mempool.c
> @@ -1275,6 +1275,7 @@ rte_mempool_dump(FILE *f, struct rte_mempool *mp)
>  
>  	fprintf(f, "mempool <%s>@%p\n", mp->name, mp);
>  	fprintf(f, "  flags=%x\n", mp->flags);
> +	fprintf(f, "  socket_id=%d\n", mp->socket_id);
>  	fprintf(f, "  pool=%p\n", mp->pool_data);
>  	fprintf(f, "  iova=0x%" PRIx64 "\n", mp->mz->iova);
>  	fprintf(f, "  nb_mem_chunks=%u\n", mp->nb_mem_chunks);
>
  
Thomas Monjalon Oct. 5, 2020, 10:57 p.m. UTC | #2
11/09/2020 10:31, Andrew Rybchenko:
> On 9/11/20 11:13 AM, Sachin Saxena (OSS) wrote:
> > From: Sachin Saxena <sachin.saxena@oss.nxp.com>
> > 
> > Enhance the dump function to also print socket_id attribute
> > passed at creation time.
> > 
> > Signed-off-by: Sachin Saxena <sachin.saxena@oss.nxp.com>
> 
> Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>

Applied, thanks
  

Patch

diff --git a/lib/librte_mempool/rte_mempool.c b/lib/librte_mempool/rte_mempool.c
index 7774f0c8d..2d49ecd2b 100644
--- a/lib/librte_mempool/rte_mempool.c
+++ b/lib/librte_mempool/rte_mempool.c
@@ -1275,6 +1275,7 @@  rte_mempool_dump(FILE *f, struct rte_mempool *mp)
 
 	fprintf(f, "mempool <%s>@%p\n", mp->name, mp);
 	fprintf(f, "  flags=%x\n", mp->flags);
+	fprintf(f, "  socket_id=%d\n", mp->socket_id);
 	fprintf(f, "  pool=%p\n", mp->pool_data);
 	fprintf(f, "  iova=0x%" PRIx64 "\n", mp->mz->iova);
 	fprintf(f, "  nb_mem_chunks=%u\n", mp->nb_mem_chunks);