History

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.

Alex Vesker committed 8 years ago

Commit 4e547951 parent 866319b2 files · +189 −0Browse files

Showing the changes to include/uapi/linux (1 of 2 files). Show all

Unified · Split

include/uapi/linux/devlink.h+7−0
@@ -87,6 +87,7 @@ enum devlink_command { · 86 unmodified lines
8787 DEVLINK_CMD_REGION_SET,
8888 DEVLINK_CMD_REGION_NEW,
8989 DEVLINK_CMD_REGION_DEL,
90+ DEVLINK_CMD_REGION_READ,
9091
9192 /* add new commands above here */
9293 __DEVLINK_CMD_MAX,
@@ -273,6 +274,12 @@ enum devlink_attr { · 180 unmodified lines
273274 DEVLINK_ATTR_REGION_SNAPSHOT, /* nested */
274275 DEVLINK_ATTR_REGION_SNAPSHOT_ID, /* u32 */
275276
277+ DEVLINK_ATTR_REGION_CHUNKS, /* nested */
278+ DEVLINK_ATTR_REGION_CHUNK, /* nested */
279+ DEVLINK_ATTR_REGION_CHUNK_DATA, /* binary */
280+ DEVLINK_ATTR_REGION_CHUNK_ADDR, /* u64 */
281+ DEVLINK_ATTR_REGION_CHUNK_LEN, /* u64 */
282+
276283 /* add new attributes above here, update the policy in devlink.c */
277284
278285 __DEVLINK_ATTR_MAX,