From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <jingjing.wu@intel.com>
Received: from mga01.intel.com (mga01.intel.com [192.55.52.88])
 by dpdk.org (Postfix) with ESMTP id 5F7559E3
 for <dev@dpdk.org>; Fri, 28 Apr 2017 10:21:28 +0200 (CEST)
Received: from orsmga002.jf.intel.com ([10.7.209.21])
 by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;
 28 Apr 2017 01:21:27 -0700
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.37,387,1488873600"; d="scan'208";a="79968325"
Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206])
 by orsmga002.jf.intel.com with ESMTP; 28 Apr 2017 01:21:27 -0700
Received: from fmsmsx101.amr.corp.intel.com (10.18.124.199) by
 FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS)
 id 14.3.319.2; Fri, 28 Apr 2017 01:21:26 -0700
Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by
 fmsmsx101.amr.corp.intel.com (10.18.124.199) with Microsoft SMTP Server (TLS)
 id 14.3.319.2; Fri, 28 Apr 2017 01:21:25 -0700
Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.117]) by
 SHSMSX101.ccr.corp.intel.com ([169.254.1.193]) with mapi id 14.03.0319.002;
 Fri, 28 Apr 2017 16:21:24 +0800
From: "Wu, Jingjing" <jingjing.wu@intel.com>
To: "Horton, Remy" <remy.horton@intel.com>, "dev@dpdk.org" <dev@dpdk.org>
Thread-Topic: [PATCH v1] app/testpmd: add bitrate stats option
Thread-Index: AQHSvo166DDBWo1e9Umxt0QLXxT8bKHachCQ
Date: Fri, 28 Apr 2017 08:21:23 +0000
Message-ID: <9BB6961774997848B5B42BEC655768F810D5A052@SHSMSX103.ccr.corp.intel.com>
References: <1493211774-28249-1-git-send-email-remy.horton@intel.com>
In-Reply-To: <1493211774-28249-1-git-send-email-remy.horton@intel.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
dlp-product: dlpe-windows
dlp-version: 10.0.102.7
dlp-reaction: no-action
x-originating-ip: [10.239.127.40]
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
Subject: Re: [dpdk-dev] [PATCH v1] app/testpmd: add bitrate stats option
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <http://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <http://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Fri, 28 Apr 2017 08:21:28 -0000



> -----Original Message-----
> From: Horton, Remy
> Sent: Wednesday, April 26, 2017 9:03 PM
> To: dev@dpdk.org
> Cc: Wu, Jingjing <jingjing.wu@intel.com>
> Subject: [PATCH v1] app/testpmd: add bitrate stats option
>=20
> Bit-rate collation should only be done by one core. This patch adds an op=
tion to
> select which core performs the bit-rate calculation, which is also disabl=
ed by
> default.
>=20
> Fixes: 7e4441c8efb9 ("app/testpmd: add bitrate statistics calculation")
>=20
> Signed-off-by: Remy Horton <remy.horton@intel.com>
> ---
>  app/test-pmd/parameters.c | 15 +++++++++++++++
>  app/test-pmd/testpmd.c    | 36 ++++++++++++++++++++++++++----------
>  app/test-pmd/testpmd.h    |  5 +++++
>  3 files changed, 46 insertions(+), 10 deletions(-)
>=20
> diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c index
> 3f4d3a2..a6140b5 100644
> --- a/app/test-pmd/parameters.c
> +++ b/app/test-pmd/parameters.c
> @@ -536,6 +536,9 @@ launch_args_parse(int argc, char** argv)  #ifdef
> RTE_LIBRTE_LATENCY_STATS
>  		{ "latencystats",               1, 0, 0 },
>  #endif
> +#ifdef RTE_LIBRTE_BITRATE
> +		{ "bitratestats",               1, 0, 0 },
> +#endif
>  		{ "disable-crc-strip",          0, 0, 0 },
>  		{ "enable-lro",                 0, 0, 0 },
>  		{ "enable-rx-cksum",            0, 0, 0 },
> @@ -793,6 +796,18 @@ launch_args_parse(int argc, char** argv)
>  						 " must be >=3D 0\n", n);
>  			}
Please add description printing in function usage.


>  #ifdef RTE_LIBRTE_LATENCY_STATS
> @@ -2238,6 +2248,9 @@ main(int argc, char** argv)
>  		rte_panic("Empty set of forwarding logical cores - check the "
>  			  "core mask supplied in the command parameters\n");
>=20
> +	/* Bitrate stats disabled by default */
> +	bitrate_enabled =3D 0;
You can assign it at the definition.
> +

Don't forget the testpmd doc to describe the parameters.

Thanks
Jingjing