mirror of
https://github.com/torvalds/linux.git
synced 2026-05-29 17:43:52 +02:00
net/mlx5e: Use multiple CQ doorbells
Channel doorbells are now also used by all channel CQs. A new 'uar' parameter is added to 'struct mlx5e_create_cq_param', which is then used in mlx5e_alloc_cq. A single UAR page has two TX doorbells and a single CQ doorbell, so every consecutive pair of 'struct mlx5_sq_bfreg' (TX doorbells) uses the same underlying 'struct mlx5_uars_page' (CQ doorbell). So by using c->bfreg->up, CQs from every consecutive channel pair will share the same CQ doorbell. Non-channel associated CQs keep using the global CQ doorbell. Signed-off-by: Cosmin Ratiu <cratiu@nvidia.com> Reviewed-by: Dragos Tatulea <dtatulea@nvidia.com> Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Reviewed-by: Simon Horman <horms@kernel.org> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
71fb4832d5
commit
325db9c6f6
|
|
@ -1062,6 +1062,7 @@ struct mlx5e_create_cq_param {
|
|||
struct mlx5e_ch_stats *ch_stats;
|
||||
int node;
|
||||
int ix;
|
||||
struct mlx5_uars_page *uar;
|
||||
};
|
||||
|
||||
struct mlx5e_cq_param;
|
||||
|
|
|
|||
|
|
@ -611,6 +611,7 @@ void mlx5e_build_create_cq_param(struct mlx5e_create_cq_param *ccp, struct mlx5e
|
|||
.ch_stats = c->stats,
|
||||
.node = cpu_to_node(c->cpu),
|
||||
.ix = c->vec_ix,
|
||||
.uar = c->bfreg->up,
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -578,6 +578,7 @@ static int mlx5e_ptp_open_tx_cqs(struct mlx5e_ptp *c,
|
|||
ccp.ch_stats = c->stats;
|
||||
ccp.napi = &c->napi;
|
||||
ccp.ix = MLX5E_PTP_CHANNEL_IX;
|
||||
ccp.uar = c->bfreg->up;
|
||||
|
||||
cq_param = &cparams->txq_sq_param.cqp;
|
||||
|
||||
|
|
@ -627,6 +628,7 @@ static int mlx5e_ptp_open_rx_cq(struct mlx5e_ptp *c,
|
|||
ccp.ch_stats = c->stats;
|
||||
ccp.napi = &c->napi;
|
||||
ccp.ix = MLX5E_PTP_CHANNEL_IX;
|
||||
ccp.uar = c->bfreg->up;
|
||||
|
||||
cq_param = &cparams->rq_param.cqp;
|
||||
|
||||
|
|
|
|||
|
|
@ -76,6 +76,7 @@ static int mlx5e_open_trap_rq(struct mlx5e_priv *priv, struct mlx5e_trap *t)
|
|||
ccp.ch_stats = t->stats;
|
||||
ccp.napi = &t->napi;
|
||||
ccp.ix = 0;
|
||||
ccp.uar = mdev->priv.bfreg.up;
|
||||
err = mlx5e_open_cq(priv->mdev, trap_moder, &rq_param->cqp, &ccp, &rq->cq);
|
||||
if (err)
|
||||
return err;
|
||||
|
|
|
|||
|
|
@ -2238,7 +2238,7 @@ static int mlx5e_alloc_cq(struct mlx5_core_dev *mdev,
|
|||
param->eq_ix = ccp->ix;
|
||||
|
||||
err = mlx5e_alloc_cq_common(mdev, ccp->netdev, ccp->wq,
|
||||
mdev->priv.bfreg.up, param, cq);
|
||||
ccp->uar, param, cq);
|
||||
|
||||
cq->napi = ccp->napi;
|
||||
cq->ch_stats = ccp->ch_stats;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user