From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id D45AD5942; Wed, 20 Mar 2019 14:21:12 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Mar 2019 06:21:11 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,249,1549958400"; d="scan'208";a="133166815" Received: from irsmsx152.ger.corp.intel.com ([163.33.192.66]) by fmsmga008.fm.intel.com with ESMTP; 20 Mar 2019 06:21:10 -0700 Received: from irsmsx108.ger.corp.intel.com ([169.254.11.7]) by IRSMSX152.ger.corp.intel.com ([169.254.6.139]) with mapi id 14.03.0415.000; Wed, 20 Mar 2019 13:21:08 +0000 From: "Iremonger, Bernard" To: Andrew Rybchenko , "Lu, Wenzhuo" , "Wu, Jingjing" CC: "dev@dpdk.org" , Igor Romanov , "stable@dpdk.org" Thread-Topic: [PATCH] app/testpmd: fix stdout flush absence after printing stats Thread-Index: AQHU3X7aZi9pXOa7dEilOMwlgtDNbaYUg8vA Date: Wed, 20 Mar 2019 13:21:07 +0000 Message-ID: <8CEF83825BEC744B83065625E567D7C260D73800@IRSMSX108.ger.corp.intel.com> References: <1552908947-18120-1-git-send-email-arybchenko@solarflare.com> In-Reply-To: <1552908947-18120-1-git-send-email-arybchenko@solarflare.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZjU3ZWMzZDgtYzY0Ni00MDYzLWE4NTktNzY3ZDI1YTdlYWM4IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoibjV0bFZCdkIwWkVYN3NYZXp6SUl1XC9cLzliejFGR0M2d2R0YktsVWZXWVFHWHROUk1RdFJVampFNGJ1aVhMU0g5In0= x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [163.33.239.180] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] app/testpmd: fix stdout flush absence after printing stats X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Mar 2019 13:21:13 -0000 Hi Andrew, > -----Original Message----- > From: Andrew Rybchenko [mailto:arybchenko@solarflare.com] > Sent: Monday, March 18, 2019 11:36 AM > To: Lu, Wenzhuo ; Wu, Jingjing > ; Iremonger, Bernard > > Cc: dev@dpdk.org; Igor Romanov ; > stable@dpdk.org > Subject: [PATCH] app/testpmd: fix stdout flush absence after printing sta= ts >=20 > From: Igor Romanov >=20 > User can specify stats period(n). The statistics should be available to u= ser > every n second. But the print_stats() function does not force stdout to b= e > flushed, so for instance, a user reading testpmd's stdout through pipe wi= ll > not be able to read it untill the stdout buffer is filled. >=20 > Fixes: cfea1f3048d1 ("app/testpmd: print statistics periodically") > Cc: stable@dpdk.org >=20 > Signed-off-by: Igor Romanov > Signed-off-by: Andrew Rybchenko > --- > app/test-pmd/testpmd.c | 2 ++ > 1 file changed, 2 insertions(+) >=20 > 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 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D"); > for (i =3D 0; i < cur_fwd_config.nb_fwd_ports; i++) > nic_stats_display(fwd_ports_ids[i]); > + > + fflush(stdout); > } >=20 > 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 Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 40037A00E6 for ; Wed, 20 Mar 2019 14:21:16 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 71DEA5B16; Wed, 20 Mar 2019 14:21:14 +0100 (CET) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id D45AD5942; Wed, 20 Mar 2019 14:21:12 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Mar 2019 06:21:11 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,249,1549958400"; d="scan'208";a="133166815" Received: from irsmsx152.ger.corp.intel.com ([163.33.192.66]) by fmsmga008.fm.intel.com with ESMTP; 20 Mar 2019 06:21:10 -0700 Received: from irsmsx108.ger.corp.intel.com ([169.254.11.7]) by IRSMSX152.ger.corp.intel.com ([169.254.6.139]) with mapi id 14.03.0415.000; Wed, 20 Mar 2019 13:21:08 +0000 From: "Iremonger, Bernard" To: Andrew Rybchenko , "Lu, Wenzhuo" , "Wu, Jingjing" CC: "dev@dpdk.org" , Igor Romanov , "stable@dpdk.org" Thread-Topic: [PATCH] app/testpmd: fix stdout flush absence after printing stats Thread-Index: AQHU3X7aZi9pXOa7dEilOMwlgtDNbaYUg8vA Date: Wed, 20 Mar 2019 13:21:07 +0000 Message-ID: <8CEF83825BEC744B83065625E567D7C260D73800@IRSMSX108.ger.corp.intel.com> References: <1552908947-18120-1-git-send-email-arybchenko@solarflare.com> In-Reply-To: <1552908947-18120-1-git-send-email-arybchenko@solarflare.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZjU3ZWMzZDgtYzY0Ni00MDYzLWE4NTktNzY3ZDI1YTdlYWM4IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoibjV0bFZCdkIwWkVYN3NYZXp6SUl1XC9cLzliejFGR0M2d2R0YktsVWZXWVFHWHROUk1RdFJVampFNGJ1aVhMU0g5In0= x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [163.33.239.180] Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] app/testpmd: fix stdout flush absence after printing stats X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Message-ID: <20190320132107.Qw4PFMZk0MZASByV3AfPj7z4O1KF2NLcREbyMM2nqzI@z> Hi Andrew, > -----Original Message----- > From: Andrew Rybchenko [mailto:arybchenko@solarflare.com] > Sent: Monday, March 18, 2019 11:36 AM > To: Lu, Wenzhuo ; Wu, Jingjing > ; Iremonger, Bernard > > Cc: dev@dpdk.org; Igor Romanov ; > stable@dpdk.org > Subject: [PATCH] app/testpmd: fix stdout flush absence after printing sta= ts >=20 > From: Igor Romanov >=20 > User can specify stats period(n). The statistics should be available to u= ser > every n second. But the print_stats() function does not force stdout to b= e > flushed, so for instance, a user reading testpmd's stdout through pipe wi= ll > not be able to read it untill the stdout buffer is filled. >=20 > Fixes: cfea1f3048d1 ("app/testpmd: print statistics periodically") > Cc: stable@dpdk.org >=20 > Signed-off-by: Igor Romanov > Signed-off-by: Andrew Rybchenko > --- > app/test-pmd/testpmd.c | 2 ++ > 1 file changed, 2 insertions(+) >=20 > 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 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D"); > for (i =3D 0; i < cur_fwd_config.nb_fwd_ports; i++) > nic_stats_display(fwd_ports_ids[i]); > + > + fflush(stdout); > } >=20 > 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