src/dpdk/drivers/net/mlx5/mlx5_txq.c
static unsigned int
txq_calc_inline_max(struct mlx5_txq_ctrl *txq_ctrl)
{
	const unsigned int desc = 1 << txq_ctrl->txq.elts_n;
	struct mlx5_priv *priv = txq_ctrl->priv;
	unsigned int wqe_size;

	wqe_size = priv->sh->device_attr.max_qp_wr / desc;
	if (!wqe_size)
		return 0;
	/*
	 * This calculation is derived from tthe source of
	 * mlx5_calc_send_wqe() in rdma_core library.
	 */
	wqe_size = wqe_size * MLX5_WQE_SIZE -
		   MLX5_WQE_CSEG_SIZE -
		   MLX5_WQE_ESEG_SIZE -
		   MLX5_WSEG_SIZE -
		   MLX5_WSEG_SIZE +
		   MLX5_DSEG_MIN_INLINE_SIZE;
	return wqe_size;
}
/**
 * Calculate the maximal inline data size for Tx queue.
 *
 * @param txq_ctrl
 *   Pointer to Tx queue control structure.
 *
 * @return
 *   The maximal inline data size.
 */
Calculate the maximal inline data size for Tx queue.
@param txq_ctrl
Pointer to Tx queue control structure.

@return
The maximal inline data size.
Calculate the maximal inline data size for Tx queue . @param txq_ctrl Pointer to Tx queue control structure . @return The maximal inline data size .
static unsigned int
txq_calc_inline_max(struct mlx5_txq_ctrl *txq_ctrl)
{
	const unsigned int desc = 1 << txq_ctrl->txq.elts_n;
	struct mlx5_priv *priv = txq_ctrl->priv;
	unsigned int wqe_size;
	wqe_size = priv->sh->device_attr.max_qp_wr / desc;
	if (!wqe_size)
		return 0;
	wqe_size = wqe_size * MLX5_WQE_SIZE -
		   MLX5_WQE_CSEG_SIZE -
		   MLX5_WQE_ESEG_SIZE -
		   MLX5_WSEG_SIZE -
		   MLX5_WSEG_SIZE +
		   MLX5_DSEG_MIN_INLINE_SIZE;
	return wqe_size;
}
static unsigned int txq_calc_inline_max ( struct mlx5_txq_ctrl * txq_ctrl ) { const unsigned int desc = 1 << txq_ctrl -> txq . elts_n ; struct mlx5_priv * priv = txq_ctrl -> priv ; unsigned int wqe_size ; wqe_size = priv -> sh -> device_attr . max_qp_wr / desc ; if ( ! wqe_size ) return 0 ; wqe_size = wqe_size * MLX5_WQE_SIZE - MLX5_WQE_CSEG_SIZE - MLX5_WQE_ESEG_SIZE - MLX5_WSEG_SIZE - MLX5_WSEG_SIZE + MLX5_DSEG_MIN_INLINE_SIZE ; return wqe_size ; }
Calculate the maximal inline data size for Tx queue.
Calculate the maximal inline data size for Tx queue .
/*
	 * This calculation is derived from tthe source of
	 * mlx5_calc_send_wqe() in rdma_core library.
	 */