diff options
author | Dmytro Linkin <dlinkin@nvidia.com> | 2021-06-23 16:43:14 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-06-23 15:46:25 -0700 |
commit | ff99324ded0176d28c3d8de7cac44580cf79d52a (patch) | |
tree | d4300543296b2d846f2e0941961b1e470f0543e3 /net/core | |
parent | 1321ed5e76488cfd7a5d3ee83254be9b7c1cc581 (diff) |
devlink: Remove eswitch mode check for mode set call
When eswitch is disabled, querying its current mode results in error.
Due to this when trying to set the eswitch mode for mlx5 devices, it
fails to set the eswitch switchdev mode.
Hence remove such check.
Fixes: a8ecb93ef03d ("devlink: Introduce rate nodes")
Signed-off-by: Dmytro Linkin <dlinkin@nvidia.com>
Reviewed-by: Parav Pandit <parav@nvidia.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/devlink.c | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/net/core/devlink.c b/net/core/devlink.c index ba27395d8fb3..153d432f6daf 100644 --- a/net/core/devlink.c +++ b/net/core/devlink.c @@ -2709,17 +2709,6 @@ static int devlink_rate_nodes_check(struct devlink *devlink, u16 mode, struct netlink_ext_ack *extack) { struct devlink_rate *devlink_rate; - u16 old_mode; - int err; - - if (!devlink->ops->eswitch_mode_get) - return -EOPNOTSUPP; - err = devlink->ops->eswitch_mode_get(devlink, &old_mode); - if (err) - return err; - - if (old_mode == mode) - return 0; list_for_each_entry(devlink_rate, &devlink->rate_list, list) if (devlink_rate_is_node(devlink_rate)) { |