net/mlx5: remove inefficient prefetching
Prefetching completion queue entries is inefficient because too few CPU cycles are spent before their use, which results into cache misses anyway. Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com> Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
This commit is contained in:
parent
eef822dd73
commit
0f3f22298e
@ -345,23 +345,6 @@ mlx5_tx_dbrec(struct txq *txq)
|
||||
txq->bf_offset ^= (1 << txq->bf_buf_size);
|
||||
}
|
||||
|
||||
/**
|
||||
* Prefetch a CQE.
|
||||
*
|
||||
* @param txq
|
||||
* Pointer to TX queue structure.
|
||||
* @param cqe_ci
|
||||
* CQE consumer index.
|
||||
*/
|
||||
static inline void
|
||||
tx_prefetch_cqe(struct txq *txq, uint16_t ci)
|
||||
{
|
||||
volatile struct mlx5_cqe *cqe;
|
||||
|
||||
cqe = &(*txq->cqes)[ci & ((1 << txq->cqe_n) - 1)];
|
||||
rte_prefetch0(cqe);
|
||||
}
|
||||
|
||||
/**
|
||||
* DPDK callback for TX.
|
||||
*
|
||||
@ -393,8 +376,6 @@ mlx5_tx_burst(void *dpdk_txq, struct rte_mbuf **pkts, uint16_t pkts_n)
|
||||
if (unlikely(!pkts_n))
|
||||
return 0;
|
||||
/* Prefetch first packet cacheline. */
|
||||
tx_prefetch_cqe(txq, txq->cq_ci);
|
||||
tx_prefetch_cqe(txq, txq->cq_ci + 1);
|
||||
rte_prefetch0(*pkts);
|
||||
/* Start processing. */
|
||||
txq_complete(txq);
|
||||
@ -732,7 +713,6 @@ mlx5_tx_burst_mpw(void *dpdk_txq, struct rte_mbuf **pkts, uint16_t pkts_n)
|
||||
if (unlikely(!pkts_n))
|
||||
return 0;
|
||||
/* Prefetch first packet cacheline. */
|
||||
tx_prefetch_cqe(txq, txq->cq_ci);
|
||||
rte_prefetch0(tx_mlx5_wqe(txq, txq->wqe_ci));
|
||||
rte_prefetch0(tx_mlx5_wqe(txq, txq->wqe_ci + 1));
|
||||
/* Start processing. */
|
||||
@ -937,7 +917,6 @@ mlx5_tx_burst_mpw_inline(void *dpdk_txq, struct rte_mbuf **pkts,
|
||||
if (unlikely(!pkts_n))
|
||||
return 0;
|
||||
/* Prefetch first packet cacheline. */
|
||||
tx_prefetch_cqe(txq, txq->cq_ci);
|
||||
rte_prefetch0(tx_mlx5_wqe(txq, txq->wqe_ci));
|
||||
rte_prefetch0(tx_mlx5_wqe(txq, txq->wqe_ci + 1));
|
||||
/* Start processing. */
|
||||
|
Loading…
x
Reference in New Issue
Block a user