[PATCH net-next 4/5] net/mlx5: Warn when write combining is not supported

Tariq Toukan posted 5 patches 3 months ago
[PATCH net-next 4/5] net/mlx5: Warn when write combining is not supported
Posted by Tariq Toukan 3 months ago
From: Maor Gottlieb <maorg@nvidia.com>

Warn if write combining is not supported, as it can impact latency.
Add the warning message to be printed only when the driver actually
run the test and detect unsupported state, rather than when
inheriting parent's result for SFs.

Signed-off-by: Maor Gottlieb <maorg@nvidia.com>
Reviewed-by: Michael Guralnik <michaelgur@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/wc.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/wc.c b/drivers/net/ethernet/mellanox/mlx5/core/wc.c
index 740b719e7072..2f0316616fa4 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/wc.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/wc.c
@@ -378,6 +378,9 @@ static void mlx5_core_test_wc(struct mlx5_core_dev *mdev)
 	mlx5_free_bfreg(mdev, &sq->bfreg);
 err_alloc_bfreg:
 	kfree(sq);
+
+	if (mdev->wc_state == MLX5_WC_STATE_UNSUPPORTED)
+		mlx5_core_warn(mdev, "Write combining is not supported\n");
 }
 
 bool mlx5_wc_support_get(struct mlx5_core_dev *mdev)
-- 
2.31.1
Re: [PATCH net-next 4/5] net/mlx5: Warn when write combining is not supported
Posted by Simon Horman 2 months, 4 weeks ago
On Wed, Jul 09, 2025 at 12:16:26AM +0300, Tariq Toukan wrote:
> From: Maor Gottlieb <maorg@nvidia.com>
> 
> Warn if write combining is not supported, as it can impact latency.
> Add the warning message to be printed only when the driver actually
> run the test and detect unsupported state, rather than when
> inheriting parent's result for SFs.
> 
> Signed-off-by: Maor Gottlieb <maorg@nvidia.com>
> Reviewed-by: Michael Guralnik <michaelgur@nvidia.com>
> Signed-off-by: Tariq Toukan <tariqt@nvidia.com>

Reviewed-by: Simon Horman <horms@kernel.org>