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 1DDD92C53 for ; Wed, 6 Apr 2016 18:41:43 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga102.jf.intel.com with ESMTP; 06 Apr 2016 09:41:27 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,447,1455004800"; d="scan'208";a="681843933" Received: from yliu-dev.sh.intel.com (HELO yliu-dev) ([10.239.67.191]) by FMSMGA003.fm.intel.com with ESMTP; 06 Apr 2016 09:41:26 -0700 Date: Thu, 7 Apr 2016 00:43:09 +0800 From: Yuanhan Liu To: Thomas Monjalon Cc: dev@dpdk.org, "Loftus, Ciara" , Tetsuya Mukawa , "Tan, Jianfeng" Message-ID: <20160406164309.GA3080@yliu-dev.sh.intel.com> References: <1459872587-11655-1-git-send-email-ciara.loftus@intel.com> <74F120C019F4A64C9B78E802F6AD4CC24F861D10@IRSMSX106.ger.corp.intel.com> <20160406160946.GZ3080@yliu-dev.sh.intel.com> <4916622.WtR9CiyO17@xps13> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4916622.WtR9CiyO17@xps13> User-Agent: Mutt/1.5.23 (2014-03-12) Subject: Re: [dpdk-dev] [PATCH] vhost: Fix retrieval of numa information in PMD 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: Wed, 06 Apr 2016 16:41:44 -0000 On Wed, Apr 06, 2016 at 06:12:07PM +0200, Thomas Monjalon wrote: > 2016-04-07 00:09, Yuanhan Liu: > > On Wed, Apr 06, 2016 at 09:37:53AM +0000, Loftus, Ciara wrote: > > > > On Wed, Apr 06, 2016 at 03:49:25PM +0900, Tetsuya Mukawa wrote: > > > > > Hi, > > > > > > > > > > I appreciate fixing it. > > > > > Just one worry is that state changed event may be occurred before new > > > > > device event. > > > > > The users should not call rte_eth_dev_socket_id() until new device event > > > > > comes, even if they catch queue state events. > > > > > Otherwise, they will get wrong socket id to call > > > > > rte_eth_rx/tx_queue_setup(). > > > > > > > > There is no way to guarantee that the socket id stuff would work > > > > perfectly in vhost, right? I mean, it's likely that virtio device > > > > would allocate memory from 2 or more sockets. > > > > > > > > So, it doesn't matter too much whether it's set perfectly right > > > > or not. Instead, we should assign it with a saner value instead > > > > of a obvious wrong one when new_device() is not invoked yet. So, > > > > I'd suggest to make an assignment first based on vhost_dev (or > > > > whatever) struct, and then make it "right" at new_device() > > > > callback? > > > > > > Thanks for the feedback. > > > At the moment with this patch numa_node is initially set to rte_socket_id() during pmd init and then updated to the correct value during new_device. > > > Are you suggesting we set it again in between these two steps ("based on vhost_dev")? If so where do you think would be a good place? > > > > Oh, I was not aware of that. Then I think we are fine here. > > Please Yuanhan, could you be more explicit? Oh, sorry, I made a reply at wrong place. My reply was against to following statement: > At the moment with this patch numa_node is initially set to > rte_socket_id() during pmd init and then updated to the correct > value during new_device. So, we don't need do another numa_node inital assignment. Put simply, this patch is fine. --yliu