i40e: prefetch next mbuf in Rx init loop
This patch improves performance of Rx with i40e devices. Signed-off-by: Damjan Marion <damarion@cisco.com> Acked-by: Helin Zhang <helin.zhang@intel.com> [Thomas: apply Helin's comments]
This commit is contained in:
parent
7eda588164
commit
b91fe0f7ad
@ -813,6 +813,10 @@ i40e_rx_alloc_bufs(struct i40e_rx_queue *rxq)
|
||||
|
||||
rxdp = &rxq->rx_ring[alloc_idx];
|
||||
for (i = 0; i < rxq->rx_free_thresh; i++) {
|
||||
if (likely(i < (rxq->rx_free_thresh - 1)))
|
||||
/* Prefetch next mbuf */
|
||||
rte_prefetch0(rxep[i + 1].mbuf);
|
||||
|
||||
mb = rxep[i].mbuf;
|
||||
rte_mbuf_refcnt_set(mb, 1);
|
||||
mb->next = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user