From: "Zhang, Helin" <helin.zhang@intel.com>
To: Damjan Marion <damarion@cisco.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] i40e: prefetch next mbuf in rx alloc code
Date: Fri, 10 Jul 2015 16:18:54 +0000 [thread overview]
Message-ID: <F35DEAC7BCE34641BA9FAC6BCA4A12E70A891BBB@SHSMSX104.ccr.corp.intel.com> (raw)
In-Reply-To: <1433974765-136411-1-git-send-email-damarion@cisco.com>
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Damjan Marion
> Sent: Wednesday, June 10, 2015 3:19 PM
> To: dev@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@cisco.com>
Acked-by: Helin Zhang <helin.zhang@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
next prev parent reply other threads:[~2015-07-10 16:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-10 22:19 Damjan Marion
2015-07-10 14:33 ` Thomas Monjalon
2015-07-10 15:24 ` Zhang, Helin
2015-07-10 16:18 ` Zhang, Helin [this message]
2015-07-10 17:18 ` Thomas Monjalon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=F35DEAC7BCE34641BA9FAC6BCA4A12E70A891BBB@SHSMSX104.ccr.corp.intel.com \
--to=helin.zhang@intel.com \
--cc=damarion@cisco.com \
--cc=dev@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).