]> git.ipfire.org Git - thirdparty/iproute2.git/commit
devlink: Add support for devlink-region access
authorAlex Vesker <valex@mellanox.com>
Tue, 17 Jul 2018 08:34:27 +0000 (11:34 +0300)
committerDavid Ahern <dsahern@gmail.com>
Thu, 19 Jul 2018 16:20:15 +0000 (09:20 -0700)
commit8b4fbf0bed8e660dd9bbe6ce1bb3de04df913222
tree5b756f0d766ff4d923476b33d6674bad61e8e230
parent697dce7b3aeeb53ba373b4aec7bc51a9939892c3
devlink: Add support for devlink-region access

Devlink region allows access to driver defined address regions.
Each device can create its supported address regions and register
them. A device which exposes a region will allow access to it
using devlink.

This support allows reading and dumping regions snapshots as well
as presenting information such as region size and current available
snapshots.

A snapshot represents a memory image of a region taken by the driver.
If a device collects a snapshot of an address region it can be later
exposed using devlink region read or dump commands.
This functionality allows for future analyses on the snapshots.

The dump command is designed to read the full address space of a
region or of a snapshot unlike the read command which allows
reading only a specific section in a region/snapshot indicated by
an address and a length, current support is for reading and dumping
for a previously taken snapshot ID.

New commands added:
 devlink region show [ DEV/REGION ]
 devlink region delete DEV/REGION snapshot SNAPSHOT_ID
 devlink region dump DEV/REGION [ snapshot SNAPSHOT_ID ]
 devlink region read DEV/REGION [ snapshot SNAPSHOT_ID ]
                                address ADDRESS length length

Signed-off-by: Alex Vesker <valex@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David Ahern <dsahern@gmail.com>
devlink/devlink.c
man/man8/devlink-region.8 [new file with mode: 0644]
man/man8/devlink.8