DPDK patches and discussions
 help / color / mirror / Atom feed
From: Moon-Sang Lee <sang0627@gmail.com>
To: dev@dpdk.org
Subject: [dpdk-dev] rte_prefetch0() is effective?
Date: Thu, 24 Dec 2015 15:35:14 +0900	[thread overview]
Message-ID: <CAACK=Xe4HtqjmOkuscbpWGs2NzPQjEmsUxvhhLih5cX1d5MXSQ@mail.gmail.com> (raw)

I see codes as below in example directory, and I wonder it is effective.
Coherent IO is adopted to modern architectures,
so I think that DMA initiation by rte_eth_rx_burst() might already fulfills
cache lines of RX buffers.
Do I really need to call rte_prefetchX()?

            nb_rx = rte_eth_rx_burst(portid, queueid, pkts_burst,
MAX_PKT_BURST);
            ...
            /* Prefetch and forward already prefetched packets */
            for (j = 0; j < (nb_rx - PREFETCH_OFFSET); j++) {
                rte_prefetch0(rte_pktmbuf_mtod(pkts_burst[
                        j + PREFETCH_OFFSET], void *));
                l3fwd_simple_forward(pkts_burst[j], portid,
                    qconf);
            }


-- 
Moon-Sang Lee, SW Engineer
Email: sang0627@gmail.com
Wisdom begins in wonder. *Socrates*

             reply	other threads:[~2015-12-24  6:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-24  6:35 Moon-Sang Lee [this message]
2016-01-13 11:34 ` Bruce Richardson
2016-01-13 15:17   ` Polehn, Mike A
2016-01-13 17:29   ` Matthew Hall

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='CAACK=Xe4HtqjmOkuscbpWGs2NzPQjEmsUxvhhLih5cX1d5MXSQ@mail.gmail.com' \
    --to=sang0627@gmail.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).