RFC devlink: Add port stats
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest2 patches 7 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | devlink: Introduce stats to the port objectinclude/ net/ | +108 | 0 replies | |
| 2/2 | devlink: Add statistics to port getinclude/ net/ | +43 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [RFC PATCH net-next 0/2] devlink: Add port stats
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 18Michael 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(+)
Signature · 1 line
2.17.2