* Re: [PATCH] doc: add deprecation for restrictions in telemetry naming
2022-07-07 13:39 [PATCH] doc: add deprecation for restrictions in telemetry naming Bruce Richardson
@ 2022-07-07 15:16 ` Andrew Rybchenko
2022-07-07 22:06 ` Morten Brørup
` (4 subsequent siblings)
5 siblings, 0 replies; 10+ messages in thread
From: Andrew Rybchenko @ 2022-07-07 15:16 UTC (permalink / raw)
To: Bruce Richardson, dev; +Cc: mb, stephen, ciara.power
On 7/7/22 16:39, Bruce Richardson wrote:
> Following discussion on-list [1], we will look to limited the allowed
> characters in names for items in telemetry. This will simplify the
> escaping needed for json output, or any future output formats. The lists
> will initially be minimal, since expansion to allow more characters can
> be done without affecting compatibility, while reducing the set cannot.
>
> Cc: mb@smartsharesystems.com
> Cc: stephen@networkplumber.org
> Cc: ciara.power@intel.com
>
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
>
> [1] http://inbox.dpdk.org/dev/20220623164245.561371-1-bruce.richardson@intel.com/#r
> ---
> doc/guides/rel_notes/deprecation.rst | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
> index 4e5b23c53d..9366690ec5 100644
> --- a/doc/guides/rel_notes/deprecation.rst
> +++ b/doc/guides/rel_notes/deprecation.rst
> @@ -119,6 +119,12 @@ Deprecation Notices
> * metrics: The function ``rte_metrics_init`` will have a non-void return
> in order to notify errors instead of calling ``rte_exit``.
>
> +* telemetry: The allowed characters in names for dictionary values will be limited to
> + alphanumeric characters and a small subset of additional printable characters.
> + This will ensure that all dictionary parameter names can be output without escaping
> + in json - or in any future output format used. Names for the telemetry commands will
> + be similarly limited.
> +
> * raw/ioat: The ``ioat`` rawdev driver has been deprecated, since it's
> functionality is provided through the new ``dmadev`` infrastructure.
> To continue to use hardware previously supported by the ``ioat`` rawdev driver,
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: [PATCH] doc: add deprecation for restrictions in telemetry naming
2022-07-07 13:39 [PATCH] doc: add deprecation for restrictions in telemetry naming Bruce Richardson
2022-07-07 15:16 ` Andrew Rybchenko
@ 2022-07-07 22:06 ` Morten Brørup
2022-07-11 10:53 ` Bruce Richardson
2022-07-11 10:43 ` Power, Ciara
` (3 subsequent siblings)
5 siblings, 1 reply; 10+ messages in thread
From: Morten Brørup @ 2022-07-07 22:06 UTC (permalink / raw)
To: Bruce Richardson, dev; +Cc: stephen, ciara.power
> From: Bruce Richardson [mailto:bruce.richardson@intel.com]
> Sent: Thursday, 7 July 2022 15.40
>
> Following discussion on-list [1], we will look to limited the allowed
> characters in names for items in telemetry. This will simplify the
> escaping needed for json output, or any future output formats. The
> lists
> will initially be minimal, since expansion to allow more characters can
> be done without affecting compatibility, while reducing the set cannot.
>
> Cc: mb@smartsharesystems.com
> Cc: stephen@networkplumber.org
> Cc: ciara.power@intel.com
>
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
>
> [1] http://inbox.dpdk.org/dev/20220623164245.561371-1-
> bruce.richardson@intel.com/#r
> ---
> doc/guides/rel_notes/deprecation.rst | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/doc/guides/rel_notes/deprecation.rst
> b/doc/guides/rel_notes/deprecation.rst
> index 4e5b23c53d..9366690ec5 100644
> --- a/doc/guides/rel_notes/deprecation.rst
> +++ b/doc/guides/rel_notes/deprecation.rst
> @@ -119,6 +119,12 @@ Deprecation Notices
> * metrics: The function ``rte_metrics_init`` will have a non-void
> return
> in order to notify errors instead of calling ``rte_exit``.
>
> +* telemetry: The allowed characters in names for dictionary values
> will be limited to
> + alphanumeric characters and a small subset of additional printable
> characters.
> + This will ensure that all dictionary parameter names can be output
> without escaping
> + in json - or in any future output format used. Names for the
json -> JSON
> telemetry commands will
> + be similarly limited.
Perhaps also add a comment about parameters to telemetry commands, for completeness.
> +
> * raw/ioat: The ``ioat`` rawdev driver has been deprecated, since it's
> functionality is provided through the new ``dmadev`` infrastructure.
> To continue to use hardware previously supported by the ``ioat``
> rawdev driver,
> --
> 2.34.1
>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] doc: add deprecation for restrictions in telemetry naming
2022-07-07 22:06 ` Morten Brørup
@ 2022-07-11 10:53 ` Bruce Richardson
2022-07-11 11:40 ` Morten Brørup
0 siblings, 1 reply; 10+ messages in thread
From: Bruce Richardson @ 2022-07-11 10:53 UTC (permalink / raw)
To: Morten Brørup; +Cc: dev, stephen, ciara.power
On Fri, Jul 08, 2022 at 12:06:31AM +0200, Morten Brørup wrote:
> > From: Bruce Richardson [mailto:bruce.richardson@intel.com]
> > Sent: Thursday, 7 July 2022 15.40
> >
> > Following discussion on-list [1], we will look to limited the allowed
> > characters in names for items in telemetry. This will simplify the
> > escaping needed for json output, or any future output formats. The
> > lists
> > will initially be minimal, since expansion to allow more characters can
> > be done without affecting compatibility, while reducing the set cannot.
> >
> > Cc: mb@smartsharesystems.com
> > Cc: stephen@networkplumber.org
> > Cc: ciara.power@intel.com
> >
> > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> >
> > [1] http://inbox.dpdk.org/dev/20220623164245.561371-1-
> > bruce.richardson@intel.com/#r
> > ---
> > doc/guides/rel_notes/deprecation.rst | 6 ++++++
> > 1 file changed, 6 insertions(+)
> >
> > diff --git a/doc/guides/rel_notes/deprecation.rst
> > b/doc/guides/rel_notes/deprecation.rst
> > index 4e5b23c53d..9366690ec5 100644
> > --- a/doc/guides/rel_notes/deprecation.rst
> > +++ b/doc/guides/rel_notes/deprecation.rst
> > @@ -119,6 +119,12 @@ Deprecation Notices
> > * metrics: The function ``rte_metrics_init`` will have a non-void
> > return
> > in order to notify errors instead of calling ``rte_exit``.
> >
> > +* telemetry: The allowed characters in names for dictionary values
> > will be limited to
> > + alphanumeric characters and a small subset of additional printable
> > characters.
> > + This will ensure that all dictionary parameter names can be output
> > without escaping
> > + in json - or in any future output format used. Names for the
>
> json -> JSON
>
Capital idea! (pun very much intended :-) )
> > telemetry commands will
> > + be similarly limited.
>
> Perhaps also add a comment about parameters to telemetry commands, for completeness.
>
I was not intending to impose restrictions on the parameters themselves
since currently they are not output as part of any json. However, now you
have got me thinking that perhaps we should look to scan parameters for
invalid characters before we hand them over to the individual functions.
That would allow the possibility of including parameters in any replies in
a future format.
Was this what you had in mind, or any other thoughts?
/Bruce
^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: [PATCH] doc: add deprecation for restrictions in telemetry naming
2022-07-11 10:53 ` Bruce Richardson
@ 2022-07-11 11:40 ` Morten Brørup
0 siblings, 0 replies; 10+ messages in thread
From: Morten Brørup @ 2022-07-11 11:40 UTC (permalink / raw)
To: Bruce Richardson; +Cc: dev, stephen, ciara.power
> From: Bruce Richardson [mailto:bruce.richardson@intel.com]
> Sent: Monday, 11 July 2022 12.54
>
> On Fri, Jul 08, 2022 at 12:06:31AM +0200, Morten Brørup wrote:
> > > From: Bruce Richardson [mailto:bruce.richardson@intel.com]
> > > Sent: Thursday, 7 July 2022 15.40
> > >
> > > Following discussion on-list [1], we will look to limited the
> allowed
> > > characters in names for items in telemetry. This will simplify the
> > > escaping needed for json output, or any future output formats. The
> > > lists
> > > will initially be minimal, since expansion to allow more characters
> can
> > > be done without affecting compatibility, while reducing the set
> cannot.
> > >
> > > Cc: mb@smartsharesystems.com
> > > Cc: stephen@networkplumber.org
> > > Cc: ciara.power@intel.com
> > >
> > > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> > >
> > > [1] http://inbox.dpdk.org/dev/20220623164245.561371-1-
> > > bruce.richardson@intel.com/#r
> > > ---
> > > doc/guides/rel_notes/deprecation.rst | 6 ++++++
> > > 1 file changed, 6 insertions(+)
> > >
> > > diff --git a/doc/guides/rel_notes/deprecation.rst
> > > b/doc/guides/rel_notes/deprecation.rst
> > > index 4e5b23c53d..9366690ec5 100644
> > > --- a/doc/guides/rel_notes/deprecation.rst
> > > +++ b/doc/guides/rel_notes/deprecation.rst
> > > @@ -119,6 +119,12 @@ Deprecation Notices
> > > * metrics: The function ``rte_metrics_init`` will have a non-void
> > > return
> > > in order to notify errors instead of calling ``rte_exit``.
> > >
> > > +* telemetry: The allowed characters in names for dictionary values
> > > will be limited to
> > > + alphanumeric characters and a small subset of additional
> printable
> > > characters.
> > > + This will ensure that all dictionary parameter names can be
> output
> > > without escaping
> > > + in json - or in any future output format used. Names for the
> >
> > json -> JSON
> >
> Capital idea! (pun very much intended :-) )
>
> > > telemetry commands will
> > > + be similarly limited.
> >
> > Perhaps also add a comment about parameters to telemetry commands,
> for completeness.
> >
I intentionally phrased this comment vaguely, to see what you had been thinking about this. And it certainly had the desired effect. :-)
>
> I was not intending to impose restrictions on the parameters themselves
> since currently they are not output as part of any json. However, now
> you
> have got me thinking that perhaps we should look to scan parameters for
> invalid characters before we hand them over to the individual
> functions.
> That would allow the possibility of including parameters in any replies
> in
> a future format.
>
> Was this what you had in mind, or any other thoughts?
Not exactly what I had in mind...
Your patch adds that "Names for the telemetry commands will be similarly limited.". This is input, not output. So you need to describe what restrictions are imposed on input.
The input commands and format don't follow any structured standard; command names, hierarchy and parameter names are individually chosen by each developer, and parameters are just a bunch of param=value with no types or limits to the values.
Also, the input is not JSON formatted, but - without looking deeply into the telemetry library - I suppose it might be URL encoded, where e.g. space is encoded as "%20" and '&' is encoded as "%26".
I think we should just leave the input without restrictions. Changing it would require a major overhaul to provide any significant improvement, e.g. attaching types to the parameters, so their values are not just BLOBs.
I don't strongly oppose to limiting the input command names; but we shouldn't impose any limit on what follows the command. So I'm proposing to explicitly mention that we don't impose any input limits beyond the command names.
Or we could provide input restrictions and parsing/formatting in a separate patch set.
^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: [PATCH] doc: add deprecation for restrictions in telemetry naming
2022-07-07 13:39 [PATCH] doc: add deprecation for restrictions in telemetry naming Bruce Richardson
2022-07-07 15:16 ` Andrew Rybchenko
2022-07-07 22:06 ` Morten Brørup
@ 2022-07-11 10:43 ` Power, Ciara
2022-07-11 10:45 ` David Marchand
` (2 subsequent siblings)
5 siblings, 0 replies; 10+ messages in thread
From: Power, Ciara @ 2022-07-11 10:43 UTC (permalink / raw)
To: Richardson, Bruce, dev; +Cc: mb, stephen
> -----Original Message-----
> From: Richardson, Bruce <bruce.richardson@intel.com>
> Sent: Thursday 7 July 2022 14:40
> To: dev@dpdk.org
> Cc: Richardson, Bruce <bruce.richardson@intel.com>;
> mb@smartsharesystems.com; stephen@networkplumber.org; Power, Ciara
> <ciara.power@intel.com>
> Subject: [PATCH] doc: add deprecation for restrictions in telemetry naming
>
> Following discussion on-list [1], we will look to limited the allowed characters in
> names for items in telemetry. This will simplify the escaping needed for json
> output, or any future output formats. The lists will initially be minimal, since
> expansion to allow more characters can be done without affecting
> compatibility, while reducing the set cannot.
>
> Cc: mb@smartsharesystems.com
> Cc: stephen@networkplumber.org
> Cc: ciara.power@intel.com
>
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
>
> [1] http://inbox.dpdk.org/dev/20220623164245.561371-1-
> bruce.richardson@intel.com/#r
> ---
> doc/guides/rel_notes/deprecation.rst | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/doc/guides/rel_notes/deprecation.rst
> b/doc/guides/rel_notes/deprecation.rst
> index 4e5b23c53d..9366690ec5 100644
> --- a/doc/guides/rel_notes/deprecation.rst
> +++ b/doc/guides/rel_notes/deprecation.rst
> @@ -119,6 +119,12 @@ Deprecation Notices
> * metrics: The function ``rte_metrics_init`` will have a non-void return
> in order to notify errors instead of calling ``rte_exit``.
>
> +* telemetry: The allowed characters in names for dictionary values will
> +be limited to
> + alphanumeric characters and a small subset of additional printable characters.
> + This will ensure that all dictionary parameter names can be output
> +without escaping
> + in json - or in any future output format used. Names for the
> +telemetry commands will
> + be similarly limited.
> +
> * raw/ioat: The ``ioat`` rawdev driver has been deprecated, since it's
> functionality is provided through the new ``dmadev`` infrastructure.
> To continue to use hardware previously supported by the ``ioat`` rawdev
> driver,
> --
> 2.34.1
Acked-by: Ciara Power <ciara.power@intel.com>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] doc: add deprecation for restrictions in telemetry naming
2022-07-07 13:39 [PATCH] doc: add deprecation for restrictions in telemetry naming Bruce Richardson
` (2 preceding siblings ...)
2022-07-11 10:43 ` Power, Ciara
@ 2022-07-11 10:45 ` David Marchand
2022-07-12 9:04 ` [PATCH v2] " Bruce Richardson
2022-07-12 9:09 ` [PATCH v3] " Bruce Richardson
5 siblings, 0 replies; 10+ messages in thread
From: David Marchand @ 2022-07-11 10:45 UTC (permalink / raw)
To: Bruce Richardson; +Cc: dev, Morten Brørup, Stephen Hemminger, Ciara Power
On Thu, Jul 7, 2022 at 3:39 PM Bruce Richardson
<bruce.richardson@intel.com> wrote:
>
> Following discussion on-list [1], we will look to limited the allowed
> characters in names for items in telemetry. This will simplify the
> escaping needed for json output, or any future output formats. The lists
> will initially be minimal, since expansion to allow more characters can
> be done without affecting compatibility, while reducing the set cannot.
>
> Cc: mb@smartsharesystems.com
> Cc: stephen@networkplumber.org
> Cc: ciara.power@intel.com
>
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: David Marchand <david.marchand@redhat.com>
--
David Marchand
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v2] doc: add deprecation for restrictions in telemetry naming
2022-07-07 13:39 [PATCH] doc: add deprecation for restrictions in telemetry naming Bruce Richardson
` (3 preceding siblings ...)
2022-07-11 10:45 ` David Marchand
@ 2022-07-12 9:04 ` Bruce Richardson
2022-07-12 9:09 ` [PATCH v3] " Bruce Richardson
5 siblings, 0 replies; 10+ messages in thread
From: Bruce Richardson @ 2022-07-12 9:04 UTC (permalink / raw)
To: dev
Cc: Bruce Richardson, mb, stephen, ciara.power, Andrew Rybchenko,
David Marchand
Following discussion on-list [1], we will look to limited the allowed
characters in names for items in telemetry. This will simplify the
escaping needed for json output, or any future output formats. The lists
will initially be minimal, since expansion to allow more characters can
be done without affecting compatibility, while reducing the set cannot.
Cc: mb@smartsharesystems.com
Cc: stephen@networkplumber.org
Cc: ciara.power@intel.com
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
[1] http://inbox.dpdk.org/dev/20220623164245.561371-1-bruce.richardson@intel.com/#r
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: David Marchand <david.marchand@redhat.com>
---
doc/guides/rel_notes/deprecation.rst | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 4e5b23c53d..6ef93758d4 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -119,6 +119,13 @@ Deprecation Notices
* metrics: The function ``rte_metrics_init`` will have a non-void return
in order to notify errors instead of calling ``rte_exit``.
+* telemetry: The allowed characters in names for dictionary values will be limited to
+ alphanumeric characters and a small subset of additional printable characters.
+ This will ensure that all dictionary parameter names can be output without escaping
+ in JSON - or in any future output format used. Names for the telemetry commands will
+ be similarly limited. The parameters for telemetry commands are unaffected by this
+ change.
+
* raw/ioat: The ``ioat`` rawdev driver has been deprecated, since it's
functionality is provided through the new ``dmadev`` infrastructure.
To continue to use hardware previously supported by the ``ioat`` rawdev driver,
--
2.34.1
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v3] doc: add deprecation for restrictions in telemetry naming
2022-07-07 13:39 [PATCH] doc: add deprecation for restrictions in telemetry naming Bruce Richardson
` (4 preceding siblings ...)
2022-07-12 9:04 ` [PATCH v2] " Bruce Richardson
@ 2022-07-12 9:09 ` Bruce Richardson
2022-07-15 16:30 ` Thomas Monjalon
5 siblings, 1 reply; 10+ messages in thread
From: Bruce Richardson @ 2022-07-12 9:09 UTC (permalink / raw)
To: dev
Cc: Bruce Richardson, Andrew Rybchenko, Morten Brørup,
David Marchand
Following discussion on-list [1], we will look to limited the allowed
characters in names for items in telemetry. This will simplify the
escaping needed for json output, or any future output formats. The lists
will initially be minimal, since expansion to allow more characters can
be done without affecting compatibility, while reducing the set cannot.
[1] http://inbox.dpdk.org/dev/20220623164245.561371-1-bruce.richardson@intel.com/#r
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: David Marchand <david.marchand@redhat.com>
---
doc/guides/rel_notes/deprecation.rst | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 4e5b23c53d..6ef93758d4 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -119,6 +119,13 @@ Deprecation Notices
* metrics: The function ``rte_metrics_init`` will have a non-void return
in order to notify errors instead of calling ``rte_exit``.
+* telemetry: The allowed characters in names for dictionary values will be limited to
+ alphanumeric characters and a small subset of additional printable characters.
+ This will ensure that all dictionary parameter names can be output without escaping
+ in JSON - or in any future output format used. Names for the telemetry commands will
+ be similarly limited. The parameters for telemetry commands are unaffected by this
+ change.
+
* raw/ioat: The ``ioat`` rawdev driver has been deprecated, since it's
functionality is provided through the new ``dmadev`` infrastructure.
To continue to use hardware previously supported by the ``ioat`` rawdev driver,
--
2.34.1
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v3] doc: add deprecation for restrictions in telemetry naming
2022-07-12 9:09 ` [PATCH v3] " Bruce Richardson
@ 2022-07-15 16:30 ` Thomas Monjalon
0 siblings, 0 replies; 10+ messages in thread
From: Thomas Monjalon @ 2022-07-15 16:30 UTC (permalink / raw)
To: Bruce Richardson
Cc: dev, Andrew Rybchenko, Morten Brørup, David Marchand
12/07/2022 11:09, Bruce Richardson:
> Following discussion on-list [1], we will look to limited the allowed
> characters in names for items in telemetry. This will simplify the
> escaping needed for json output, or any future output formats. The lists
> will initially be minimal, since expansion to allow more characters can
> be done without affecting compatibility, while reducing the set cannot.
>
> [1] http://inbox.dpdk.org/dev/20220623164245.561371-1-bruce.richardson@intel.com/#r
>
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Ciara Power <ciara.power@intel.com>
Acked-by: David Marchand <david.marchand@redhat.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 10+ messages in thread