DPDK patches and discussions
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@redhat.com>
To: dev@dpdk.org
Cc: Bruce Richardson <bruce.richardson@intel.com>,
	Ciara Power <ciara.power@intel.com>
Subject: [PATCH v3 2/4] telemetry: extend valid command characters
Date: Tue, 25 Oct 2022 11:00:50 +0200	[thread overview]
Message-ID: <20221025090052.429232-3-david.marchand@redhat.com> (raw)
In-Reply-To: <20221025090052.429232-1-david.marchand@redhat.com>

The trace framework wants to reference trace point names as keys in
dicts. Those names can contain '.', so add it to the list of valid
characters in the telemetry library.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 lib/telemetry/rte_telemetry.h  | 10 +++++-----
 lib/telemetry/telemetry_data.c |  1 +
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/lib/telemetry/rte_telemetry.h b/lib/telemetry/rte_telemetry.h
index e7f6c2ae43..5bd0fc323e 100644
--- a/lib/telemetry/rte_telemetry.h
+++ b/lib/telemetry/rte_telemetry.h
@@ -68,7 +68,7 @@ rte_tel_data_start_array(struct rte_tel_data *d, enum rte_tel_value_type type);
  *
  * Dictionaries consist of key-values pairs to be returned, where the keys,
  * or names, are strings and the values can be any of the types supported by telemetry.
- * Name strings may only contain alphanumeric characters as well as '_' or '/'
+ * Name strings may only contain alphanumeric characters as well as '_', '/' or '.'
  *
  * @param d
  *   The data structure passed to the callback
@@ -181,7 +181,7 @@ rte_tel_data_add_array_bool(struct rte_tel_data *d, bool x);
  *   The data structure passed to the callback
  * @param name
  *   The name the value is to be stored under in the dict
- *   Must contain only alphanumeric characters or the symbols: '_' or '/'
+ *   Must contain only alphanumeric characters or the symbols: '_', '/' or '.'
  * @param val
  *   The string to be stored in the dict
  * @return
@@ -200,7 +200,7 @@ rte_tel_data_add_dict_string(struct rte_tel_data *d, const char *name,
  *   The data structure passed to the callback
  * @param name
  *   The name the value is to be stored under in the dict
- *   Must contain only alphanumeric characters or the symbols: '_' or '/'
+ *   Must contain only alphanumeric characters or the symbols: '_', '/' or '.'
  * @param val
  *   The number to be stored in the dict
  * @return
@@ -217,7 +217,7 @@ rte_tel_data_add_dict_int(struct rte_tel_data *d, const char *name, int val);
  *   The data structure passed to the callback
  * @param name
  *   The name the value is to be stored under in the dict
- *   Must contain only alphanumeric characters or the symbols: '_' or '/'
+ *   Must contain only alphanumeric characters or the symbols: '_', '/' or '.'
  * @param val
  *   The number to be stored in the dict
  * @return
@@ -237,7 +237,7 @@ rte_tel_data_add_dict_u64(struct rte_tel_data *d,
  *   The data structure passed to the callback
  * @param name
  *   The name the value is to be stored under in the dict.
- *   Must contain only alphanumeric characters or the symbols: '_' or '/'
+ *   Must contain only alphanumeric characters or the symbols: '_', '/' or '.'
  * @param val
  *   The pointer to the container to be stored in the dict.
  * @param keep
diff --git a/lib/telemetry/telemetry_data.c b/lib/telemetry/telemetry_data.c
index 13a7ce7034..4f81f71e03 100644
--- a/lib/telemetry/telemetry_data.c
+++ b/lib/telemetry/telemetry_data.c
@@ -119,6 +119,7 @@ valid_name(const char *name)
 			['a' ... 'z'] = 1,
 			['_'] = 1,
 			['/'] = 1,
+			['.'] = 1,
 	};
 	while (*name != '\0') {
 		if ((size_t)*name >= RTE_DIM(allowed) || allowed[(int)*name] == 0)
-- 
2.37.3


  parent reply	other threads:[~2022-10-25  9:01 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-13  7:49 [PATCH] trace: take live traces via telemetry David Marchand
2022-10-13 14:09 ` Jerin Jacob
2022-10-18 13:14 ` Bruce Richardson
2022-10-19 10:53   ` Bruce Richardson
2022-10-19 13:46     ` David Marchand
2022-10-18 14:33 ` Morten Brørup
2022-10-18 16:20   ` Bruce Richardson
2022-10-19  7:38   ` David Marchand
2022-10-19  8:21     ` Morten Brørup
2022-10-19  8:28       ` David Marchand
2022-10-25  9:00 ` [PATCH v3 0/4] Telemetry support for traces David Marchand
2022-10-25  9:00   ` [PATCH v3 1/4] telemetry: support boolean type David Marchand
2022-10-25  9:34     ` Mattias Rönnblom
2022-10-25  9:43       ` David Marchand
2022-10-25 10:38         ` Bruce Richardson
2022-10-27  8:53           ` Power, Ciara
2022-10-25  9:00   ` David Marchand [this message]
2022-10-25  9:12     ` [PATCH v3 2/4] telemetry: extend valid command characters Power, Ciara
2022-10-25  9:00   ` [PATCH v3 3/4] trace: enable trace operations via telemetry David Marchand
2022-10-25 10:18     ` Mattias Rönnblom
2022-10-25  9:00   ` [PATCH v3 4/4] trace: create new directory for each trace dump David Marchand
2022-10-25  9:41     ` Mattias Rönnblom

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=20221025090052.429232-3-david.marchand@redhat.com \
    --to=david.marchand@redhat.com \
    --cc=bruce.richardson@intel.com \
    --cc=ciara.power@intel.com \
    --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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).