Message ID | 20230606071219.483255-10-saeed@kernel.org (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | [net-next,01/15] RDMA/mlx5: Free second uplink ib port | expand |
From: Saeed Mahameed <saeed@kernel.org> Date: Tue, 6 Jun 2023 00:12:13 -0700 > From: Dragos Tatulea <dtatulea@nvidia.com> > > The page_pool error message is a bit cryptic when the > requested size is too large. Add a message on the driver > side to display how many pages were actually requested. Why not rather expand Page Pool's "gave up with error" into detailed error messages? I thought we usually go the other way around in the upstream and make stuff as generic as possible :D With this patch, you'll have 2 error messages at the same time: Page Pool's one and then yours. > > Signed-off-by: Dragos Tatulea <dtatulea@nvidia.com> > Reviewed-by: Tariq Toukan <tariqt@nvidia.com> > Signed-off-by: Saeed Mahameed <saeedm@nvidia.com> [...] Thanks, Olek
On Wed, 2023-06-07 at 18:24 +0200, Alexander Lobakin wrote: > From: Saeed Mahameed <saeed@kernel.org> > Date: Tue, 6 Jun 2023 00:12:13 -0700 > > > From: Dragos Tatulea <dtatulea@nvidia.com> > > > > The page_pool error message is a bit cryptic when the > > requested size is too large. Add a message on the driver > > side to display how many pages were actually requested. > > Why not rather expand Page Pool's "gave up with error" into detailed > error messages? I thought we usually go the other way around in the > upstream and make stuff as generic as possible :D > With this patch, you'll have 2 error messages at the same time: Page > Pool's one and then yours. > That makes sense. Then you can also print out the values: requested vs the constant max which is not (yet) exposed. I can prepare a new version of the patch. > > > > Signed-off-by: Dragos Tatulea <dtatulea@nvidia.com> > > Reviewed-by: Tariq Toukan <tariqt@nvidia.com> > > Signed-off-by: Saeed Mahameed <saeedm@nvidia.com> > [...] > > Thanks, > Olek Thanks, Dragos
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c index a7c526ee5024..579eb8cd928e 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c @@ -849,6 +849,9 @@ static int mlx5e_alloc_rq(struct mlx5e_params *params, rq->page_pool = page_pool_create(&pp_params); if (IS_ERR(rq->page_pool)) { err = PTR_ERR(rq->page_pool); + if (err == -E2BIG) + mlx5_core_err(mdev, "requested page_pool size is too large: %u", + pp_params.pool_size); rq->page_pool = NULL; goto err_free_by_rq_type; }