patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Kevin Traynor <ktraynor@redhat.com>
To: Georgiy Levashov <georgiy.levashov@oktetlabs.ru>
Cc: Andrew Rybchenko <arybchenko@solarflare.com>,
	dpdk stable <stable@dpdk.org>
Subject: [dpdk-stable] patch 'examples: add flush after stats printing' has been queued to LTS release 18.11.10
Date: Fri, 17 Jul 2020 17:31:57 +0100
Message-ID: <20200717163214.4839-9-ktraynor@redhat.com> (raw)
In-Reply-To: <20200717163214.4839-1-ktraynor@redhat.com>

Hi,

FYI, your patch has been queued to LTS release 18.11.10

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/23/20. 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 are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/7fe033b767c3cfd3bacf2664253b69afbc2d884c

Thanks.

Kevin.

---
From 7fe033b767c3cfd3bacf2664253b69afbc2d884c Mon Sep 17 00:00:00 2001
From: Georgiy Levashov <georgiy.levashov@oktetlabs.ru>
Date: Tue, 28 Apr 2020 14:27:41 +0100
Subject: [PATCH] examples: add flush after stats printing

[ upstream commit 3ee6f706519c0a7456f3d8a79048150dfa6d2581 ]

When printf()'s stdout is line-buffered for terminal, it is fully
buffered for pipes. So, stdout listener can only get the output
when it is flushed (on program termination, when buffer is filled or
manual flush).

stdout buffer might fill slowly since every stats report could be small.

Also when it is fully filled it might contain a part of the last stats
report which makes it very inconvenient for any automation which reads
and parses the output.

Fixes: af75078fece3 ("first public release")

Signed-off-by: Georgiy Levashov <georgiy.levashov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 examples/bbdev_app/main.c             | 2 ++
 examples/kni/main.c                   | 2 ++
 examples/l2fwd-crypto/main.c          | 2 ++
 examples/l2fwd-jobstats/main.c        | 3 +++
 examples/l2fwd-keepalive/main.c       | 2 ++
 examples/l2fwd/main.c                 | 2 ++
 examples/link_status_interrupt/main.c | 2 ++
 examples/tep_termination/main.c       | 2 ++
 examples/vhost/main.c                 | 2 ++
 9 files changed, 19 insertions(+)

diff --git a/examples/bbdev_app/main.c b/examples/bbdev_app/main.c
index d68c06aefb..c81dfb6e19 100644
--- a/examples/bbdev_app/main.c
+++ b/examples/bbdev_app/main.c
@@ -642,4 +642,6 @@ print_stats(struct stats_lcore_params *stats_lcore)
 	}
 
+	fflush(stdout);
+
 	free(xstats);
 	free(xstats_names);
diff --git a/examples/kni/main.c b/examples/kni/main.c
index 54bd69491b..6f15741747 100644
--- a/examples/kni/main.c
+++ b/examples/kni/main.c
@@ -159,4 +159,6 @@ print_stats(void)
 	}
 	printf("======  ==============  ============  ============  ============  ============\n");
+
+	fflush(stdout);
 }
 
diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c
index 2d79327875..36a0002c42 100644
--- a/examples/l2fwd-crypto/main.c
+++ b/examples/l2fwd-crypto/main.c
@@ -328,4 +328,6 @@ print_stats(void)
 		   total_packets_errors);
 	printf("\n====================================================\n");
+
+	fflush(stdout);
 }
 
diff --git a/examples/l2fwd-jobstats/main.c b/examples/l2fwd-jobstats/main.c
index 8443f685d3..39c73b9679 100644
--- a/examples/l2fwd-jobstats/main.c
+++ b/examples/l2fwd-jobstats/main.c
@@ -330,4 +330,7 @@ show_stats_cb(__rte_unused void *param)
 
 	printf("\n====================================================\n");
+
+	fflush(stdout);
+
 	rte_eal_alarm_set(timer_period * US_PER_S, show_stats_cb, NULL);
 }
diff --git a/examples/l2fwd-keepalive/main.c b/examples/l2fwd-keepalive/main.c
index e74eb1f53e..53fffda6af 100644
--- a/examples/l2fwd-keepalive/main.c
+++ b/examples/l2fwd-keepalive/main.c
@@ -161,4 +161,6 @@ print_stats(__attribute__((unused)) struct rte_timer *ptr_timer,
 		   total_packets_dropped);
 	printf("\n====================================================\n");
+
+	fflush(stdout);
 }
 
diff --git a/examples/l2fwd/main.c b/examples/l2fwd/main.c
index 6ddf94b005..72f9fab5bc 100644
--- a/examples/l2fwd/main.c
+++ b/examples/l2fwd/main.c
@@ -147,4 +147,6 @@ print_stats(void)
 		   total_packets_dropped);
 	printf("\n====================================================\n");
+
+	fflush(stdout);
 }
 
diff --git a/examples/link_status_interrupt/main.c b/examples/link_status_interrupt/main.c
index 17e77427a9..97bc4a2d21 100644
--- a/examples/link_status_interrupt/main.c
+++ b/examples/link_status_interrupt/main.c
@@ -159,4 +159,6 @@ print_stats(void)
 		   total_packets_dropped);
 	printf("\n====================================================\n");
+
+	fflush(stdout);
 }
 
diff --git a/examples/tep_termination/main.c b/examples/tep_termination/main.c
index 6db604ed8b..72216a81ce 100644
--- a/examples/tep_termination/main.c
+++ b/examples/tep_termination/main.c
@@ -1111,4 +1111,6 @@ print_stats(__rte_unused void *arg)
 		}
 		printf("\n================================================\n");
+
+		fflush(stdout);
 	}
 
diff --git a/examples/vhost/main.c b/examples/vhost/main.c
index 2261f089f9..f2fa074f21 100644
--- a/examples/vhost/main.c
+++ b/examples/vhost/main.c
@@ -1334,4 +1334,6 @@ print_stats(__rte_unused void *arg)
 
 		printf("===================================================\n");
+
+		fflush(stdout);
 	}
 
-- 
2.21.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-17 17:17:00.495898763 +0100
+++ 0009-examples-add-flush-after-stats-printing.patch	2020-07-17 17:16:59.977771489 +0100
@@ -1 +1 @@
-From 3ee6f706519c0a7456f3d8a79048150dfa6d2581 Mon Sep 17 00:00:00 2001
+From 7fe033b767c3cfd3bacf2664253b69afbc2d884c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3ee6f706519c0a7456f3d8a79048150dfa6d2581 ]
+
@@ -18 +19,0 @@
-Cc: stable@dpdk.org
@@ -24 +24,0 @@
- examples/ioat/ioatfwd.c               | 2 ++
@@ -27 +26,0 @@
- examples/l2fwd-event/main.c           | 2 ++
@@ -34 +33 @@
- 11 files changed, 23 insertions(+)
+ 9 files changed, 19 insertions(+)
@@ -37 +36 @@
-index fb38dc3a72..68a46050c0 100644
+index d68c06aefb..c81dfb6e19 100644
@@ -40 +39 @@
-@@ -660,4 +660,6 @@ print_stats(struct stats_lcore_params *stats_lcore)
+@@ -642,4 +642,6 @@ print_stats(struct stats_lcore_params *stats_lcore)
@@ -47,11 +45,0 @@
-diff --git a/examples/ioat/ioatfwd.c b/examples/ioat/ioatfwd.c
-index 53de231795..b66ee73bce 100644
---- a/examples/ioat/ioatfwd.c
-+++ b/examples/ioat/ioatfwd.c
-@@ -295,4 +295,6 @@ print_stats(char *prgname)
- 		print_total_stats(&delta_ts);
- 
-+		fflush(stdout);
-+
- 		ts.total_packets_tx += delta_ts.total_packets_tx;
- 		ts.total_packets_rx += delta_ts.total_packets_rx;
@@ -59 +47 @@
-index 80dd0353e7..f5d12a5b86 100644
+index 54bd69491b..6f15741747 100644
@@ -70 +58 @@
-index fcb55c370a..827da9b3e3 100644
+index 2d79327875..36a0002c42 100644
@@ -73 +61 @@
-@@ -335,4 +335,6 @@ print_stats(void)
+@@ -328,4 +328,6 @@ print_stats(void)
@@ -80,11 +67,0 @@
-diff --git a/examples/l2fwd-event/main.c b/examples/l2fwd-event/main.c
-index 9593ef11e3..4fe500333c 100644
---- a/examples/l2fwd-event/main.c
-+++ b/examples/l2fwd-event/main.c
-@@ -517,4 +517,6 @@ print_stats(struct l2fwd_resources *rsrc)
- 		   total_packets_dropped);
- 	printf("\n====================================================\n");
-+
-+	fflush(stdout);
- }
- 
@@ -92 +69 @@
-index 396fd89db4..47a3b09765 100644
+index 8443f685d3..39c73b9679 100644
@@ -104 +81 @@
-index b7585d55e1..b2742633bc 100644
+index e74eb1f53e..53fffda6af 100644
@@ -107 +84 @@
-@@ -161,4 +161,6 @@ print_stats(__rte_unused struct rte_timer *ptr_timer,
+@@ -161,4 +161,6 @@ print_stats(__attribute__((unused)) struct rte_timer *ptr_timer,
@@ -115 +92 @@
-index f8d14b843a..4a41aac638 100644
+index 6ddf94b005..72f9fab5bc 100644
@@ -126 +103 @@
-index 25efe2b09a..9bbcadfcf8 100644
+index 17e77427a9..97bc4a2d21 100644
@@ -129 +106 @@
-@@ -163,4 +163,6 @@ print_stats(void)
+@@ -159,4 +159,6 @@ print_stats(void)
@@ -137 +114 @@
-index ab956ad7ce..b9fffca020 100644
+index 6db604ed8b..72216a81ce 100644
@@ -148 +125 @@
-index ab649bf147..312829e8b9 100644
+index 2261f089f9..f2fa074f21 100644
@@ -151 +128 @@
-@@ -1335,4 +1335,6 @@ print_stats(__rte_unused void *arg)
+@@ -1334,4 +1334,6 @@ print_stats(__rte_unused void *arg)


  parent reply	other threads:[~2020-07-17 16:32 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-17 16:31 [dpdk-stable] patch 'net/netvsc: do not spin forever waiting for reply' " Kevin Traynor
2020-07-17 16:31 ` [dpdk-stable] patch 'app/testpmd: fix memory leak on error path' " Kevin Traynor
2020-07-17 16:31 ` [dpdk-stable] patch 'net/mlx5: fix unreachable MPLS " Kevin Traynor
2020-07-17 16:31 ` [dpdk-stable] patch 'net/failsafe: fix RSS RETA size info' " Kevin Traynor
2020-07-17 16:31 ` [dpdk-stable] patch 'net/i40e: enable NEON Rx/Tx in meson' " Kevin Traynor
2020-07-17 16:31 ` [dpdk-stable] patch 'net/cxgbe: fix CLIP leak in filter error path' " Kevin Traynor
2020-07-17 16:31 ` [dpdk-stable] patch 'bpf: fix add/sub min/max estimations' " Kevin Traynor
2020-07-17 16:31 ` [dpdk-stable] patch 'net: fix IPv4 checksum' " Kevin Traynor
2020-07-17 16:31 ` Kevin Traynor [this message]
2020-07-17 16:31 ` [dpdk-stable] patch 'bus/vmbus: fix ring buffer mapping' " Kevin Traynor
2020-07-17 16:31 ` [dpdk-stable] patch 'pci: fix address domain format size' " Kevin Traynor
2020-07-17 16:32 ` [dpdk-stable] patch 'net/qede: fix multicast drop in promiscuous mode' " Kevin Traynor
2020-07-17 16:32 ` [dpdk-stable] patch 'net/mvpp2: fix non-EAL thread support' " Kevin Traynor
2020-07-17 16:32 ` [dpdk-stable] patch 'eal/arm: add vcopyq intrinsic for aarch32' " Kevin Traynor
2020-07-17 16:32 ` [dpdk-stable] patch 'net/ixgbe: fix include of vector header file' " Kevin Traynor
2020-07-17 16:32 ` [dpdk-stable] patch 'net/mlx5: fix iterator type in Rx queue management' " Kevin Traynor
2020-07-17 16:32 ` [dpdk-stable] patch 'vhost: fix features definition location' " Kevin Traynor
2020-07-17 16:32 ` [dpdk-stable] patch 'mem: fix 32-bit init config with meson' " Kevin Traynor
2020-07-17 16:32 ` [dpdk-stable] patch 'examples/eventdev: fix 32-bit coremask' " Kevin Traynor
2020-07-17 16:32 ` [dpdk-stable] patch 'devtools: fix path in forbidden token check' " Kevin Traynor
2020-07-17 16:32 ` [dpdk-stable] patch 'sched: fix port time rounding' " Kevin Traynor
2020-07-17 16:32 ` [dpdk-stable] patch 'lib: remind experimental status in headers' " Kevin Traynor
2020-07-17 16:32 ` [dpdk-stable] patch 'rawdev: remove remaining experimental tags' " Kevin Traynor
2020-07-17 16:32 ` [dpdk-stable] patch 'eal/armv8: fix timer frequency calibration with PMU' " Kevin Traynor
2020-07-17 16:32 ` [dpdk-stable] patch 'vfio: remove unused variable' " Kevin Traynor
2020-07-17 16:32 ` [dpdk-stable] patch 'eal: fix uuid header dependencies' " 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=20200717163214.4839-9-ktraynor@redhat.com \
    --to=ktraynor@redhat.com \
    --cc=arybchenko@solarflare.com \
    --cc=georgiy.levashov@oktetlabs.ru \
    --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

patches for DPDK stable branches

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/stable/0 stable/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 stable stable/ https://inbox.dpdk.org/stable \
		stable@dpdk.org
	public-inbox-index stable

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.stable


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git