[v6,03/13] app/testpmd: dump Rx and Tx mbuf

Message ID 1579103627-31985-4-git-send-email-bernard.iremonger@intel.com (mailing list archive)
State Superseded, archived
Delegated to: Ferruh Yigit
Headers
Series net/i40e: ESP support |

Checks

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

Commit Message

Iremonger, Bernard Jan. 15, 2020, 3:53 p.m. UTC
  add call to rte_pktmbuf_dump() in dump_pkt_burst in util.c

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
---
 app/test-pmd/util.c | 1 +
 1 file changed, 1 insertion(+)
  

Comments

Ferruh Yigit Jan. 15, 2020, 4:28 p.m. UTC | #1
On 1/15/2020 3:53 PM, Bernard Iremonger wrote:
> add call to rte_pktmbuf_dump() in dump_pkt_burst in util.c
> 
> Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
> ---
>  app/test-pmd/util.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/app/test-pmd/util.c b/app/test-pmd/util.c
> index b514be5..bf03873 100644
> --- a/app/test-pmd/util.c
> +++ b/app/test-pmd/util.c
> @@ -158,6 +158,7 @@ dump_pkt_burst(uint16_t port_id, uint16_t queue, struct rte_mbuf *pkts[],
>  		printf("  ol_flags: %s\n", buf);
>  		if (rte_mbuf_check(mb, 1, &reason) < 0)
>  			printf("INVALID mbuf: %s\n", reason);
> +		rte_pktmbuf_dump(stdout, pkts[i], pkts[i]->data_len);
>  	}
>  }
>  
> 

I am not sure about this change, 'dump_pkt_burst' is good for debugging and
getting the packet metadata, but having mbuf dump for each packet can make it
very verbose and harder to use.
If there is a need for it, can we add it with another command?
like verbose value 0,1,2,3 defines the dump_pkt_burst level, why not add a new
level to dump mbuf?
  
Iremonger, Bernard Jan. 15, 2020, 4:52 p.m. UTC | #2
Hi Ferruh,

> -----Original Message-----
> From: Yigit, Ferruh <ferruh.yigit@intel.com>
> Sent: Wednesday, January 15, 2020 4:29 PM
> To: Iremonger, Bernard <bernard.iremonger@intel.com>; dev@dpdk.org;
> Xing, Beilei <beilei.xing@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>;
> Doherty, Declan <declan.doherty@intel.com>
> Cc: Ananyev, Konstantin <konstantin.ananyev@intel.com>; Byrne, Stephen1
> <stephen1.byrne@intel.com>; Zhang, Helin <helin.zhang@intel.com>
> Subject: Re: [dpdk-dev] [PATCH v6 03/13] app/testpmd: dump Rx and Tx
> mbuf
> 
> On 1/15/2020 3:53 PM, Bernard Iremonger wrote:
> > add call to rte_pktmbuf_dump() in dump_pkt_burst in util.c
> >
> > Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
> > ---
> >  app/test-pmd/util.c | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/app/test-pmd/util.c b/app/test-pmd/util.c index
> > b514be5..bf03873 100644
> > --- a/app/test-pmd/util.c
> > +++ b/app/test-pmd/util.c
> > @@ -158,6 +158,7 @@ dump_pkt_burst(uint16_t port_id, uint16_t queue,
> struct rte_mbuf *pkts[],
> >  		printf("  ol_flags: %s\n", buf);
> >  		if (rte_mbuf_check(mb, 1, &reason) < 0)
> >  			printf("INVALID mbuf: %s\n", reason);
> > +		rte_pktmbuf_dump(stdout, pkts[i], pkts[i]->data_len);
> >  	}
> >  }
> >
> >
> 
> I am not sure about this change, 'dump_pkt_burst' is good for debugging and
> getting the packet metadata, but having mbuf dump for each packet can
> make it very verbose and harder to use.
> If there is a need for it, can we add it with another command?
> like verbose value 0,1,2,3 defines the dump_pkt_burst level, why not add a
> new level to dump mbuf?

This is only printed for verbose levels 1 (rx) and 3 (rx+tx).
Normally used for debugging a small number or burst of packets.
If you think it is too verbose I can live without this patch.

Regards,

Bernard.
  

Patch

diff --git a/app/test-pmd/util.c b/app/test-pmd/util.c
index b514be5..bf03873 100644
--- a/app/test-pmd/util.c
+++ b/app/test-pmd/util.c
@@ -158,6 +158,7 @@  dump_pkt_burst(uint16_t port_id, uint16_t queue, struct rte_mbuf *pkts[],
 		printf("  ol_flags: %s\n", buf);
 		if (rte_mbuf_check(mb, 1, &reason) < 0)
 			printf("INVALID mbuf: %s\n", reason);
+		rte_pktmbuf_dump(stdout, pkts[i], pkts[i]->data_len);
 	}
 }