DPDK patches and discussions
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: "Jack,Xie Jie" <jack.xie@dragonipt.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] how does it count the number of contiguous physical pages in map_all_hugepages
Date: Fri, 16 Jan 2015 11:01:06 +0000	[thread overview]
Message-ID: <20150116110105.GC10516@bricha3-MOBL3> (raw)
In-Reply-To: <25CC404E73236E4FB06CE423D5EE8B229B4F34@AZ10EXMBX22.hosting.local>

On Fri, Jan 16, 2015 at 05:32:08AM +0000, Jack,Xie Jie wrote:
> Hi,
> 
> I am learning DPDK recently, when I check l2fwd example, I am a little confused, please someone give me a clue.
> 
> In function map_all_hugepages called in rte_eal_hugepage_init,
> There are lines of source code like below to count the number of contiguous physical pages,
> But I check the source code, I just cannot find where is hugepg_tbl[j].physaddr be set before,
> how can here check the value of hugepg_tbl[j].physaddr.
> 
> /* reserve a virtual area for next contiguous
>                             * physical block: count the number of
>                             * contiguous physical pages. */
>                             for (j = i+1; j < hpi->num_pages[0] ; j++) {
>                                      if (hugepg_tbl[j].physaddr !=
>                                          hugepg_tbl[j-1].physaddr + hugepage_sz)
>                                                break;
>                             }
> 
> 
> Thanks !
> Jack

See function "find_physaddrs" in "eal_memory.c".

Regards,
/Bruce

      reply	other threads:[~2015-01-16 11:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-16  5:32 Jack,Xie Jie
2015-01-16 11:01 ` Bruce Richardson [this message]

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=20150116110105.GC10516@bricha3-MOBL3 \
    --to=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=jack.xie@dragonipt.com \
    /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).