[v13,5/7] app/testpmd: dump port info for shared Rx queue

Message ID 20211021104142.2649060-6-xuemingl@nvidia.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers
Series ethdev: introduce shared Rx queue |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Xueming Li Oct. 21, 2021, 10:41 a.m. UTC
  In case of shared Rx queue, source port mbuf from polling result isn't
the Rx port of forwarding stream. To provide original port ID, this
patch dumps mbuf->port for each packet in verbose mode if shared Rx
queue enabled.

Signed-off-by: Xueming Li <xuemingl@nvidia.com>
Acked-by: Xiaoyun Li <xiaoyun.li@intel.com>
---
 app/test-pmd/util.c | 3 +++
 1 file changed, 3 insertions(+)
  

Comments

Ajit Khaparde Oct. 21, 2021, 7:48 p.m. UTC | #1
On Thu, Oct 21, 2021 at 3:42 AM Xueming Li <xuemingl@nvidia.com> wrote:
>
> In case of shared Rx queue, source port mbuf from polling result isn't
> the Rx port of forwarding stream. To provide original port ID, this
> patch dumps mbuf->port for each packet in verbose mode if shared Rx
> queue enabled.
>
> Signed-off-by: Xueming Li <xuemingl@nvidia.com>
> Acked-by: Xiaoyun Li <xiaoyun.li@intel.com>

Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>

> ---
>  app/test-pmd/util.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/app/test-pmd/util.c b/app/test-pmd/util.c
> index 26dc0c86406..f712f687287 100644
> --- a/app/test-pmd/util.c
> +++ b/app/test-pmd/util.c
> @@ -101,6 +101,9 @@ dump_pkt_burst(uint16_t port_id, uint16_t queue, struct rte_mbuf *pkts[],
>                 struct rte_port *port = &ports[port_id];
>
>                 mb = pkts[i];
> +               if (rxq_share > 0)
> +                       MKDUMPSTR(print_buf, buf_size, cur_len, "port %u, ",
> +                                 mb->port);
>                 eth_hdr = rte_pktmbuf_read(mb, 0, sizeof(_eth_hdr), &_eth_hdr);
>                 eth_type = RTE_BE_TO_CPU_16(eth_hdr->ether_type);
>                 packet_type = mb->packet_type;
> --
> 2.33.0
>
  

Patch

diff --git a/app/test-pmd/util.c b/app/test-pmd/util.c
index 26dc0c86406..f712f687287 100644
--- a/app/test-pmd/util.c
+++ b/app/test-pmd/util.c
@@ -101,6 +101,9 @@  dump_pkt_burst(uint16_t port_id, uint16_t queue, struct rte_mbuf *pkts[],
 		struct rte_port *port = &ports[port_id];
 
 		mb = pkts[i];
+		if (rxq_share > 0)
+			MKDUMPSTR(print_buf, buf_size, cur_len, "port %u, ",
+				  mb->port);
 		eth_hdr = rte_pktmbuf_read(mb, 0, sizeof(_eth_hdr), &_eth_hdr);
 		eth_type = RTE_BE_TO_CPU_16(eth_hdr->ether_type);
 		packet_type = mb->packet_type;