diff options
| author | Jakub Kicinski <jakub.kicinski@netronome.com> | 2019-01-31 13:50:40 -0500 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2019-02-01 18:30:30 -0500 |
| commit | f9cf22882c606f3ffe06f620bb6d03b9eff18d3d (patch) | |
| tree | 0e02436128b6a603f57e8bb26622921e21d64332 /include/uapi/linux/devlink.h | |
| parent | 26281e2c83e5536dc7ceea7da774107ca45c4e67 (diff) | |
devlink: add device information API
ethtool -i has served us well for a long time, but its showing
its limitations more and more. The device information should
also be reported per device not per-netdev.
Lay foundation for a simple devlink-based way of reading device
info. Add driver name and device serial number as initial pieces
of information exposed via this new API.
v3:
- rename helpers (Jiri);
- rename driver name attr (Jiri);
- remove double spacing in commit message (Jiri).
RFC v2:
- wrap the skb into an opaque structure (Jiri);
- allow the serial number of be any length (Jiri & Andrew);
- add driver name (Jonathan).
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/uapi/linux/devlink.h')
| -rw-r--r-- | include/uapi/linux/devlink.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/uapi/linux/devlink.h b/include/uapi/linux/devlink.h index 61b4447a6c5b..142710d45093 100644 --- a/include/uapi/linux/devlink.h +++ b/include/uapi/linux/devlink.h | |||
| @@ -94,6 +94,8 @@ enum devlink_command { | |||
| 94 | DEVLINK_CMD_PORT_PARAM_NEW, | 94 | DEVLINK_CMD_PORT_PARAM_NEW, |
| 95 | DEVLINK_CMD_PORT_PARAM_DEL, | 95 | DEVLINK_CMD_PORT_PARAM_DEL, |
| 96 | 96 | ||
| 97 | DEVLINK_CMD_INFO_GET, /* can dump */ | ||
| 98 | |||
| 97 | /* add new commands above here */ | 99 | /* add new commands above here */ |
| 98 | __DEVLINK_CMD_MAX, | 100 | __DEVLINK_CMD_MAX, |
| 99 | DEVLINK_CMD_MAX = __DEVLINK_CMD_MAX - 1 | 101 | DEVLINK_CMD_MAX = __DEVLINK_CMD_MAX - 1 |
| @@ -290,6 +292,9 @@ enum devlink_attr { | |||
| 290 | DEVLINK_ATTR_REGION_CHUNK_ADDR, /* u64 */ | 292 | DEVLINK_ATTR_REGION_CHUNK_ADDR, /* u64 */ |
| 291 | DEVLINK_ATTR_REGION_CHUNK_LEN, /* u64 */ | 293 | DEVLINK_ATTR_REGION_CHUNK_LEN, /* u64 */ |
| 292 | 294 | ||
| 295 | DEVLINK_ATTR_INFO_DRIVER_NAME, /* string */ | ||
| 296 | DEVLINK_ATTR_INFO_SERIAL_NUMBER, /* string */ | ||
| 297 | |||
| 293 | /* add new attributes above here, update the policy in devlink.c */ | 298 | /* add new attributes above here, update the policy in devlink.c */ |
| 294 | 299 | ||
| 295 | __DEVLINK_ATTR_MAX, | 300 | __DEVLINK_ATTR_MAX, |
