DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>
Subject: [dpdk-dev] [PATCH] rte_metrics: move maximum number of metrics into rte_config
Date: Fri,  4 Sep 2020 15:31:19 -0700
Message-ID: <20200904223118.10002-1-stephen@networkplumber.org> (raw)
In-Reply-To: <20200702172852.6201-1-stephen@networkplumber.org>

If using lots of queues and ports, and having per port or per queue
metrics it is easy to exceed the upper bound of the metric library.
Move the limit into rte_config where user can change it.

Ideally, there would be no upper bound and a dynamic structure
such as red-black tree or hash table would be used for these.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 config/rte_config.h              | 3 +++
 lib/librte_metrics/rte_metrics.h | 1 -
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/config/rte_config.h b/config/rte_config.h
index 9bb915347cb6..b880974f5787 100644
--- a/config/rte_config.h
+++ b/config/rte_config.h
@@ -104,6 +104,9 @@
 #define RTE_GRAPH_BURST_SIZE 256
 #define RTE_LIBRTE_GRAPH_STATS 1
 
+/* rte_metrics defines */
+#define RTE_METRICS_MAX_METRICS 256
+
 /****** driver defines ********/
 
 /* QuickAssist device */
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.27.0


  parent reply	other threads:[~2020-09-04 22:31 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-02 17:28 [dpdk-dev] [PATCH] metrics: make number of metrics names configurable Stephen Hemminger
2020-07-28  5:14 ` Stephen Hemminger
2020-07-28 10:24 ` Bruce Richardson
2020-07-28 19:59   ` Stephen Hemminger
2020-07-29  9:47     ` Bruce Richardson
2020-09-04 22:31 ` Stephen Hemminger [this message]
2020-09-05  3:11   ` [dpdk-dev] [PATCH] rte_metrics: move maximum number of metrics into rte_config Stephen Hemminger
2020-10-20 11:50   ` Thomas Monjalon
2020-10-20 15:02     ` Stephen Hemminger
2020-10-20 15:15       ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200904223118.10002-1-stephen@networkplumber.org \
    --to=stephen@networkplumber.org \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git