All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH net-next 0/2] devlink: Add port stats
@ 2022-04-07  8:40 Michael Guralnik
  2022-04-07  8:40 ` [RFC PATCH net-next 1/2] devlink: Introduce stats to the port object Michael Guralnik
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Michael Guralnik @ 2022-04-07  8:40 UTC (permalink / raw)
  To: netdev; +Cc: jiri, ariela, maorg, saeedm, kuba, moshe, Michael Guralnik

This patch set adds port statistics to the devlink port object.
It allows device drivers to dynamically attach and detach counters from a
devlink port object.

The approach of adding object-attached statistics is already supported for trap
with traffic statistics and for the dev object with reload statistics.
For the port object, this will allow the device driver to expose and dynamicly
control a set of metrics related to the port.
Currently we add support only for counters, but later API extensions can be made
to support histograms or configurable counters.

The statistics are exposed to the user with the port get command.

Example:
# devlink -s port show
pci/0000:00:0b.0/65535: type eth netdev eth1 flavour physical port 0 splittable false
  stats:
    counter1 235
    counter2 18

Michael Guralnik (2):
  devlink: Introduce stats to the port object
  devlink: Add statistics to port get

 include/net/devlink.h        |  28 +++++++++
 include/uapi/linux/devlink.h |   4 ++
 net/core/devlink.c           | 119 +++++++++++++++++++++++++++++++++++
 3 files changed, 151 insertions(+)

-- 
2.17.2


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2022-04-12 15:35 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-07  8:40 [RFC PATCH net-next 0/2] devlink: Add port stats Michael Guralnik
2022-04-07  8:40 ` [RFC PATCH net-next 1/2] devlink: Introduce stats to the port object Michael Guralnik
2022-04-07  8:40 ` [RFC PATCH net-next 2/2] devlink: Add statistics to port get Michael Guralnik
2022-04-08  3:16 ` [RFC PATCH net-next 0/2] devlink: Add port stats Jakub Kicinski
2022-04-11 10:28   ` Jiri Pirko
2022-04-11 17:49     ` Jakub Kicinski
2022-04-11 10:31   ` Jiri Pirko
2022-04-11 18:01     ` Jakub Kicinski
2022-04-12  8:16       ` Jiri Pirko
2022-04-12 15:34         ` Jakub Kicinski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.