devlink: Extend the support querying for region snapshot IDs

Extend the support for DEVLINK_CMD_REGION_GET command to also
return the IDs of the snapshot currently present on the region.
Each reply will include a nested snapshots attribute that
can contain multiple snapshot attributes each with an ID.

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>
This commit is contained in:
Alex Vesker
2018-07-12 15:13:12 +03:00
committed by David S. Miller
parent d8db7ea55f
commit a006d467fb
2 changed files with 56 additions and 0 deletions

View File

@@ -267,6 +267,9 @@ enum devlink_attr {
DEVLINK_ATTR_REGION_NAME, /* string */
DEVLINK_ATTR_REGION_SIZE, /* u64 */
DEVLINK_ATTR_REGION_SNAPSHOTS, /* nested */
DEVLINK_ATTR_REGION_SNAPSHOT, /* nested */
DEVLINK_ATTR_REGION_SNAPSHOT_ID, /* u32 */
/* add new attributes above here, update the policy in devlink.c */