DPDK patches and discussions
 help / color / mirror / Atom feed
From: Chengwen Feng <fengchengwen@huawei.com>
To: <thomas@monjalon.net>, <kevin.laatz@intel.com>,
	<bruce.richardson@intel.com>
Cc: <dev@dpdk.org>
Subject: [PATCH 3/4] examples/dma: support enqueue drop statistic
Date: Mon, 11 Apr 2022 10:56:33 +0800	[thread overview]
Message-ID: <20220411025634.33032-4-fengchengwen@huawei.com> (raw)
In-Reply-To: <20220411025634.33032-1-fengchengwen@huawei.com>

The copy drop statistic counted in two scenarios: DMA copy failures and
enqueue failures. so it is difficult to locate the problem.

This patch adds enqueue drop statistic to fix the it.

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
---
 examples/dma/dmafwd.c | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/examples/dma/dmafwd.c b/examples/dma/dmafwd.c
index dd576bcf77..6b1b777cb8 100644
--- a/examples/dma/dmafwd.c
+++ b/examples/dma/dmafwd.c
@@ -58,6 +58,7 @@ struct dma_port_statistics {
 	uint64_t tx[RTE_MAX_ETHPORTS];
 	uint64_t tx_dropped[RTE_MAX_ETHPORTS];
 	uint64_t copy_dropped[RTE_MAX_ETHPORTS];
+	uint64_t enqueue_dropped[RTE_MAX_ETHPORTS];
 };
 struct dma_port_statistics port_statistics;
 struct total_statistics {
@@ -132,12 +133,14 @@ print_port_stats(uint16_t port_id)
 		"\nPackets sent: %34"PRIu64
 		"\nPackets received: %30"PRIu64
 		"\nPackets dropped on tx: %25"PRIu64
-		"\nPackets dropped on copy: %23"PRIu64,
+		"\nPackets dropped on copy: %23"PRIu64
+		"\nPackets dropped on enqueue: %20"PRIu64,
 		port_id,
 		port_statistics.tx[port_id],
 		port_statistics.rx[port_id],
 		port_statistics.tx_dropped[port_id],
-		port_statistics.copy_dropped[port_id]);
+		port_statistics.copy_dropped[port_id],
+		port_statistics.enqueue_dropped[port_id]);
 }
 
 /* Print out statistics for one dmadev device. */
@@ -227,8 +230,9 @@ print_stats(char *prgname)
 			print_port_stats(port_id);
 
 			delta_ts.total_packets_dropped +=
-				port_statistics.tx_dropped[port_id]
-				+ port_statistics.copy_dropped[port_id];
+				port_statistics.tx_dropped[port_id] +
+				port_statistics.copy_dropped[port_id] +
+				port_statistics.enqueue_dropped[port_id];
 			delta_ts.total_packets_tx +=
 				port_statistics.tx[port_id];
 			delta_ts.total_packets_rx +=
@@ -450,7 +454,7 @@ dma_rx_port(struct rxtx_port_config *rx_config)
 			(void *)&pkts_burst_copy[nb_enq],
 			nb_rx - nb_enq);
 
-		port_statistics.copy_dropped[rx_config->rxtx_port] +=
+		port_statistics.enqueue_dropped[rx_config->rxtx_port] +=
 			(nb_rx - nb_enq);
 	}
 }
-- 
2.33.0


  parent reply	other threads:[~2022-04-11  3:02 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-11  2:56 [PATCH 0/4] bugfix and enhance features for DMA example Chengwen Feng
2022-04-11  2:56 ` [PATCH 1/4] examples/dma: fix MTU configuration Chengwen Feng
2022-04-11  2:56 ` [PATCH 2/4] examples/dma: fix Tx drop statistic is not collected Chengwen Feng
2022-04-11  2:56 ` Chengwen Feng [this message]
2022-04-11  2:56 ` [PATCH 4/4] examples/dma: add minimal copy size parameter Chengwen Feng
2022-04-11  9:27   ` Bruce Richardson
2022-04-11 12:23     ` fengchengwen
2022-04-11 12:14 ` [PATCH v2 0/4] bugfix and enhance features for DMA example Chengwen Feng
2022-04-11 12:14   ` [PATCH v2 1/4] examples/dma: fix MTU configuration Chengwen Feng
2022-04-11 12:14   ` [PATCH v2 2/4] examples/dma: fix Tx drop statistic is not collected Chengwen Feng
2022-04-13 14:57     ` Bruce Richardson
2022-04-11 12:14   ` [PATCH v2 3/4] examples/dma: support enqueue drop statistic Chengwen Feng
2022-04-13 15:01     ` Bruce Richardson
2022-04-16  6:19       ` fengchengwen
2022-04-19  8:45         ` Bruce Richardson
2022-04-19 12:09           ` fengchengwen
2022-04-24  3:55             ` fengchengwen
2022-04-11 12:14   ` [PATCH v2 4/4] examples/dma: add force minimal copy size parameter Chengwen Feng
2022-04-13 15:04     ` Bruce Richardson
2022-04-24  6:07 ` [PATCH v3 0/3] bugfix and enhance features for DMA example Chengwen Feng
2022-04-24  6:07   ` [PATCH v3 1/3] examples/dma: fix MTU configuration Chengwen Feng
2022-05-11  2:26     ` fengchengwen
2022-04-24  6:07   ` [PATCH v3 2/3] examples/dma: fix Tx drop statistic is not collected Chengwen Feng
2022-04-27 10:54     ` Kevin Laatz
2022-04-24  6:07   ` [PATCH v3 3/3] examples/dma: add force minimal copy size parameter Chengwen Feng
2022-04-27 10:54     ` Kevin Laatz
2022-06-06 21:35   ` [PATCH v3 0/3] bugfix and enhance features for DMA example Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220411025634.33032-4-fengchengwen@huawei.com \
    --to=fengchengwen@huawei.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=kevin.laatz@intel.com \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).