diff options
author | Jiri Pirko <jiri@mellanox.com> | 2019-10-07 10:27:08 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-10-07 09:11:07 -0400 |
commit | 8e23cc0319b185de49e35ed4fec174552bdf2f9a (patch) | |
tree | 61ecb8425ee21dbeb2f36d6605e4ce16f77a4aa2 /drivers/net/netdevsim | |
parent | 82a843de41d42681c1bbf9194b28736d06050b08 (diff) | |
download | linux-8e23cc0319b185de49e35ed4fec174552bdf2f9a.tar.bz2 |
netdevsim: implement devlink dev_info op
Do simple dev_info devlink operation implementation which only fills up
the driver name.
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/netdevsim')
-rw-r--r-- | drivers/net/netdevsim/dev.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/net/netdevsim/dev.c b/drivers/net/netdevsim/dev.c index 31d1752c703a..a3d7d39f231a 100644 --- a/drivers/net/netdevsim/dev.c +++ b/drivers/net/netdevsim/dev.c @@ -510,6 +510,13 @@ static int nsim_dev_reload_up(struct devlink *devlink, return nsim_dev_reload_create(nsim_dev, extack); } +static int nsim_dev_info_get(struct devlink *devlink, + struct devlink_info_req *req, + struct netlink_ext_ack *extack) +{ + return devlink_info_driver_name_put(req, DRV_NAME); +} + #define NSIM_DEV_FLASH_SIZE 500000 #define NSIM_DEV_FLASH_CHUNK_SIZE 1000 #define NSIM_DEV_FLASH_CHUNK_TIME_MS 10 @@ -603,6 +610,7 @@ nsim_dev_devlink_trap_action_set(struct devlink *devlink, static const struct devlink_ops nsim_dev_devlink_ops = { .reload_down = nsim_dev_reload_down, .reload_up = nsim_dev_reload_up, + .info_get = nsim_dev_info_get, .flash_update = nsim_dev_flash_update, .trap_init = nsim_dev_devlink_trap_init, .trap_action_set = nsim_dev_devlink_trap_action_set, |