| 205 | } |
| 206 | |
| 207 | static inline void |
| 208 | send_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 | |
| 224 | static inline int |
| 225 | get_free(struct mlx5_regex_hw_qp *qp, uint8_t has_umr) { |
no test coverage detected