src/dpdk/drivers/net/mlx4/mlx4_txq.c
static void
mlx4_txq_fill_dv_obj_info(struct txq *txq, struct mlx4dv_obj *mlxdv)
{
	struct mlx4_sq *sq = &txq->msq;
	struct mlx4_cq *cq = &txq->mcq;
	struct mlx4dv_qp *dqp = mlxdv->qp.out;
	struct mlx4dv_cq *dcq = mlxdv->cq.out;

	/* Total length, including headroom and spare WQEs. */
	sq->size = (uint32_t)dqp->rq.offset - (uint32_t)dqp->sq.offset;
	sq->buf = (uint8_t *)dqp->buf.buf + dqp->sq.offset;
	sq->eob = sq->buf + sq->size;
	uint32_t headroom_size = 2048 + (1 << dqp->sq.wqe_shift);
	/* Continuous headroom size bytes must always stay freed. */
	sq->remain_size = sq->size - headroom_size;
	sq->owner_opcode = MLX4_OPCODE_SEND | (0u << MLX4_SQ_OWNER_BIT);
	sq->stamp = rte_cpu_to_be_32(MLX4_SQ_STAMP_VAL |
				     (0u << MLX4_SQ_OWNER_BIT));
#ifdef HAVE_IBV_MLX4_UAR_MMAP_OFFSET
	sq->uar_mmap_offset = dqp->uar_mmap_offset;
#else
	sq->uar_mmap_offset = -1; /* Make mmap() fail. */
#endif
	sq->db = dqp->sdb;
	sq->doorbell_qpn = dqp->doorbell_qpn;
	cq->buf = dcq->buf.buf;
	cq->cqe_cnt = dcq->cqe_cnt;
	cq->set_ci_db = dcq->set_ci_db;
	cq->cqe_64 = (dcq->cqe_size & 64) ? 1 : 0;
}
/**
 * Retrieves information needed in order to directly access the Tx queue.
 *
 * @param txq
 *   Pointer to Tx queue structure.
 * @param mlxdv
 *   Pointer to device information for this Tx queue.
 */
Retrieves information needed in order to directly access the Tx queue.
@param txq
Pointer to Tx queue structure.
@param mlxdv
Pointer to device information for this Tx queue.
Retrieves information needed in order to directly access the Tx queue . @param txq Pointer to Tx queue structure . @param mlxdv Pointer to device information for this Tx queue .
static void
mlx4_txq_fill_dv_obj_info(struct txq *txq, struct mlx4dv_obj *mlxdv)
{
	struct mlx4_sq *sq = &txq->msq;
	struct mlx4_cq *cq = &txq->mcq;
	struct mlx4dv_qp *dqp = mlxdv->qp.out;
	struct mlx4dv_cq *dcq = mlxdv->cq.out;
	sq->size = (uint32_t)dqp->rq.offset - (uint32_t)dqp->sq.offset;
	sq->buf = (uint8_t *)dqp->buf.buf + dqp->sq.offset;
	sq->eob = sq->buf + sq->size;
	uint32_t headroom_size = 2048 + (1 << dqp->sq.wqe_shift);
	sq->remain_size = sq->size - headroom_size;
	sq->owner_opcode = MLX4_OPCODE_SEND | (0u << MLX4_SQ_OWNER_BIT);
	sq->stamp = rte_cpu_to_be_32(MLX4_SQ_STAMP_VAL |
				     (0u << MLX4_SQ_OWNER_BIT));
#ifdef HAVE_IBV_MLX4_UAR_MMAP_OFFSET
	sq->uar_mmap_offset = dqp->uar_mmap_offset;
#else
	sq->uar_mmap_offset = -1; 
#endif
	sq->db = dqp->sdb;
	sq->doorbell_qpn = dqp->doorbell_qpn;
	cq->buf = dcq->buf.buf;
	cq->cqe_cnt = dcq->cqe_cnt;
	cq->set_ci_db = dcq->set_ci_db;
	cq->cqe_64 = (dcq->cqe_size & 64) ? 1 : 0;
}
static void mlx4_txq_fill_dv_obj_info ( struct txq * txq , struct mlx4dv_obj * mlxdv ) { struct mlx4_sq * sq = & txq -> msq ; struct mlx4_cq * cq = & txq -> mcq ; struct mlx4dv_qp * dqp = mlxdv -> qp . out ; struct mlx4dv_cq * dcq = mlxdv -> cq . out ; sq -> size = ( uint32_t ) dqp -> rq . offset - ( uint32_t ) dqp -> sq . offset ; sq -> buf = ( uint8_t * ) dqp -> buf . buf + dqp -> sq . offset ; sq -> eob = sq -> buf + sq -> size ; uint32_t headroom_size = 2048 + ( 1 << dqp -> sq . wqe_shift ) ; sq -> remain_size = sq -> size - headroom_size ; sq -> owner_opcode = MLX4_OPCODE_SEND | ( 0u << MLX4_SQ_OWNER_BIT ) ; sq -> stamp = rte_cpu_to_be_32 ( MLX4_SQ_STAMP_VAL | ( 0u << MLX4_SQ_OWNER_BIT ) ) ; #ifdef HAVE_IBV_MLX4_UAR_MMAP_OFFSET sq -> uar_mmap_offset = dqp -> uar_mmap_offset ; #else sq -> uar_mmap_offset = -1 ; #endif sq -> db = dqp -> sdb ; sq -> doorbell_qpn = dqp -> doorbell_qpn ; cq -> buf = dcq -> buf . buf ; cq -> cqe_cnt = dcq -> cqe_cnt ; cq -> set_ci_db = dcq -> set_ci_db ; cq -> cqe_64 = ( dcq -> cqe_size & 64 ) ? 1 : 0 ; }
Retrieves information needed in order to directly access the Tx queue.
Retrieves information needed in order to directly access the Tx queue .
/* Total length, including headroom and spare WQEs. */ /* Continuous headroom size bytes must always stay freed. */ /* Make mmap() fail. */