MCPcopy Create free account
hub / github.com/F-Stack/f-stack / send_doorbell

Function send_doorbell

dpdk/drivers/regex/mlx5/mlx5_regex_fastpath.c:207–222  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

205}
206
207static inline void
208send_doorbell(struct mlx5_regex_priv *priv, struct mlx5_regex_hw_qp *qp)
209{
210 size_t wqe_offset = (qp->db_pi & (qp_size_get(qp) - 1)) *
211 (MLX5_SEND_WQE_BB << (priv->has_umr ? 2 : 0)) +
212 (priv->has_umr ? MLX5_REGEX_UMR_WQE_SIZE : 0);
213 uint8_t *wqe = (uint8_t *)(uintptr_t)qp->qp_obj.wqes + wqe_offset;
214 uint32_t actual_pi = (priv->has_umr ? ((1 + qp->db_pi) * 4) : qp->db_pi)
215 & MLX5_REGEX_MAX_WQE_INDEX;
216
217 /* Or the fm_ce_se instead of set, avoid the fence be cleared. */
218 ((struct mlx5_wqe_ctrl_seg *)wqe)->fm_ce_se |= MLX5_WQE_CTRL_CQ_UPDATE;
219 mlx5_doorbell_ring(&priv->uar.bf_db, *(volatile uint64_t *)wqe,
220 actual_pi, &qp->qp_obj.db_rec[MLX5_SND_DBR],
221 !priv->uar.dbnc);
222}
223
224static inline int
225get_free(struct mlx5_regex_hw_qp *qp, uint8_t has_umr) {

Callers 2

mlx5_regexdev_enqueueFunction · 0.85

Calls 2

qp_size_getFunction · 0.85
mlx5_doorbell_ringFunction · 0.85

Tested by

no test coverage detected