From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id AF2D68E85 for ; Thu, 21 Jan 2016 02:57:48 +0100 (CET) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga102.fm.intel.com with ESMTP; 20 Jan 2016 17:57:48 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,323,1449561600"; d="scan'208";a="637520155" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by FMSMGA003.fm.intel.com with ESMTP; 20 Jan 2016 17:57:48 -0800 Received: from fmsmsx156.amr.corp.intel.com (10.18.116.74) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 20 Jan 2016 17:57:47 -0800 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by fmsmsx156.amr.corp.intel.com (10.18.116.74) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 20 Jan 2016 17:57:47 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.215]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.209]) with mapi id 14.03.0248.002; Thu, 21 Jan 2016 09:57:45 +0800 From: "Xie, Huawei" To: "Tan, Jianfeng" Thread-Topic: [PATCH 1/4] mem: add --single-file to create single mem-backed file Thread-Index: AdFT7x6jYQE4FXFvS5mPMzzlG+08zg== Date: Thu, 21 Jan 2016 01:57:45 +0000 Message-ID: References: <1446748276-132087-1-git-send-email-jianfeng.tan@intel.com> <1452426182-86851-1-git-send-email-jianfeng.tan@intel.com> <1452426182-86851-2-git-send-email-jianfeng.tan@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "nakajima.yoshihiro@lab.ntt.co.jp" , "mst@redhat.com" , "dev@dpdk.org" , "ann.zhuangyanying@huawei.com" Subject: Re: [dpdk-dev] [PATCH 1/4] mem: add --single-file to create single mem-backed file 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: Thu, 21 Jan 2016 01:57:49 -0000 On 1/11/2016 2:43 AM, Tan, Jianfeng wrote:=0A= [snip]=0A= > +#include =0A= > +#include =0A= > +#include =0A= > +#include =0A= =0A= Please remove unreferenced header files.=0A= =0A= > =0A= > #include =0A= > #include =0A= > @@ -92,6 +96,9 @@=0A= > #include =0A= > #include =0A= > =0A= > +#define _GNU_SOURCE=0A= > +#include =0A= > +=0A= > #include "eal_private.h"=0A= =0A= [snip]=0A= =0A= > + char filepath[MAX_HUGEPAGE_PATH];=0A= > +=0A= > + syscall(SYS_getcpu, NULL, &socket_id, NULL);=0A= > +=0A= =0A= [snip]=0A= =0A= > mcfg->memseg[0].addr =3D addr;=0A= > - mcfg->memseg[0].hugepage_sz =3D RTE_PGSIZE_4K;=0A= > + mcfg->memseg[0].hugepage_sz =3D pagesize;=0A= > mcfg->memseg[0].len =3D internal_config.memory;=0A= > - mcfg->memseg[0].socket_id =3D 0;=0A= > + mcfg->memseg[0].socket_id =3D socket_id;=0A= =0A= Anyway the socket_id here doesn't make sense. We could remove the=0A= syscall which relies on _GNU_SOURCE.=0A=