diff options
author | Maxim Mikityanskiy <maximmi@nvidia.com> | 2022-09-27 23:36:02 +0300 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2022-09-29 05:36:36 +0300 |
commit | 527918e9cc4d0578dbea7c67594050c2056bd2e4 (patch) | |
tree | aca3ef4087bbf8c7332bbdc64e6bc7b2e19056ad /drivers | |
parent | ed5c92ff0f3e2e1a9b9b7bf1d14f96bf9ceebfb3 (diff) | |
download | linux-527918e9cc4d0578dbea7c67594050c2056bd2e4.tar.xz |
net/mlx5e: Use mlx5e_stop_room_for_max_wqe where appropriate
mlx5e_alloc_xdpsq calculates sq->stop_room internally, but there is
already a function for that: mlx5e_stop_room_for_max_wqe. This commit
makes use of this function.
Signed-off-by: Maxim Mikityanskiy <maximmi@nvidia.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Reviewed-by: Saeed Mahameed <saeedm@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c index ec74f330297e..688a6589b3b8 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c @@ -1155,7 +1155,7 @@ static int mlx5e_alloc_xdpsq(struct mlx5e_channel *c, is_redirect ? &c->priv->channel_stats[c->ix]->xdpsq : &c->priv->channel_stats[c->ix]->rq_xdpsq; - sq->stop_room = MLX5E_STOP_ROOM(mlx5e_get_max_sq_wqebbs(mdev)); + sq->stop_room = mlx5e_stop_room_for_max_wqe(mdev); sq->max_sq_mpw_wqebbs = mlx5e_get_max_sq_aligned_wqebbs(mdev); param->wq.db_numa_node = cpu_to_node(c->cpu); |