DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Iremonger, Bernard" <bernard.iremonger@intel.com>
To: Andrew Rybchenko <arybchenko@solarflare.com>,
	"Lu, Wenzhuo" <wenzhuo.lu@intel.com>,
	"Wu, Jingjing" <jingjing.wu@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	Igor Romanov <igor.romanov@oktetlabs.ru>,
	"stable@dpdk.org" <stable@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] app/testpmd: fix stdout flush absence after printing stats
Date: Wed, 20 Mar 2019 13:21:07 +0000	[thread overview]
Message-ID: <8CEF83825BEC744B83065625E567D7C260D73800@IRSMSX108.ger.corp.intel.com> (raw)
Message-ID: <20190320132107.Qw4PFMZk0MZASByV3AfPj7z4O1KF2NLcREbyMM2nqzI@z> (raw)
In-Reply-To: <1552908947-18120-1-git-send-email-arybchenko@solarflare.com>

Hi Andrew,

> -----Original Message-----
> From: Andrew Rybchenko [mailto:arybchenko@solarflare.com]
> Sent: Monday, March 18, 2019 11:36 AM
> To: Lu, Wenzhuo <wenzhuo.lu@intel.com>; Wu, Jingjing
> <jingjing.wu@intel.com>; Iremonger, Bernard
> <bernard.iremonger@intel.com>
> Cc: dev@dpdk.org; Igor Romanov <igor.romanov@oktetlabs.ru>;
> stable@dpdk.org
> Subject: [PATCH] app/testpmd: fix stdout flush absence after printing stats
> 
> From: Igor Romanov <igor.romanov@oktetlabs.ru>
> 
> User can specify stats period(n). The statistics should be available to user
> every n second. But the print_stats() function does not force stdout to be
> flushed, so for instance, a user reading testpmd's stdout through pipe will
> not be able to read it untill the stdout buffer is filled.
> 
> Fixes: cfea1f3048d1 ("app/testpmd: print statistics periodically")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
> ---
>  app/test-pmd/testpmd.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index
> d9d0c16d4..216be47f9 100644
> --- a/app/test-pmd/testpmd.c
> +++ b/app/test-pmd/testpmd.c
> @@ -3046,6 +3046,8 @@ print_stats(void)
>  	printf("\nPort statistics
> ====================================");
>  	for (i = 0; i < cur_fwd_config.nb_fwd_ports; i++)
>  		nic_stats_display(fwd_ports_ids[i]);
> +
> +	fflush(stdout);
>  }
> 
>  static void
> --
> 2.17.1

There is a checkpatch warning on the commit messge.
WARNING:TYPO_SPELLING: 'untill' may be misspelled - perhaps 'until'?

Otherwise

Acked-by: Bernard Iremonger <bernard.iremonger@intel.com

  parent reply	other threads:[~2019-03-20 13:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-18 11:35 Andrew Rybchenko
2019-03-18 11:35 ` Andrew Rybchenko
2019-03-20 13:21 ` Iremonger, Bernard [this message]
2019-03-20 13:21   ` Iremonger, Bernard
2019-03-20 20:13   ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit
2019-03-20 20:13     ` Ferruh Yigit

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=8CEF83825BEC744B83065625E567D7C260D73800@IRSMSX108.ger.corp.intel.com \
    --to=bernard.iremonger@intel.com \
    --cc=arybchenko@solarflare.com \
    --cc=dev@dpdk.org \
    --cc=igor.romanov@oktetlabs.ru \
    --cc=jingjing.wu@intel.com \
    --cc=stable@dpdk.org \
    --cc=wenzhuo.lu@intel.com \
    /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).