From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id A1BA34BE1 for ; Wed, 21 Jun 2017 13:33:55 +0200 (CEST) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Jun 2017 04:33:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.39,368,1493708400"; d="scan'208";a="117023981" Received: from irsmsx153.ger.corp.intel.com ([163.33.192.75]) by fmsmga005.fm.intel.com with ESMTP; 21 Jun 2017 04:33:53 -0700 Received: from irsmsx108.ger.corp.intel.com ([169.254.11.133]) by IRSMSX153.ger.corp.intel.com ([169.254.9.74]) with mapi id 14.03.0319.002; Wed, 21 Jun 2017 12:33:53 +0100 From: "De Lara Guarch, Pablo" To: "thomas@monjalon.net" , "Doherty, Declan" CC: "dev@dpdk.org" Thread-Topic: [PATCH 0/5] eal: check socket memory Thread-Index: AQHS6l+tc/WKB0eDy06Pvh2xMmnQy6IvKnbg Date: Wed, 21 Jun 2017 11:33:52 +0000 Message-ID: References: <20170620232555.82244-1-pablo.de.lara.guarch@intel.com> In-Reply-To: <20170620232555.82244-1-pablo.de.lara.guarch@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 10.0.102.7 dlp-reaction: no-action x-originating-ip: [163.33.239.181] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH 0/5] eal: check socket 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: Wed, 21 Jun 2017 11:33:57 -0000 > -----Original Message----- > From: De Lara Guarch, Pablo > Sent: Wednesday, June 21, 2017 12:26 AM > To: thomas@monjalon.net; Doherty, Declan > Cc: dev@dpdk.org; De Lara Guarch, Pablo > Subject: [PATCH 0/5] eal: check socket memory >=20 > Several drivers, libraries and apps check if a socket has reserved memory= , by > implementing their own function, which returns the total number of socket= s that > have memory. >=20 > First of all, this function is not completely correct, as it really retur= ns the highest > socket id that has memory. > So, if all the sockets up to that one has memory, then it really returns = the total > number of sockets with memory, but it there is at least one in the middle > without memory, then total number of sockets should be less than the valu= e > returned. >=20 > Besides, this function is not really useful, as the main goal is to check= if memory > on a specific socket is available, rather than checking if a socket id is= beyond the > total number of sockets. >=20 > Therefore, it looks more useful to have a function in EAL that returns if= a socket > has memory reserved, which can be used in these files. Looking at this again, probably having this check is not necessary, as this will be checked when attempting to allocate the memory. Will send a v2, to remove the check completely.