summaryrefslogtreecommitdiffstats
path: root/include/uapi/linux/devlink.h
diff options
context:
space:
mode:
authorAlex Vesker2018-07-12 14:13:14 +0200
committerDavid S. Miller2018-07-13 02:37:13 +0200
commit4e54795a27f56102649f121a34b8445e42f79ccd (patch)
treecbf6cf97506f1ee17fd9aabfbd41ac8210cda9a0 /include/uapi/linux/devlink.h
parentdevlink: Add support for region snapshot delete command (diff)
downloadkernel-qcow2-linux-4e54795a27f56102649f121a34b8445e42f79ccd.tar.gz
kernel-qcow2-linux-4e54795a27f56102649f121a34b8445e42f79ccd.tar.xz
kernel-qcow2-linux-4e54795a27f56102649f121a34b8445e42f79ccd.zip
devlink: Add support for region snapshot read command
Add support for DEVLINK_CMD_REGION_READ_GET used for both reading and dumping region data. Read allows reading from a region specific address for given length. Dump allows reading the full region. If only snapshot ID is provided a snapshot dump will be done. If snapshot ID, Address and Length are provided a snapshot read will done. This is used for both snapshot access and will be used in the same way to access current data on the region. Signed-off-by: Alex Vesker <valex@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/uapi/linux/devlink.h')
-rw-r--r--include/uapi/linux/devlink.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/uapi/linux/devlink.h b/include/uapi/linux/devlink.h
index d212e02f843f..79407bbd296d 100644
--- a/include/uapi/linux/devlink.h
+++ b/include/uapi/linux/devlink.h
@@ -87,6 +87,7 @@ enum devlink_command {
DEVLINK_CMD_REGION_SET,
DEVLINK_CMD_REGION_NEW,
DEVLINK_CMD_REGION_DEL,
+ DEVLINK_CMD_REGION_READ,
/* add new commands above here */
__DEVLINK_CMD_MAX,
@@ -273,6 +274,12 @@ enum devlink_attr {
DEVLINK_ATTR_REGION_SNAPSHOT, /* nested */
DEVLINK_ATTR_REGION_SNAPSHOT_ID, /* u32 */
+ DEVLINK_ATTR_REGION_CHUNKS, /* nested */
+ DEVLINK_ATTR_REGION_CHUNK, /* nested */
+ DEVLINK_ATTR_REGION_CHUNK_DATA, /* binary */
+ DEVLINK_ATTR_REGION_CHUNK_ADDR, /* u64 */
+ DEVLINK_ATTR_REGION_CHUNK_LEN, /* u64 */
+
/* add new attributes above here, update the policy in devlink.c */
__DEVLINK_ATTR_MAX,