summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorArkadi Sharshevsky <arkadis@mellanox.com>2018-01-15 08:59:04 +0100
committerDavid S. Miller <davem@davemloft.net>2018-01-16 14:15:34 -0500
commit2d8dc5bbf4e7603747875eb5cadcd67c1fa8b1bb (patch)
treef47537503b83bd112c2530176ca7321ffe0f81d9 /include
parentd9f9b9a4d05fab693fd23a9ecaa330e03ebe2c31 (diff)
devlink: Add support for reload
Add support for performing driver hot reload. Signed-off-by: Arkadi Sharshevsky <arkadis@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/net/devlink.h1
-rw-r--r--include/uapi/linux/devlink.h5
2 files changed, 6 insertions, 0 deletions
diff --git a/include/net/devlink.h b/include/net/devlink.h
index ceb1895d119b..c698883fb0bb 100644
--- a/include/net/devlink.h
+++ b/include/net/devlink.h
@@ -281,6 +281,7 @@ struct devlink_resource {
#define DEVLINK_RESOURCE_ID_PARENT_TOP 0
struct devlink_ops {
+ int (*reload)(struct devlink *devlink);
int (*port_type_set)(struct devlink_port *devlink_port,
enum devlink_port_type port_type);
int (*port_split)(struct devlink *devlink, unsigned int port_index,
diff --git a/include/uapi/linux/devlink.h b/include/uapi/linux/devlink.h
index f89950443e17..555ddcaf0be2 100644
--- a/include/uapi/linux/devlink.h
+++ b/include/uapi/linux/devlink.h
@@ -73,6 +73,11 @@ enum devlink_command {
DEVLINK_CMD_RESOURCE_SET,
DEVLINK_CMD_RESOURCE_DUMP,
+ /* Hot driver reload, makes configuration changes take place. The
+ * devlink instance is not released during the process.
+ */
+ DEVLINK_CMD_RELOAD,
+
/* add new commands above here */
__DEVLINK_CMD_MAX,
DEVLINK_CMD_MAX = __DEVLINK_CMD_MAX - 1