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 9679EA0522; Thu, 2 Jul 2020 19:29:06 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1DF261D914; Thu, 2 Jul 2020 19:29:06 +0200 (CEST) Received: from mail-pj1-f65.google.com (mail-pj1-f65.google.com [209.85.216.65]) by dpdk.org (Postfix) with ESMTP id 7C5A81D905 for ; Thu, 2 Jul 2020 19:29:04 +0200 (CEST) Received: by mail-pj1-f65.google.com with SMTP id k5so3239735pjg.3 for ; Thu, 02 Jul 2020 10:29:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=t4f5hdgZMQr8Ko8S4UrSCEjvmRDHzD2D1k7tnbFkJ+Y=; b=RtTb7VF1o+CgRUNDLoO1QfB1F075CXBaIOavsvAah/YZgV+BE/Dbp9171uBLFRGIZS xPMAZhuMCysDXm3h1xKdNMUaDrtAEzPCFy1qqj2Y4lCyV+X45o1U2zVshqBrXKlxAX/C hvp8EQaJxhDTt6YYoFpMxh9FPbiIn6sg7zgn76Vi+YCY+zL7jAuTccfUoMOfZJbsKB3s l5nAzXPUSESwd2hnv/NlCX7x/mRuBphVjA5AbdTb3y+Ta8YcDoVYWmDfdmid1cIvM9qc /2M9Qn2M0aqKD0QMzBRVCHKFJ/MFvNH1eSlPNHBKosUJ1vzZEQXLufQv5gQF3krclHfS hp+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=t4f5hdgZMQr8Ko8S4UrSCEjvmRDHzD2D1k7tnbFkJ+Y=; b=jCP8IqL7n9MEAZ3r5K4Jvku6qqp7s9JASGNWf82cjnFUJYGeK5SHsGs3KJwKKPIWDo 2cxx2fI+5gE3eAh3Yipix9Xwgk4EcYizrDyOwA/LtNmeLdL1s1h8MIZcyBEaT0H6uCHQ Zo3wS7MmVXJJ2OX3m1eIKeAxCLLAzOUgNRZi8pREP4dmy7sfjNvm9wWMPj8MDKXvcpFl +mTWo8QWsqqDga2wJIY1QyDRP4QU2r/E4pmWqpp14OyFIpAIDcM0IkTvJ7W8O+pgjkxV 6G0LqrQvn3RPsA8uNRACGPo5Y8CC/kp7zDJfw6H0rp8+NBXmgVHr6NQKvknJeBytm4ND Im1g== X-Gm-Message-State: AOAM530t7xf9z5Y3AtD89Oi+AUjBWOe0s0UDyrzzTRIfr5HBEl5ArkVT iLeUzfEk7BXrLmr4z7pJmKYCVQ== X-Google-Smtp-Source: ABdhPJzxTus+0Xlpa5NIhtmd+lFNlBWX3sfHyKVC6/K1IAXQQuN0VuVaD4hVdQ2p9cqIBBGGtowotQ== X-Received: by 2002:a17:90b:3685:: with SMTP id mj5mr27058511pjb.123.1593710943399; Thu, 02 Jul 2020 10:29:03 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id q13sm9843241pfk.8.2020.07.02.10.29.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Jul 2020 10:29:02 -0700 (PDT) From: Stephen Hemminger To: Anatoly Burakov Cc: dev@dpdk.org, Stephen Hemminger , remy.horton@intel.com, ciara.power@intel.com Date: Thu, 2 Jul 2020 10:28:52 -0700 Message-Id: <20200702172852.6201-1-stephen@networkplumber.org> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH] metrics: make number of metrics names configurable 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" The maximum number of metrics is hardcoded at 256. This severely limits the usefulness of the library. It should be configurable like other limits in DPDK. Fixes: 349950ddb9c5 ("metrics: add information metrics library") Cc: remy.horton@intel.com Cc: ciara.power@intel.com Signed-off-by: Stephen Hemminger --- config/common_base | 1 + config/meson.build | 2 +- lib/librte_metrics/rte_metrics.h | 1 - 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/common_base b/config/common_base index fe30c515e5a3..f0212faec80c 100644 --- a/config/common_base +++ b/config/common_base @@ -917,6 +917,7 @@ CONFIG_RTE_LIBRTE_JOBSTATS=y # Compile the device metrics library # CONFIG_RTE_LIBRTE_METRICS=y +CONFIG_RTE_METRICS_MAX_METRICS=256 # # Compile the bitrate statistics library diff --git a/config/meson.build b/config/meson.build index 351e268c1f5b..cc8cb8fbf2f0 100644 --- a/config/meson.build +++ b/config/meson.build @@ -238,7 +238,7 @@ dpdk_conf.set('RTE_ENABLE_TRACE_FP', get_option('enable_trace_fp')) dpdk_conf.set('RTE_MAX_VFIO_GROUPS', 64) dpdk_conf.set('RTE_DRIVER_MEMPOOL_BUCKET_SIZE_KB', 64) dpdk_conf.set('RTE_LIBRTE_DPAA2_USE_PHYS_IOVA', true) - +dpdk_conf.set('RTE_METRICS_MAX_METRICS', 256) compile_time_cpuflags = [] subdir(arch_subdir) diff --git a/lib/librte_metrics/rte_metrics.h b/lib/librte_metrics/rte_metrics.h index fbe64ddf2b47..40f015b8bb93 100644 --- a/lib/librte_metrics/rte_metrics.h +++ b/lib/librte_metrics/rte_metrics.h @@ -34,7 +34,6 @@ extern int metrics_initialized; /** Maximum length of metric name (including null-terminator) */ #define RTE_METRICS_MAX_NAME_LEN 64 -#define RTE_METRICS_MAX_METRICS 256 /** * Global metric special id. -- 2.26.2