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.
Showing the changes to include/uapi/linux (1 of 2 files). Show all
Unified · Split
| @@ -87,6 +87,7 @@ enum devlink_command { · 86 unmodified lines | ||
| 87 | 87 | DEVLINK_CMD_REGION_SET, |
| 88 | 88 | DEVLINK_CMD_REGION_NEW, |
| 89 | 89 | DEVLINK_CMD_REGION_DEL, |
| 90 | + DEVLINK_CMD_REGION_READ, | |
| 90 | 91 | |
| 91 | 92 | /* add new commands above here */ |
| 92 | 93 | __DEVLINK_CMD_MAX, |
| @@ -273,6 +274,12 @@ enum devlink_attr { · 180 unmodified lines | ||
| 273 | 274 | DEVLINK_ATTR_REGION_SNAPSHOT, /* nested */ |
| 274 | 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 | 283 | /* add new attributes above here, update the policy in devlink.c */ |
| 277 | 284 | |
| 278 | 285 | __DEVLINK_ATTR_MAX, |