summaryrefslogtreecommitdiffstats
path: root/drivers/net/netdevsim/dev.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2019-09-13 22:11:14 +0200
committerDavid S. Miller <davem@davemloft.net>2019-09-13 22:11:14 +0200
commit1ba569fc2250b7717fcf3b943efe043c98c6a919 (patch)
tree28ebb70925a228cefd4eab0435e7e66f96e0719f /drivers/net/netdevsim/dev.c
parentip: support SO_MARK cmsg (diff)
parentnet: devlink: move reload fail indication to devlink core and expose to user (diff)
downloadlinux-1ba569fc2250b7717fcf3b943efe043c98c6a919.tar.xz
linux-1ba569fc2250b7717fcf3b943efe043c98c6a919.zip
Merge branch 'devlink-move-reload-fail-indication-to-devlink-core-and-expose-to-user'
Jiri Pirko says: ==================== net: devlink: move reload fail indication to devlink core and expose to user First two patches are dependencies of the last one. That moves devlink reload failure indication to the devlink code, so the drivers do not have to track it themselves. Currently it is only mlxsw, but I will send a follow-up patchset that introduces this in netdevsim too. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/netdevsim/dev.c')
-rw-r--r--drivers/net/netdevsim/dev.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/net/netdevsim/dev.c b/drivers/net/netdevsim/dev.c
index 39cdb6c18ec0..7fba7b271a57 100644
--- a/drivers/net/netdevsim/dev.c
+++ b/drivers/net/netdevsim/dev.c
@@ -521,8 +521,14 @@ static void nsim_dev_traps_exit(struct devlink *devlink)
kfree(nsim_dev->trap_data);
}
-static int nsim_dev_reload(struct devlink *devlink,
- struct netlink_ext_ack *extack)
+static int nsim_dev_reload_down(struct devlink *devlink,
+ struct netlink_ext_ack *extack)
+{
+ return 0;
+}
+
+static int nsim_dev_reload_up(struct devlink *devlink,
+ struct netlink_ext_ack *extack)
{
enum nsim_resource_id res_ids[] = {
NSIM_RESOURCE_IPV4_FIB, NSIM_RESOURCE_IPV4_FIB_RULES,
@@ -638,7 +644,8 @@ nsim_dev_devlink_trap_action_set(struct devlink *devlink,
}
static const struct devlink_ops nsim_dev_devlink_ops = {
- .reload = nsim_dev_reload,
+ .reload_down = nsim_dev_reload_down,
+ .reload_up = nsim_dev_reload_up,
.flash_update = nsim_dev_flash_update,
.trap_init = nsim_dev_devlink_trap_init,
.trap_action_set = nsim_dev_devlink_trap_action_set,