]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
net/mlx5e: Trim the length of the num_doorbell error
authorCosmin Ratiu <cratiu@nvidia.com>
Sun, 9 Nov 2025 09:37:50 +0000 (11:37 +0200)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 11 Nov 2025 14:05:44 +0000 (15:05 +0100)
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: 11bbcfb7668c ("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>
drivers/net/ethernet/mellanox/mlx5/core/devlink.c

index fceea83abbd76b9f3cfe505003d4ec82501f309f..887adf4807d164f1e386a195947b00995caa7bda 100644 (file)
@@ -541,7 +541,7 @@ static int mlx5_devlink_num_doorbells_validate(struct devlink *devlink, u32 id,
        max_num_channels = mlx5e_get_max_num_channels(mdev);
        if (val32 > max_num_channels) {
                NL_SET_ERR_MSG_FMT_MOD(extack,
-                                      "Requested num_doorbells (%u) exceeds maximum number of channels (%u)",
+                                      "Requested num_doorbells (%u) exceeds max number of channels (%u)",
                                       val32, max_num_channels);
                return -EINVAL;
        }