mbox series

[v3,0/3] common/cnxk: enable npa telemetry

Message ID cover.1627967359.git.gmuthukrishn@marvell.com (mailing list archive)
Headers
Series common/cnxk: enable npa telemetry |

Message

Gowrishankar Muthukrishnan Aug. 3, 2021, 8:05 a.m. UTC
  This patch series enables telemetry in NPA LF of cnxk.

v3:
 - fixed format specifier for uintptr_t

Gowrishankar Muthukrishnan (3):
  telemetry: enable storing pointer value
  test/telemetry: add unit tests for pointer value
  common/cnxk: add telemetry endpoints to npa

 app/test/test_telemetry_data.c           | 125 +++++++++++++
 app/test/test_telemetry_json.c           |  29 ++-
 drivers/common/cnxk/cnxk_telemetry.h     |  26 +++
 drivers/common/cnxk/cnxk_telemetry_npa.c | 227 +++++++++++++++++++++++
 drivers/common/cnxk/meson.build          |   4 +
 drivers/common/cnxk/roc_platform.h       |   8 +
 lib/telemetry/rte_telemetry.h            |  37 +++-
 lib/telemetry/telemetry.c                |  21 ++-
 lib/telemetry/telemetry_data.c           |  40 +++-
 lib/telemetry/telemetry_data.h           |   2 +
 lib/telemetry/telemetry_json.h           |  32 ++++
 lib/telemetry/version.map                |   2 +
 12 files changed, 539 insertions(+), 14 deletions(-)
 create mode 100644 drivers/common/cnxk/cnxk_telemetry.h
 create mode 100644 drivers/common/cnxk/cnxk_telemetry_npa.c
  

Comments

Power, Ciara Aug. 11, 2021, 3:59 p.m. UTC | #1
Hi Gowrishankar,

>-----Original Message-----
>From: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
>Sent: Tuesday 3 August 2021 09:06
>To: dev@dpdk.org
>Cc: Richardson, Bruce <bruce.richardson@intel.com>; Power, Ciara
><ciara.power@intel.com>; jerinj@marvell.com; kirankumark@marvell.com;
>ndabilpuram@marvell.com; skori@marvell.com; skoteshwar@marvell.com;
>Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
>Subject: [v3, 0/3] common/cnxk: enable npa telemetry
>
>This patch series enables telemetry in NPA LF of cnxk.
>
>v3:
> - fixed format specifier for uintptr_t
>
>Gowrishankar Muthukrishnan (3):
>  telemetry: enable storing pointer value
>  test/telemetry: add unit tests for pointer value
>  common/cnxk: add telemetry endpoints to npa
>
> app/test/test_telemetry_data.c           | 125 +++++++++++++
> app/test/test_telemetry_json.c           |  29 ++-
> drivers/common/cnxk/cnxk_telemetry.h     |  26 +++
> drivers/common/cnxk/cnxk_telemetry_npa.c | 227
>+++++++++++++++++++++++
> drivers/common/cnxk/meson.build          |   4 +
> drivers/common/cnxk/roc_platform.h       |   8 +
> lib/telemetry/rte_telemetry.h            |  37 +++-
> lib/telemetry/telemetry.c                |  21 ++-
> lib/telemetry/telemetry_data.c           |  40 +++-
> lib/telemetry/telemetry_data.h           |   2 +
> lib/telemetry/telemetry_json.h           |  32 ++++
> lib/telemetry/version.map                |   2 +
> 12 files changed, 539 insertions(+), 14 deletions(-)  create mode 100644
>drivers/common/cnxk/cnxk_telemetry.h
> create mode 100644 drivers/common/cnxk/cnxk_telemetry_npa.c
>
>--
>2.25.1

I am still unsure exactly what the use case is here - why are we choosing to publish the pointer values through telemetry rather than using a debug log for example?
Maybe I am missing something here.

Thanks,
Ciara
  
Gowrishankar Muthukrishnan Aug. 11, 2021, 4:18 p.m. UTC | #2
Hi Ciara,

> -----Original Message-----
> From: Power, Ciara <ciara.power@intel.com>
> Sent: Wednesday, August 11, 2021 9:30 PM
> To: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>; dev@dpdk.org
> Cc: Richardson, Bruce <bruce.richardson@intel.com>; Jerin Jacob Kollanukkaran
> <jerinj@marvell.com>; Kiran Kumar Kokkilagadda <kirankumark@marvell.com>;
> Nithin Kumar Dabilpuram <ndabilpuram@marvell.com>; Sunil Kumar Kori
> <skori@marvell.com>; Satha Koteswara Rao Kottidi
> <skoteshwar@marvell.com>
> Subject: [EXT] RE: [v3, 0/3] common/cnxk: enable npa telemetry
> 
> External Email
> 
> ----------------------------------------------------------------------
> Hi Gowrishankar,
> 
> >-----Original Message-----
> >From: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
> >Sent: Tuesday 3 August 2021 09:06
> >To: dev@dpdk.org
> >Cc: Richardson, Bruce <bruce.richardson@intel.com>; Power, Ciara
> ><ciara.power@intel.com>; jerinj@marvell.com; kirankumark@marvell.com;
> >ndabilpuram@marvell.com; skori@marvell.com; skoteshwar@marvell.com;
> >Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
> >Subject: [v3, 0/3] common/cnxk: enable npa telemetry
> >
> >This patch series enables telemetry in NPA LF of cnxk.
> >
> >v3:
> > - fixed format specifier for uintptr_t
> >
> >Gowrishankar Muthukrishnan (3):
> >  telemetry: enable storing pointer value
> >  test/telemetry: add unit tests for pointer value
> >  common/cnxk: add telemetry endpoints to npa
> >
> > app/test/test_telemetry_data.c           | 125 +++++++++++++
> > app/test/test_telemetry_json.c           |  29 ++-
> > drivers/common/cnxk/cnxk_telemetry.h     |  26 +++
> > drivers/common/cnxk/cnxk_telemetry_npa.c | 227
> >+++++++++++++++++++++++
> > drivers/common/cnxk/meson.build          |   4 +
> > drivers/common/cnxk/roc_platform.h       |   8 +
> > lib/telemetry/rte_telemetry.h            |  37 +++-
> > lib/telemetry/telemetry.c                |  21 ++-
> > lib/telemetry/telemetry_data.c           |  40 +++-
> > lib/telemetry/telemetry_data.h           |   2 +
> > lib/telemetry/telemetry_json.h           |  32 ++++
> > lib/telemetry/version.map                |   2 +
> > 12 files changed, 539 insertions(+), 14 deletions(-)  create mode
> >100644 drivers/common/cnxk/cnxk_telemetry.h
> > create mode 100644 drivers/common/cnxk/cnxk_telemetry_npa.c
> >
> >--
> >2.25.1
> 
> I am still unsure exactly what the use case is here - why are we choosing to
> publish the pointer values through telemetry rather than using a debug log for
> example?

Pointer values are useful sometimes for more debugging through telemetry, hence this proposal.
As I mentioned in v1 thread, this is architecture compliant approach rather than assuming pointer 
value is always 64 bit, when there is need to use pointer value in current telemetry path.

Thanks,
Gowrishankar

> Maybe I am missing something here.
> 
> Thanks,
> Ciara
  
Gowrishankar Muthukrishnan Aug. 24, 2021, 8:53 a.m. UTC | #3
Hi,
Please let me know if any other info is required.

Thanks,
Gowrishankar

> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Gowrishankar Muthukrishnan
> Sent: Wednesday, August 11, 2021 9:49 PM
> To: Power, Ciara <ciara.power@intel.com>; dev@dpdk.org
> Cc: Richardson, Bruce <bruce.richardson@intel.com>; Jerin Jacob Kollanukkaran
> <jerinj@marvell.com>; Kiran Kumar Kokkilagadda <kirankumark@marvell.com>;
> Nithin Kumar Dabilpuram <ndabilpuram@marvell.com>; Sunil Kumar Kori
> <skori@marvell.com>; Satha Koteswara Rao Kottidi
> <skoteshwar@marvell.com>
> Subject: [EXT] Re: [dpdk-dev] [v3, 0/3] common/cnxk: enable npa telemetry
> 
> External Email
> 
> ----------------------------------------------------------------------
> Hi Ciara,
> 
> > -----Original Message-----
> > From: Power, Ciara <ciara.power@intel.com>
> > Sent: Wednesday, August 11, 2021 9:30 PM
> > To: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>;
> > dev@dpdk.org
> > Cc: Richardson, Bruce <bruce.richardson@intel.com>; Jerin Jacob
> > Kollanukkaran <jerinj@marvell.com>; Kiran Kumar Kokkilagadda
> > <kirankumark@marvell.com>; Nithin Kumar Dabilpuram
> > <ndabilpuram@marvell.com>; Sunil Kumar Kori <skori@marvell.com>; Satha
> > Koteswara Rao Kottidi <skoteshwar@marvell.com>
> > Subject: [EXT] RE: [v3, 0/3] common/cnxk: enable npa telemetry
> >
> > External Email
> >
> > ----------------------------------------------------------------------
> > Hi Gowrishankar,
> >
> > >-----Original Message-----
> > >From: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
> > >Sent: Tuesday 3 August 2021 09:06
> > >To: dev@dpdk.org
> > >Cc: Richardson, Bruce <bruce.richardson@intel.com>; Power, Ciara
> > ><ciara.power@intel.com>; jerinj@marvell.com; kirankumark@marvell.com;
> > >ndabilpuram@marvell.com; skori@marvell.com; skoteshwar@marvell.com;
> > >Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
> > >Subject: [v3, 0/3] common/cnxk: enable npa telemetry
> > >
> > >This patch series enables telemetry in NPA LF of cnxk.
> > >
> > >v3:
> > > - fixed format specifier for uintptr_t
> > >
> > >Gowrishankar Muthukrishnan (3):
> > >  telemetry: enable storing pointer value
> > >  test/telemetry: add unit tests for pointer value
> > >  common/cnxk: add telemetry endpoints to npa
> > >
> > > app/test/test_telemetry_data.c           | 125 +++++++++++++
> > > app/test/test_telemetry_json.c           |  29 ++-
> > > drivers/common/cnxk/cnxk_telemetry.h     |  26 +++
> > > drivers/common/cnxk/cnxk_telemetry_npa.c | 227
> > >+++++++++++++++++++++++
> > > drivers/common/cnxk/meson.build          |   4 +
> > > drivers/common/cnxk/roc_platform.h       |   8 +
> > > lib/telemetry/rte_telemetry.h            |  37 +++-
> > > lib/telemetry/telemetry.c                |  21 ++-
> > > lib/telemetry/telemetry_data.c           |  40 +++-
> > > lib/telemetry/telemetry_data.h           |   2 +
> > > lib/telemetry/telemetry_json.h           |  32 ++++
> > > lib/telemetry/version.map                |   2 +
> > > 12 files changed, 539 insertions(+), 14 deletions(-)  create mode
> > >100644 drivers/common/cnxk/cnxk_telemetry.h
> > > create mode 100644 drivers/common/cnxk/cnxk_telemetry_npa.c
> > >
> > >--
> > >2.25.1
> >
> > I am still unsure exactly what the use case is here - why are we
> > choosing to publish the pointer values through telemetry rather than
> > using a debug log for example?
> 
> Pointer values are useful sometimes for more debugging through telemetry,
> hence this proposal.
> As I mentioned in v1 thread, this is architecture compliant approach rather than
> assuming pointer value is always 64 bit, when there is need to use pointer value
> in current telemetry path.
> 
> Thanks,
> Gowrishankar
> 
> > Maybe I am missing something here.
> >
> > Thanks,
> > Ciara
  
Thomas Monjalon Aug. 25, 2021, 10:09 a.m. UTC | #4
11/08/2021 18:18, Gowrishankar Muthukrishnan:
> From: Power, Ciara <ciara.power@intel.com>
> > From: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
> > >  telemetry: enable storing pointer value
[...]
> > I am still unsure exactly what the use case is here - why are we choosing to
> > publish the pointer values through telemetry rather than using a debug log for
> > example?
> 
> Pointer values are useful sometimes for more debugging through telemetry, hence this proposal.
> As I mentioned in v1 thread, this is architecture compliant approach rather than assuming pointer 
> value is always 64 bit, when there is need to use pointer value in current telemetry path.

Why using telemetry for debugging?
I agree with Ciara, debug log is more appropriate.
You can also use the tracing framework.
  
Gowrishankar Muthukrishnan Aug. 25, 2021, 2:38 p.m. UTC | #5
Hi Thomas,

> [...]
> > > I am still unsure exactly what the use case is here - why are we
> > > choosing to publish the pointer values through telemetry rather than
> > > using a debug log for example?
> >
> > Pointer values are useful sometimes for more debugging through telemetry,
> hence this proposal.
> > As I mentioned in v1 thread, this is architecture compliant approach
> > rather than assuming pointer value is always 64 bit, when there is need to use
> pointer value in current telemetry path.
> 
> Why using telemetry for debugging?
> I agree with Ciara, debug log is more appropriate.
> You can also use the tracing framework.
> 

In addition to getting status/stats, we are using this library for remote debugging as this is the only mechanism available in DPDK now. For an instance, accessing data from a pointer address through a root privileged tool. We can internally type cast them to u64 as well but thought of standardizing the conversion through library API instead in case it is useful in other platforms too.

If it does not seem more useful for now, I will take another approach on type casting the values internally in our driver (and avoiding library patch). Please share your thoughts.

Thanks,
Gowrishankar