diff mbox series

[2/2] app/testpmd: fix verbose mode dump for Tx

Message ID 20210816070943.26807-2-ndabilpuram@marvell.com (mailing list archive)
State Accepted
Delegated to: Ferruh Yigit
Headers show
Series [1/2] app/testpmd: fix csumonly mode when run without outer chksum | expand

Checks

Context Check Description
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-aarch64-unit-testing success Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS
ci/intel-Testing success Testing PASS
ci/Intel-compilation success Compilation OK
ci/github-robot: build success github build: passed
ci/checkpatch success coding style OK

Commit Message

Nithin Kumar Dabilpuram Aug. 16, 2021, 7:09 a.m. UTC
Fix verbose mode dump for Tx to dump tx offload flags instead of
Rx offload flags.

Fixes: d862c45b5955 ("app/testpmd: move dumping packets to a separate function")
Cc: rasland@mellanox.com
Cc: stable@dpdk.org

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
---
 app/test-pmd/util.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Comments

Li, Xiaoyun Aug. 17, 2021, 1:54 a.m. UTC | #1
> -----Original Message-----
> From: Nithin Dabilpuram <ndabilpuram@marvell.com>
> Sent: Monday, August 16, 2021 15:10
> To: Li, Xiaoyun <xiaoyun.li@intel.com>
> Cc: jerinj@marvell.com; dev@dpdk.org; Nithin Dabilpuram
> <ndabilpuram@marvell.com>; rasland@mellanox.com; stable@dpdk.org
> Subject: [PATCH 2/2] app/testpmd: fix verbose mode dump for Tx
> 
> Fix verbose mode dump for Tx to dump tx offload flags instead of Rx offload
> flags.
> 
> Fixes: d862c45b5955 ("app/testpmd: move dumping packets to a separate
> function")
> Cc: rasland@mellanox.com
> Cc: stable@dpdk.org
> 
> Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
> ---
>  app/test-pmd/util.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/app/test-pmd/util.c b/app/test-pmd/util.c index 5dd7157..14a9a25
> 100644
> --- a/app/test-pmd/util.c
> +++ b/app/test-pmd/util.c
> @@ -275,7 +275,11 @@ dump_pkt_burst(uint16_t port_id, uint16_t queue,
> struct rte_mbuf *pkts[],
>  			  " - %s queue=0x%x", is_rx ? "Receive" : "Send",
>  			  (unsigned int) queue);
>  		MKDUMPSTR(print_buf, buf_size, cur_len, "\n");
> -		rte_get_rx_ol_flag_list(mb->ol_flags, buf, sizeof(buf));
> +		if (is_rx)
> +			rte_get_rx_ol_flag_list(mb->ol_flags, buf, sizeof(buf));
> +		else
> +			rte_get_tx_ol_flag_list(mb->ol_flags, buf, sizeof(buf));
> +
>  		MKDUMPSTR(print_buf, buf_size, cur_len,
>  			  "  ol_flags: %s\n", buf);
>  		if (rte_mbuf_check(mb, 1, &reason) < 0)
> --
> 2.8.4

Acked-by: Xiaoyun Li <xiaoyun.li@intel.com>
Raslan Darawsheh Aug. 17, 2021, 7:54 a.m. UTC | #2
Hi,

> -----Original Message-----
> From: Li, Xiaoyun <xiaoyun.li@intel.com>
> Sent: Tuesday, August 17, 2021 4:54 AM
> To: Nithin Dabilpuram <ndabilpuram@marvell.com>
> Cc: jerinj@marvell.com; dev@dpdk.org; Raslan Darawsheh
> <rasland@nvidia.com>; stable@dpdk.org
> Subject: RE: [PATCH 2/2] app/testpmd: fix verbose mode dump for Tx
> 
> 
> 
> > -----Original Message-----
> > From: Nithin Dabilpuram <ndabilpuram@marvell.com>
> > Sent: Monday, August 16, 2021 15:10
> > To: Li, Xiaoyun <xiaoyun.li@intel.com>
> > Cc: jerinj@marvell.com; dev@dpdk.org; Nithin Dabilpuram
> > <ndabilpuram@marvell.com>; rasland@mellanox.com; stable@dpdk.org
> > Subject: [PATCH 2/2] app/testpmd: fix verbose mode dump for Tx
> >
> > Fix verbose mode dump for Tx to dump tx offload flags instead of Rx
> offload
> > flags.
> >
> > Fixes: d862c45b5955 ("app/testpmd: move dumping packets to a separate
> > function")
> > Cc: rasland@mellanox.com
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
> > ---
> >  app/test-pmd/util.c | 6 +++++-
> >  1 file changed, 5 insertions(+), 1 deletion(-)
> >
> > diff --git a/app/test-pmd/util.c b/app/test-pmd/util.c index
> 5dd7157..14a9a25
> > 100644
> > --- a/app/test-pmd/util.c
> > +++ b/app/test-pmd/util.c
> > @@ -275,7 +275,11 @@ dump_pkt_burst(uint16_t port_id, uint16_t
> queue,
> > struct rte_mbuf *pkts[],
> >  			  " - %s queue=0x%x", is_rx ? "Receive" : "Send",
> >  			  (unsigned int) queue);
> >  		MKDUMPSTR(print_buf, buf_size, cur_len, "\n");
> > -		rte_get_rx_ol_flag_list(mb->ol_flags, buf, sizeof(buf));
> > +		if (is_rx)
> > +			rte_get_rx_ol_flag_list(mb->ol_flags, buf,
> sizeof(buf));
> > +		else
> > +			rte_get_tx_ol_flag_list(mb->ol_flags, buf,
> sizeof(buf));
> > +
> >  		MKDUMPSTR(print_buf, buf_size, cur_len,
> >  			  "  ol_flags: %s\n", buf);
> >  		if (rte_mbuf_check(mb, 1, &reason) < 0)
> > --
> > 2.8.4
> 
> Acked-by: Xiaoyun Li <xiaoyun.li@intel.com>
Acked-by: Raslan Darawsheh <rasland@nvidia.com>

Kindest regards,
Raslan Darawsheh
diff mbox series

Patch

diff --git a/app/test-pmd/util.c b/app/test-pmd/util.c
index 5dd7157..14a9a25 100644
--- a/app/test-pmd/util.c
+++ b/app/test-pmd/util.c
@@ -275,7 +275,11 @@  dump_pkt_burst(uint16_t port_id, uint16_t queue, struct rte_mbuf *pkts[],
 			  " - %s queue=0x%x", is_rx ? "Receive" : "Send",
 			  (unsigned int) queue);
 		MKDUMPSTR(print_buf, buf_size, cur_len, "\n");
-		rte_get_rx_ol_flag_list(mb->ol_flags, buf, sizeof(buf));
+		if (is_rx)
+			rte_get_rx_ol_flag_list(mb->ol_flags, buf, sizeof(buf));
+		else
+			rte_get_tx_ol_flag_list(mb->ol_flags, buf, sizeof(buf));
+
 		MKDUMPSTR(print_buf, buf_size, cur_len,
 			  "  ol_flags: %s\n", buf);
 		if (rte_mbuf_check(mb, 1, &reason) < 0)