From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtpedgeout.hostedexchange.asia (smtpedgeout.hostedexchange.asia [202.134.60.164]) by dpdk.org (Postfix) with ESMTP id 65D4358F1 for ; Fri, 16 Jan 2015 06:34:23 +0100 (CET) Received: from SH10EXHUB45.hosting.local (10.20.42.235) by AZEDGEEXOUT21.EDGE.local (10.20.42.41) with Microsoft SMTP Server (TLS) id 14.1.218.12; Fri, 16 Jan 2015 13:33:16 +0800 Received: from AZ10EXMBX22.hosting.local ([fe80::dd35:dccd:e301:9562]) by SH10EXHUB45.hosting.local ([fe80::854f:30d4:bd0:246c%11]) with mapi id 14.01.0355.002; Fri, 16 Jan 2015 13:32:08 +0800 From: "Jack,Xie Jie" To: "dev@dpdk.org" Thread-Topic: [dpdk-dev]how does it count the number of contiguous physical pages in map_all_hugepages Thread-Index: AdAxTcvUPmMWzQzGT6qxwOPTzdOVSg== Date: Fri, 16 Jan 2015 05:32:08 +0000 Message-ID: <25CC404E73236E4FB06CE423D5EE8B229B4F34@AZ10EXMBX22.hosting.local> Accept-Language: en-US Content-Language: zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.20.42.250] x-puremessage: [Scanned] MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: [dpdk-dev] how does it count the number of contiguous physical pages in map_all_hugepages X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 05:37:57 -0000 Hi, I am learning DPDK recently, when I check l2fwd example, I am a little conf= used, 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].phys= addr 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 =3D i+1; j < hpi->num_pages[0] ; j++) { if (hugepg_tbl[j].physaddr !=3D hugepg_tbl[j-1].physaddr + hugepag= e_sz) break; } Thanks ! Jack