From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 31ED52986 for ; Wed, 17 May 2017 16:30:01 +0200 (CEST) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 May 2017 07:30:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.38,354,1491289200"; d="scan'208";a="88392877" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.237.220.81]) ([10.237.220.81]) by orsmga004.jf.intel.com with ESMTP; 17 May 2017 07:29:59 -0700 To: "Dai, Wei" , "Richardson, Bruce" , "Mcnamara, John" Cc: "dev@dpdk.org" References: <1495028996-55146-1-git-send-email-wei.dai@intel.com> <38f197ad-dc34-81a0-7a8b-fc6e2778bb56@intel.com> <49759EB36A64CF4892C1AFEC9231E8D650A7FA1E@PGSMSX106.gar.corp.intel.com> From: Ferruh Yigit Message-ID: <8b1149cf-17df-39ef-04c5-92d5bc542ce8@intel.com> Date: Wed, 17 May 2017 15:29:58 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: <49759EB36A64CF4892C1AFEC9231E8D650A7FA1E@PGSMSX106.gar.corp.intel.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] examples/helloworld: add output of core id and socket id 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: Wed, 17 May 2017 14:30:02 -0000 On 5/17/2017 3:29 PM, Dai, Wei wrote: >> -----Original Message----- >> From: Yigit, Ferruh >> Sent: Wednesday, May 17, 2017 10:16 PM >> To: Dai, Wei ; Richardson, Bruce >> ; Mcnamara, John >> Cc: dev@dpdk.org >> Subject: Re: [dpdk-dev] [PATCH] examples/helloworld: add output of core id and >> socket id >> >> On 5/17/2017 2:49 PM, Wei Dai wrote: >>> Adding output of core id and socket id of each lcore/pthread can help >>> to understand their relationship. >>> And this can also help to examine the usage of the EAL lcore settings >>> like -c, -l and --lcore . >>> >>> Signed-off-by: Wei Dai >>> --- >>> examples/helloworld/main.c | 4 +++- >>> 1 file changed, 3 insertions(+), 1 deletion(-) >>> >>> diff --git a/examples/helloworld/main.c b/examples/helloworld/main.c >>> index 8b7a2de..fdd8818 100644 >>> --- a/examples/helloworld/main.c >>> +++ b/examples/helloworld/main.c >>> @@ -50,7 +50,9 @@ lcore_hello(__attribute__((unused)) void *arg) { >>> unsigned lcore_id; >>> lcore_id = rte_lcore_id(); >>> - printf("hello from core %u\n", lcore_id); >>> + printf("hello from core %2u at core_id = %2u on socket_id = %2u\n", >> >> It is hard to understand difference from "core" and "core_id", what do you >> think using "lcore" and "core" respectively in the message? > Yes, it is still a bit confused. > I should change it to printf("hello from lcore_id = %2u at core_id = %2u on socket_id = %2u\n", +1 > >> >>> + lcore_id, lcore_config[lcore_id].core_id, >>> + lcore_config[lcore_id].socket_id); >>> return 0; >>> } >>> >>> >