From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.mhcomputing.net (master.mhcomputing.net [74.208.46.186]) by dpdk.org (Postfix) with ESMTP id 820D32E8F for ; Mon, 3 Aug 2015 07:04:58 +0200 (CEST) Received: by mail.mhcomputing.net (Postfix, from userid 1000) id 513B180A0A6; Sun, 2 Aug 2015 22:04:41 -0700 (PDT) Date: Sun, 2 Aug 2015 22:04:41 -0700 From: Matthew Hall To: "Liang, Cunming" Message-ID: <20150803050441.GA8325@mhcomputing.net> References: <1438306572-25434-1-git-send-email-cunming.liang@intel.com> <20150801035655.GA29805@mhcomputing.net> <55BEC80E.5010309@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <55BEC80E.5010309@intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH] eal/linux: fix negative value for undetermined numa_node 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: Mon, 03 Aug 2015 05:04:58 -0000 On Mon, Aug 03, 2015 at 09:46:54AM +0800, Liang, Cunming wrote: > According to the API definition, if the socket could not be determined, a > default of zero will take. > The '-1' is returned when the port_id value is out of range. Yes, but when I asked the exact same question and was told the documentation was wrong not the -1 return value. > To your concern, "difference between no NUMA, something running on socket > zero, and something with multiple sockets.". > The latter two belongs to the same situation, that is the numa_node stores > the NUMA id. > So in fact the concern is about using '-1' or '0' when there's no NUMA > detect. > If we won't plan to redefine the API return value, the fix patch is > reasonable. > > Btw, if it returns '-1' when no NUMA is detected, what will you do, do > condition check '-1' and then use node 0 instead ? > In that way, you can't distinguish '-'1 is out of range port_id error or no > NUMA detection error. I asked that question also, and the answer I got was to use node 0 instead. > If it is, why not follow the API definition. Sure, if nobody objects like the last time I asked. But this will change the user behavior as I am looking for the -1 now. > /Steve Matthew.