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.march...@redhat.com> Acked-by: Bruce Richardson <bruce.richard...@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