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
87 DEVLINK_CMD_REGION_SET,87 DEVLINK_CMD_REGION_SET,
88 DEVLINK_CMD_REGION_NEW,88 DEVLINK_CMD_REGION_NEW,
89 DEVLINK_CMD_REGION_DEL,89 DEVLINK_CMD_REGION_DEL,
90 DEVLINK_CMD_REGION_READ,
90 91
91 /* add new commands above here */92 /* add new commands above here */
92 __DEVLINK_CMD_MAX,93 __DEVLINK_CMD_MAX,
@@ -273,6 +274,12 @@ enum devlink_attr { · 180 unmodified lines
273 DEVLINK_ATTR_REGION_SNAPSHOT, /* nested */274 DEVLINK_ATTR_REGION_SNAPSHOT, /* nested */
274 DEVLINK_ATTR_REGION_SNAPSHOT_ID, /* u32 */275 DEVLINK_ATTR_REGION_SNAPSHOT_ID, /* u32 */
275 276
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
276 /* add new attributes above here, update the policy in devlink.c */283 /* add new attributes above here, update the policy in devlink.c */
277 284
278 __DEVLINK_ATTR_MAX,285 __DEVLINK_ATTR_MAX,