On 10/24/17 3:22 AM, Jiri Pirko wrote: > diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c > b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c > index 12b6ac4..565f94e 100644 > --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c > +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c > @@ -3864,7 +3864,6 @@ static void mlxsw_sp_fini(struct mlxsw_core *mlxsw_core) > mlxsw_sp_fids_fini(mlxsw_sp); > mlxsw_sp_kvdl_fini(mlxsw_sp); > } > - > static const struct mlxsw_config_profile mlxsw_sp_config_profile = { > .used_max_vepa_channels = 1, > .max_vepa_channels = 0,
Why remove the spacer line? > @@ -3897,6 +3896,95 @@ static const struct mlxsw_config_profile > mlxsw_sp_config_profile = { > .resource_query_enable = 1, > }; > > +int mlxsw_sp_resource_kvd_size_validate(void *priv, u64 size) > +{ > + /* KVD total size cannot be set*/ > + return -EINVAL; -EOPNOTSUPP? There is nothing wrong with the value; it's the action that is not supported. > +} > + > +int mlxsw_sp_resource_kvd_sub_size_validate(void *priv, u64 size) > +{ > + const struct mlxsw_config_profile *profile; > + > + profile = &mlxsw_sp_config_profile; > + if (size % profile->kvd_hash_granularity) > + return -EINVAL; devlink needs extack capability to return messages to the user.