From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id D9CA3A04AF; Thu, 17 Sep 2020 13:34:44 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id BC5EB1D610; Thu, 17 Sep 2020 13:34:44 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 2F4361D5F4 for ; Thu, 17 Sep 2020 13:34:42 +0200 (CEST) IronPort-SDR: 5xRhTY9lefvvo0G2cYAvxYQLh6tq4A5EnrjDtv5Ez/Zpy3PmbZwdx2hQe+aNi/KRauZnDOhrSf jbDSP0MLUBkg== X-IronPort-AV: E=McAfee;i="6000,8403,9746"; a="244512807" X-IronPort-AV: E=Sophos;i="5.76,436,1592895600"; d="scan'208";a="244512807" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Sep 2020 04:34:30 -0700 IronPort-SDR: 5Zlk/PzlOSQan0SI4abHvNqWNn3l3YFDJXJcolUPZqjXbQEcSgGNrzWKPgkXIEfk/G3kATJdI3 67FA6ng7Wquw== X-IronPort-AV: E=Sophos;i="5.76,436,1592895600"; d="scan'208";a="483712446" Received: from bricha3-mobl.ger.corp.intel.com ([10.213.24.6]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-SHA; 17 Sep 2020 04:34:28 -0700 Date: Thu, 17 Sep 2020 12:34:23 +0100 From: Bruce Richardson To: Kevin Laatz Cc: dev@dpdk.org, marcinx.baran@intel.com, pawelx.modrak@intel.com Message-ID: <20200917113423.GF1568@bricha3-MOBL.ger.corp.intel.com> References: <20200917110221.205960-1-kevin.laatz@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200917110221.205960-1-kevin.laatz@intel.com> Subject: Re: [dpdk-dev] [PATCH] examples/ioat: fix stats print 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" On Thu, Sep 17, 2020 at 12:02:21PM +0100, Kevin Laatz wrote: > Currently some of the status string at the top of the stats output is being > cut off. To fix this, the status string array size has been increased. > > Bugzilla ID: 536 > Fixes: 632bcd9b5d4f ("examples/ioat: print statistics") > > Signed-off-by: Kevin Laatz > --- > examples/ioat/ioatfwd.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/examples/ioat/ioatfwd.c b/examples/ioat/ioatfwd.c > index 43a19843ee..8a8c81edfb 100644 > --- a/examples/ioat/ioatfwd.c > +++ b/examples/ioat/ioatfwd.c > @@ -168,7 +168,7 @@ print_stats(char *prgname) > struct rte_rawdev_xstats_name *names_xstats; > uint64_t *xstats; > unsigned int *ids_xstats, nb_xstats; > - char status_string[120]; /* to print at the top of the output */ > + char status_string[140]; /* to print at the top of the output */ > int status_strlen; > int ret; > This seems a rather small increment - normally if a string is too small I'd bump it up by a serious amount. 255 might be a good value here. Also, to avoid the display looking strange in case of future truncation (which is not very likely with a size of 255 if you increment to that), the final '\n' should be included in the printf rather than in the string to be printed. Regards, /Bruce