From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id 4658E1B398 for ; Mon, 1 Oct 2018 17:24:05 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Oct 2018 08:24:04 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,328,1534834800"; d="scan'208";a="84833800" Received: from aburakov-mobl1.ger.corp.intel.com (HELO [10.252.22.216]) ([10.252.22.216]) by FMSMGA003.fm.intel.com with ESMTP; 01 Oct 2018 08:23:59 -0700 To: "Iremonger, Bernard" , "dev@dpdk.org" Cc: "Lu, Wenzhuo" , "Wu, Jingjing" , "Mcnamara, John" , "Kovacevic, Marko" , "laszlo.madarassy@ericsson.com" , "laszlo.vadkerti@ericsson.com" , "andras.kovacs@ericsson.com" , "winnie.tian@ericsson.com" , "daniel.andrasi@ericsson.com" , "janos.kobor@ericsson.com" , "geza.koblo@ericsson.com" , "srinath.mannam@broadcom.com" , "scott.branden@broadcom.com" , "ajit.khaparde@broadcom.com" , "Wiles, Keith" , "Richardson, Bruce" , "thomas@monjalon.net" , "shreyansh.jain@nxp.com" , "shahafs@mellanox.com" , "arybchenko@solarflare.com" , "alejandro.lucero@netronome.com" References: <0cc680abd5142a988dba892e9539cc980fc5ec6f.1538398379.git.anatoly.burakov@intel.com> <8CEF83825BEC744B83065625E567D7C260D0B117@IRSMSX107.ger.corp.intel.com> From: "Burakov, Anatoly" Message-ID: Date: Mon, 1 Oct 2018 16:23:57 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <8CEF83825BEC744B83065625E567D7C260D0B117@IRSMSX107.ger.corp.intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v8 19/21] app/testpmd: add support for external memory X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Oct 2018 15:24:05 -0000 Hi Bernard, Thanks for your review! Comments inline. >> + rte_exit(EXIT_FAILURE, >> + "mp-alloc %s invalid - must be: >> " >> + "native, anon or xmem\n", > > Should xmemhuge be added to above line? > Yes :) >> + optarg); >> } >> if (!strcmp(lgopts[opt_idx].name, "port-numa-config")) >> { >> if (parse_portnuma_config(optarg)) >> diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index >> 001f0e552..255a9c664 100644 >> --- a/app/test-pmd/testpmd.c >> +++ b/app/test-pmd/testpmd.c >> @@ -27,6 +27,7 @@ >> #include >> #include >> +static int >> +pagesz_flags(uint64_t page_sz) >> +{ >> + /* as per mmap() manpage, all page sizes are log2 of page size >> + * shifted by MAP_HUGE_SHIFT >> + */ >> + int log2 = log2_u64(page_sz); > > Missing blank line after declarations. > Thanks, will fix. >> + return (log2 << HUGE_SHIFT); >> +} >> + >> +static void * >> +alloc_mem(size_t memsz, size_t pgsz, bool huge) { >> + void *addr; >> + int flags; >> + >> + /* allocate anon >> -- >> 2.17.1 > > The following checkpatch warnings is testpmd.c should probably be fixed. > > WARNING: line over 80 characters > #332: FILE: app/test-pmd/testpmd.c:685: > + TESTPMD_LOG(ERR, "Cannot allocate memory for iova addresses\n"); > > WARNING: line over 80 characters > #441: FILE: app/test-pmd/testpmd.c:798: > + TESTPMD_LOG(INFO, "preferred mempool ops selected: %s\n", > > WARNING: line over 80 characters > #476: FILE: app/test-pmd/testpmd.c:829: > + rte_exit(EXIT_FAILURE, "Could not create external memory\n"); > > WARNING: line over 80 characters > #481: FILE: app/test-pmd/testpmd.c:834: > + rte_exit(EXIT_FAILURE, "Could not get external memory socket ID\n"); > > WARNING: line over 80 characters > #483: FILE: app/test-pmd/testpmd.c:836: > + TESTPMD_LOG(INFO, "preferred mempool ops selected: %s\n", > > WARNING: line over 80 characters > #492: FILE: app/test-pmd/testpmd.c:845: > + rte_exit(EXIT_FAILURE, "Invalid mempool creation mode\n"); > > Regards, > > Bernard. > > These should be ignored (and they indeed are ignored by DPDK's own checkpatch script). Strings are allowed to go over 80 characters so as to not make it hard to grep for them. -- Thanks, Anatoly