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 64458A00C2; Fri, 24 Apr 2020 17:50:06 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D22961D177; Fri, 24 Apr 2020 17:50:05 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 5930A1C297 for ; Fri, 24 Apr 2020 17:50:03 +0200 (CEST) IronPort-SDR: rFtSq14FyhyontTLJDnSgcb7Tz0/eaW7W2Z9k6f76QLKSzatkKM77gniZyQChXCYaq9ggVpQ5q +zVWNKG/PTdA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Apr 2020 08:50:02 -0700 IronPort-SDR: YDWEgIsE7HI5bTyfygP8fujVUvOhz23kJDiqgHp+Bp1hFhP+bzWWFK1s3W+ZYCx2S+8o0nxaXm 1ZB7Zy7pFulw== X-IronPort-AV: E=Sophos;i="5.73,311,1583222400"; d="scan'208";a="430804520" Received: from bricha3-mobl.ger.corp.intel.com ([10.252.36.26]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-SHA; 24 Apr 2020 08:49:43 -0700 Date: Fri, 24 Apr 2020 16:49:40 +0100 From: Bruce Richardson To: Stephen Hemminger Cc: Ciara Power , dev@dpdk.org, kevin.laatz@intel.com, reshma.pattan@intel.com, jerinjacobk@gmail.com, david.marchand@redhat.com, keith.wiles@intel.com, mb@smartsharesystems.com, thomas@monjalon.net Message-ID: <20200424154940.GA1451@bricha3-MOBL.ger.corp.intel.com> References: <20200319171907.60891-1-ciara.power@intel.com> <20200424124159.45989-1-ciara.power@intel.com> <20200424124159.45989-3-ciara.power@intel.com> <20200424082953.4b52ab9e@hermes.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200424082953.4b52ab9e@hermes.lan> Subject: Re: [dpdk-dev] [PATCH v4 02/18] telemetry: move code to metrics for later reuse 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 Fri, Apr 24, 2020 at 08:29:53AM -0700, Stephen Hemminger wrote: > On Fri, 24 Apr 2020 13:41:43 +0100 > Ciara Power wrote: > > > This commit moves some of the telemetry library code to a new file in > > the metrics library. No modifications are made to the moved code, > > except what is needed to allow it to compile and run. The additional > > code in metrics is built only when the Jansson library is present. > > Telemetry functions as normal, using the functions from the > > metrics_telemetry file. This move will enable code be reused by the new > > version of telemetry in a later commit, to support backward > > compatibility with the existing telemetry usage. > > > > Signed-off-by: Ciara Power > > > Minor comments, none of these are show stoppers. > > > > diff --git a/lib/librte_metrics/rte_metrics.c b/lib/librte_metrics/rte_metrics.c > > index df5e32c59f..9b38d7787c 100644 > > --- a/lib/librte_metrics/rte_metrics.c > > +++ b/lib/librte_metrics/rte_metrics.c > > @@ -13,7 +13,6 @@ > > #include > > #include > > > > -#define RTE_METRICS_MAX_METRICS 256 > > #define RTE_METRICS_MEMZONE_NAME "RTE_METRICS" > > > > /** > > diff --git a/lib/librte_metrics/rte_metrics.h b/lib/librte_metrics/rte_metrics.h > > index 77bffe08e4..466ca98c31 100644 > > --- a/lib/librte_metrics/rte_metrics.h > > +++ b/lib/librte_metrics/rte_metrics.h > > @@ -32,6 +32,7 @@ extern "C" { > > > > /** Maximum length of metric name (including null-terminator) */ > > #define RTE_METRICS_MAX_NAME_LEN 64 > > +#define RTE_METRICS_MAX_METRICS 256 > > Exposing max metrics to API/ABI does limit you in the future. > I'm not sure moving the definition limits us any more than before. So long as the structures which are defined based on this definition are internal and only accessed via API functions, there should be no problems with changing this and using function versioning for compatibility. /Bruce