> -----Original Message----- > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Damjan Marion > Sent: Wednesday, June 10, 2015 3:19 PM > To: dev at dpdk.org > Cc: Damjan Marion > Subject: [dpdk-dev] [PATCH] i40e: prefetch next mbuf in rx alloc code > > This patch improves performance of vectored rx on i40e devices. > > Signed-off-by: Damjan Marion <damarion at cisco.com> Acked-by: Helin Zhang <helin.zhang at intel.com> with minor change requests.
1. commit log should be reworded. 2. likely should be added to the newly added if() line. 3. checkpatch.pl should be used to have a check. > --- > drivers/net/i40e/i40e_rxtx.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c index > 2de0ac4..152e9e6 100644 > --- a/drivers/net/i40e/i40e_rxtx.c > +++ b/drivers/net/i40e/i40e_rxtx.c > @@ -778,6 +778,11 @@ i40e_rx_alloc_bufs(struct i40e_rx_queue *rxq) > > rxdp = &rxq->rx_ring[alloc_idx]; > for (i = 0; i < rxq->rx_free_thresh; i++) { > + > + /* Prefetch next mbuf */ > + if (i < (rxq->rx_free_thresh - 1)) > + rte_prefetch0 (rxep[i+1].mbuf); > + > mb = rxep[i].mbuf; > rte_mbuf_refcnt_set(mb, 1); > mb->next = NULL; > -- > 2.1.4