Skip to content

Commit 2dc768c

Browse files
Cosmin RatiuPaolo Abeni
authored andcommitted
net/mlx5e: Trim the length of the num_doorbell error
When trying to set num_doorbells to a value greater than the max number of channels, the error message was going over the netlink limit of 80 chars, truncating the most important part of the message, the number of channels. Fix that by trimming the length a bit. Fixes: 11bbcfb ("net/mlx5e: Use the 'num_doorbells' devlink param") Signed-off-by: Cosmin Ratiu <cratiu@nvidia.com> Reviewed-by: Dragos Tatulea <dtatulea@nvidia.com> Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Link: https://patch.msgid.link/1762681073-1084058-3-git-send-email-tariqt@nvidia.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
1 parent 0bcd5b3 commit 2dc768c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • drivers/net/ethernet/mellanox/mlx5/core

drivers/net/ethernet/mellanox/mlx5/core/devlink.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,7 @@ static int mlx5_devlink_num_doorbells_validate(struct devlink *devlink, u32 id,
541541
max_num_channels = mlx5e_get_max_num_channels(mdev);
542542
if (val32 > max_num_channels) {
543543
NL_SET_ERR_MSG_FMT_MOD(extack,
544-
"Requested num_doorbells (%u) exceeds maximum number of channels (%u)",
544+
"Requested num_doorbells (%u) exceeds max number of channels (%u)",
545545
val32, max_num_channels);
546546
return -EINVAL;
547547
}

0 commit comments

Comments
 (0)