History

devlink: Add health buffer support

Devlink health buffer is a mechanism to pass descriptors between drivers and devlink. The API allows the driver to add objects, object pair, value array (nested attributes), value and name. Driver can use this API to fill the buffers in a format which can be translated by the devlink to the netlink message. In order to fulfill it, an internal buffer descriptor is defined. This will hold the data and metadata per each attribute and by used to pass actual commands to the netlink. This mechanism will be later used in devlink health for dump and diagnose data store by the drivers.

Eran Ben Elisha committed 7 years ago

Commit cb5ccfb1 parent f88c19a3 files · +585 −0Browse files

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

Unified · Split

include/uapi/linux/devlink.h+8−0
@@ -285,6 +285,14 @@ enum devlink_attr { · 284 unmodified lines
285 DEVLINK_ATTR_REGION_CHUNK_ADDR, /* u64 */285 DEVLINK_ATTR_REGION_CHUNK_ADDR, /* u64 */
286 DEVLINK_ATTR_REGION_CHUNK_LEN, /* u64 */286 DEVLINK_ATTR_REGION_CHUNK_LEN, /* u64 */
287 287
288 DEVLINK_ATTR_HEALTH_BUFFER_OBJECT, /* nested */
289 DEVLINK_ATTR_HEALTH_BUFFER_OBJECT_PAIR, /* nested */
290 DEVLINK_ATTR_HEALTH_BUFFER_OBJECT_NAME, /* string */
291 DEVLINK_ATTR_HEALTH_BUFFER_OBJECT_VALUE, /* nested */
292 DEVLINK_ATTR_HEALTH_BUFFER_OBJECT_VALUE_ARRAY, /* nested */
293 DEVLINK_ATTR_HEALTH_BUFFER_OBJECT_VALUE_TYPE, /* u8 */
294 DEVLINK_ATTR_HEALTH_BUFFER_OBJECT_VALUE_DATA, /* dynamic */
295
288 /* add new attributes above here, update the policy in devlink.c */296 /* add new attributes above here, update the policy in devlink.c */
289 297
290 __DEVLINK_ATTR_MAX,298 __DEVLINK_ATTR_MAX,