patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Kevin Traynor <ktraynor@redhat.com>
To: David Marchand <david.marchand@redhat.com>
Cc: Andrew Rybchenko <arybchenko@solarflare.com>,
	Maxime Coquelin <maxime.coquelin@redhat.com>,
	Ferruh Yigit <ferruh.yigit@intel.com>,
	dpdk stable <stable@dpdk.org>
Subject: [dpdk-stable] patch 'app/testpmd: extend forwarding statistics to 64 bits' has been queued to LTS release 18.11.2
Date: Thu, 25 Apr 2019 16:39:55 +0100	[thread overview]
Message-ID: <20190425154037.28778-20-ktraynor@redhat.com> (raw)
In-Reply-To: <20190425154037.28778-1-ktraynor@redhat.com>

Hi,

FYI, your patch has been queued to LTS release 18.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/01/19. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches can be viewed on the 18.11 branch at:
	https://github.com/kevintraynor/dpdk-stable-queue.git

Thanks.

Kevin Traynor

---
From aa28996c41d4e666a2ae48685c632ecd9f0a1819 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Mon, 25 Mar 2019 09:51:44 +0100
Subject: [PATCH] app/testpmd: extend forwarding statistics to 64 bits

[ upstream commit c185d42cb417bc4a51e9aa74f1d338fac2f1d1f0 ]

fwd engine statistics are stored as unsigned int (32bits) and can wrap
quite quickly.
Example: sending 7mpps for 614s gives us 4298000000 packets =>
0x1002e4680 larger than 32bits.

testpmd reports forwarding stats as:
RX-packets: 3500381        TX-packets: 3500010        TX-dropped: 371

While the port and accumulated stats are reported as 64bits:
RX-packets: 4298467677     RX-dropped: 0             RX-total: 4298467677
TX-packets: 4298467306     TX-dropped: 371           TX-total: 4298467677

Fixes: af75078fece3 ("first public release")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 app/test-pmd/testpmd.c | 49 ++++++++++++++----------------------------
 app/test-pmd/testpmd.h | 12 +++++------
 2 files changed, 22 insertions(+), 39 deletions(-)

diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index c6c46cb67..d62c1594d 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -1472,11 +1472,13 @@ fwd_stream_stats_display(streamid_t stream_id)
 	       fwd_top_stats_border, fs->rx_port, fs->rx_queue,
 	       fs->tx_port, fs->tx_queue, fwd_top_stats_border);
-	printf("  RX-packets: %-14u TX-packets: %-14u TX-dropped: %-14u",
+	printf("  RX-packets: %-14"PRIu64" TX-packets: %-14"PRIu64
+	       " TX-dropped: %-14"PRIu64,
 	       fs->rx_packets, fs->tx_packets, fs->fwd_dropped);
 
 	/* if checksum mode */
 	if (cur_fwd_eng == &csum_fwd_engine) {
-	       printf("  RX- bad IP checksum: %-14u  Rx- bad L4 checksum: "
-			"%-14u Rx- bad outer L4 checksum: %-14u\n",
+		printf("  RX- bad IP checksum: %-14"PRIu64
+		       "  Rx- bad L4 checksum: %-14"PRIu64
+		       " Rx- bad outer L4 checksum: %-14"PRIu64"\n",
 			fs->rx_bad_ip_csum, fs->rx_bad_l4_csum,
 			fs->rx_bad_outer_l4_csum);
@@ -1758,7 +1760,4 @@ stop_packet_forwarding(void)
 	uint64_t total_tx_dropped;
 	uint64_t total_rx_nombuf;
-	uint64_t tx_dropped;
-	uint64_t rx_bad_ip_csum;
-	uint64_t rx_bad_l4_csum;
 #ifdef RTE_TEST_PMD_RECORD_CORE_CYCLES
 	uint64_t fwd_cycles;
@@ -1787,36 +1786,20 @@ stop_packet_forwarding(void)
 #endif
 	for (sm_id = 0; sm_id < cur_fwd_config.nb_fwd_streams; sm_id++) {
+		struct fwd_stream *fs = fwd_streams[sm_id];
+
 		if (cur_fwd_config.nb_fwd_streams >
 		    cur_fwd_config.nb_fwd_ports) {
 			fwd_stream_stats_display(sm_id);
-			ports[fwd_streams[sm_id]->tx_port].tx_stream = NULL;
-			ports[fwd_streams[sm_id]->rx_port].rx_stream = NULL;
+			ports[fs->tx_port].tx_stream = NULL;
+			ports[fs->rx_port].rx_stream = NULL;
 		} else {
-			ports[fwd_streams[sm_id]->tx_port].tx_stream =
-				fwd_streams[sm_id];
-			ports[fwd_streams[sm_id]->rx_port].rx_stream =
-				fwd_streams[sm_id];
+			ports[fs->tx_port].tx_stream = fs;
+			ports[fs->rx_port].rx_stream = fs;
 		}
-		tx_dropped = ports[fwd_streams[sm_id]->tx_port].tx_dropped;
-		tx_dropped = (uint64_t) (tx_dropped +
-					 fwd_streams[sm_id]->fwd_dropped);
-		ports[fwd_streams[sm_id]->tx_port].tx_dropped = tx_dropped;
-
-		rx_bad_ip_csum =
-			ports[fwd_streams[sm_id]->rx_port].rx_bad_ip_csum;
-		rx_bad_ip_csum = (uint64_t) (rx_bad_ip_csum +
-					 fwd_streams[sm_id]->rx_bad_ip_csum);
-		ports[fwd_streams[sm_id]->rx_port].rx_bad_ip_csum =
-							rx_bad_ip_csum;
-
-		rx_bad_l4_csum =
-			ports[fwd_streams[sm_id]->rx_port].rx_bad_l4_csum;
-		rx_bad_l4_csum = (uint64_t) (rx_bad_l4_csum +
-					 fwd_streams[sm_id]->rx_bad_l4_csum);
-		ports[fwd_streams[sm_id]->rx_port].rx_bad_l4_csum =
-							rx_bad_l4_csum;
-
-		ports[fwd_streams[sm_id]->rx_port].rx_bad_outer_l4_csum +=
-				fwd_streams[sm_id]->rx_bad_outer_l4_csum;
+		ports[fs->tx_port].tx_dropped += fs->fwd_dropped;
+		ports[fs->rx_port].rx_bad_ip_csum += fs->rx_bad_ip_csum;
+		ports[fs->rx_port].rx_bad_l4_csum += fs->rx_bad_l4_csum;
+		ports[fs->rx_port].rx_bad_outer_l4_csum +=
+				fs->rx_bad_outer_l4_csum;
 
 #ifdef RTE_TEST_PMD_RECORD_CORE_CYCLES
diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
index ed8f7b0b2..37d61b804 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -120,10 +120,10 @@ struct fwd_stream {
 
 	/* "read-write" results */
-	unsigned int rx_packets;  /**< received packets */
-	unsigned int tx_packets;  /**< received packets transmitted */
-	unsigned int fwd_dropped; /**< received packets not forwarded */
-	unsigned int rx_bad_ip_csum ; /**< received packets has bad ip checksum */
-	unsigned int rx_bad_l4_csum ; /**< received packets has bad l4 checksum */
-	unsigned int rx_bad_outer_l4_csum;
+	uint64_t rx_packets;  /**< received packets */
+	uint64_t tx_packets;  /**< received packets transmitted */
+	uint64_t fwd_dropped; /**< received packets not forwarded */
+	uint64_t rx_bad_ip_csum ; /**< received packets has bad ip checksum */
+	uint64_t rx_bad_l4_csum ; /**< received packets has bad l4 checksum */
+	uint64_t rx_bad_outer_l4_csum;
 	/**< received packets has bad outer l4 checksum */
 	unsigned int gro_times;	/**< GRO operation times */
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-04-25 16:37:47.620535696 +0100
+++ 0020-app-testpmd-extend-forwarding-statistics-to-64-bits.patch	2019-04-25 16:37:46.710295750 +0100
@@ -1 +1 @@
-From c185d42cb417bc4a51e9aa74f1d338fac2f1d1f0 Mon Sep 17 00:00:00 2001
+From aa28996c41d4e666a2ae48685c632ecd9f0a1819 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c185d42cb417bc4a51e9aa74f1d338fac2f1d1f0 ]
+
@@ -19 +20,0 @@
-Cc: stable@dpdk.org
@@ -31 +32 @@
-index 771584455..05a3dce49 100644
+index c6c46cb67..d62c1594d 100644
@@ -34 +35 @@
-@@ -1460,11 +1460,13 @@ fwd_stream_stats_display(streamid_t stream_id)
+@@ -1472,11 +1472,13 @@ fwd_stream_stats_display(streamid_t stream_id)
@@ -51 +52 @@
-@@ -1746,7 +1748,4 @@ stop_packet_forwarding(void)
+@@ -1758,7 +1760,4 @@ stop_packet_forwarding(void)
@@ -59 +60 @@
-@@ -1775,36 +1774,20 @@ stop_packet_forwarding(void)
+@@ -1787,36 +1786,20 @@ stop_packet_forwarding(void)
@@ -108 +109 @@
-index 85b791b6b..4f4a48ffa 100644
+index ed8f7b0b2..37d61b804 100644

  parent reply	other threads:[~2019-04-25 15:41 UTC|newest]

Thread overview: 63+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-25 15:39 [dpdk-stable] patch 'drivers: fix SPDX license id consistency' " Kevin Traynor
2019-04-25 15:39 ` [dpdk-stable] patch 'malloc: fix IPC message initialization' " Kevin Traynor
2019-04-25 15:39 ` [dpdk-stable] patch 'bus/vmbus: fix secondary process setup' " Kevin Traynor
2019-04-25 15:39 ` [dpdk-stable] patch 'net/netvsc: fix VF support with secondary process' " Kevin Traynor
2019-04-25 15:39 ` [dpdk-stable] patch 'bus/vmbus: fix check for mmap failure' " Kevin Traynor
2019-04-25 15:39 ` [dpdk-stable] patch 'bus/vmbus: stop mapping if empty resource found' " Kevin Traynor
2019-04-25 15:39 ` [dpdk-stable] patch 'bus/vmbus: map ring in secondary process' " Kevin Traynor
2019-04-25 15:39 ` [dpdk-stable] patch 'bus/fslmc: decrease log level for unsupported devices' " Kevin Traynor
2019-04-26  9:38   ` [dpdk-stable] [EXT] " Hemant Agrawal
2019-04-25 15:39 ` [dpdk-stable] patch 'bus/dpaa: fix Rx discard register mask' " Kevin Traynor
2019-04-25 15:39 ` [dpdk-stable] patch 'mem: warn user when running without NUMA support' " Kevin Traynor
2019-04-25 15:39 ` [dpdk-stable] patch 'eal/linux: remove thread ID from debug message' " Kevin Traynor
2019-04-25 15:39 ` [dpdk-stable] patch 'bus/fslmc: remove unused include of error.h' " Kevin Traynor
2019-04-25 15:39 ` [dpdk-stable] patch 'bus/fslmc: fix build with musl libc' " Kevin Traynor
2019-04-25 15:39 ` [dpdk-stable] patch 'net/nfp: " Kevin Traynor
2019-04-25 15:39 ` [dpdk-stable] patch 'net/netvsc: fix include of fcntl.h' " Kevin Traynor
2019-04-25 15:39 ` [dpdk-stable] patch 'app/test: fix flags with meson' " Kevin Traynor
2019-04-25 15:39 ` [dpdk-stable] patch 'app/test: fix build with musl libc' " Kevin Traynor
2019-04-25 15:39 ` [dpdk-stable] patch 'net/vdev_netvsc: fix device cast' " Kevin Traynor
2019-04-25 15:39 ` [dpdk-stable] patch 'app/testpmd: add missing newline when showing statistics' " Kevin Traynor
2019-04-25 15:39 ` Kevin Traynor [this message]
2019-04-25 15:39 ` [dpdk-stable] patch 'app/testpmd: remove useless casts on " Kevin Traynor
2019-04-25 15:39 ` [dpdk-stable] patch 'ethdev: fix a typo' " Kevin Traynor
2019-04-25 15:39 ` [dpdk-stable] patch 'net/i40e: log when provided RSS key is not valid' " Kevin Traynor
2019-04-25 15:39 ` [dpdk-stable] patch 'net/bnxt: fix Rx VLAN offload flags' " Kevin Traynor
2019-04-25 15:40 ` [dpdk-stable] patch 'net/fm10k: fix VLAN strip offload flag' " Kevin Traynor
2019-04-25 15:40 ` [dpdk-stable] patch 'net/virtio: fix duplicate naming of include guard' " Kevin Traynor
2019-04-25 15:40 ` [dpdk-stable] patch 'net/virtio-user: fix multi-process support' " Kevin Traynor
2019-04-25 15:40 ` [dpdk-stable] patch 'vhost/crypto: fix parens' " Kevin Traynor
2019-04-25 15:40 ` [dpdk-stable] patch 'raw/ifpga: modify log output' " Kevin Traynor
2019-04-25 15:40 ` [dpdk-stable] patch 'net/netvsc: remove useless condition' " Kevin Traynor
2019-04-25 15:40 ` [dpdk-stable] patch 'net/virtio: " Kevin Traynor
2019-04-25 15:40 ` [dpdk-stable] patch 'power: fix governor storage to trim newlines' " Kevin Traynor
2019-04-25 15:40 ` [dpdk-stable] patch 'telemetry: fix mapping of statistics' " Kevin Traynor
2019-04-25 15:40 ` [dpdk-stable] patch 'app/test: fix sprintf with strlcat' " Kevin Traynor
2019-04-25 15:40 ` [dpdk-stable] patch 'maintainers: update for IBM POWER' " Kevin Traynor
2019-04-25 15:40 ` [dpdk-stable] patch 'eal: initialize alarms early' " Kevin Traynor
2019-04-25 15:40 ` [dpdk-stable] patch 'ring: fix an error message' " Kevin Traynor
2019-04-25 15:40 ` [dpdk-stable] patch 'mem: limit use of address hint' " Kevin Traynor
2019-04-25 15:40 ` [dpdk-stable] patch 'event/sw: fix enqueue checks in self-test' " Kevin Traynor
2019-04-25 15:40 ` [dpdk-stable] patch 'test/event: replace sprintf with snprintf' " Kevin Traynor
2019-04-25 15:40 ` [dpdk-stable] patch 'compress/isal: fix compression stream initialization' " Kevin Traynor
2019-04-25 15:40 ` [dpdk-stable] patch 'crypto/dpaa2_sec: fix session clearing' " Kevin Traynor
2019-04-25 15:40 ` [dpdk-stable] patch 'crypto/dpaa2_sec: fix offset calculation for GCM' " Kevin Traynor
2019-04-25 15:40 ` [dpdk-stable] patch 'drivers/qat: fix queue pair NUMA node' " Kevin Traynor
2019-04-25 15:40 ` [dpdk-stable] patch 'compress/isal: fix getting information about CPU' " Kevin Traynor
2019-04-25 15:40 ` [dpdk-stable] patch 'ring: fix namesize macro documentation block' " Kevin Traynor
2019-04-25 15:40 ` [dpdk-stable] patch 'eal: tighten permissions on shared memory files' " Kevin Traynor
2019-04-25 15:40 ` [dpdk-stable] patch 'net/bonding: fix buffer length when printing strings' " Kevin Traynor
2019-04-25 15:40 ` [dpdk-stable] patch 'raw/dpaa2_qdma: fix to support multiprocess execution' " Kevin Traynor
2019-04-25 15:40 ` [dpdk-stable] patch 'power: remove unused variable' " Kevin Traynor
2019-04-25 15:40 ` [dpdk-stable] patch 'test/distributor: replace sprintf with strlcpy' " Kevin Traynor
2019-04-25 15:40 ` [dpdk-stable] patch 'test/hash: replace sprintf with snprintf' " Kevin Traynor
2019-04-25 15:40 ` [dpdk-stable] patch 'eal: fix typo in comment of vector function' " Kevin Traynor
2019-04-25 15:40 ` [dpdk-stable] patch 'doc: fix links to doxygen and sphinx sites' " Kevin Traynor
2019-04-25 15:40 ` [dpdk-stable] patch 'doc: fix two typos in contributing guide' " Kevin Traynor
2019-04-25 15:40 ` [dpdk-stable] patch 'doc: fix ABI check script examples' " Kevin Traynor
2019-04-25 15:40 ` [dpdk-stable] patch 'cfgfile: replace strcat with strlcat' " Kevin Traynor
2019-04-25 15:40 ` [dpdk-stable] patch 'net/mlx5: fix errno typos in comments' " Kevin Traynor
2019-04-25 15:40 ` [dpdk-stable] patch 'doc: fix typos in mlx5 guide' " Kevin Traynor
2019-04-25 15:40 ` [dpdk-stable] patch 'doc: fix typos in testpmd user " Kevin Traynor
2019-04-25 15:40 ` [dpdk-stable] patch 'app/testpmd: fix typo in comment' " Kevin Traynor
2019-04-25 15:40 ` [dpdk-stable] patch 'ethdev: fix typo in error messages' " Kevin Traynor

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=20190425154037.28778-20-ktraynor@redhat.com \
    --to=ktraynor@redhat.com \
    --cc=arybchenko@solarflare.com \
    --cc=david.marchand@redhat.com \
    --cc=ferruh.yigit@intel.com \
    --cc=maxime.coquelin@redhat.com \
    --cc=stable@dpdk.org \
    /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).