Thread (12 messages) flat view 12 messages, 3 authors, 2017-10-29

Re: [patch net-next RFC 5/7] mlxsw: Register KVD resources with devlink

From: David Ahern <hidden>
Date: 2017-10-25 16:40:06

On 10/24/17 3:22 AM, Jiri Pirko wrote:
quoted hunk ↗ jump to hunk
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?
quoted hunk ↗ jump to hunk
@@ -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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help