From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f43.google.com (mail-wm0-f43.google.com [74.125.82.43]) by dpdk.org (Postfix) with ESMTP id ACDC52C4B for ; Wed, 6 Apr 2016 18:13:47 +0200 (CEST) Received: by mail-wm0-f43.google.com with SMTP id n3so70143842wmn.0 for ; Wed, 06 Apr 2016 09:13:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:organization:user-agent :in-reply-to:references:mime-version:content-transfer-encoding; bh=VKoEeUzm1X3yJZwcy2+oY2guGOw0ekLgd4/4S2g0hEY=; b=hf7y4BmYkiOP66nOj/Wa3rdmT9uttxMiwREhISH+Xbza8UE2aJz9Q3Y3Tv+5plSQsO wm2oLmV6A+nCRPqRYO8NSFgaQNYUmNkQG7dWPYQiDd0Ntsk3kR3n+lVv8ZyFcjoBgNXM b6pLADgW85988oHSZr7z7oldddEeOZd3EAqNJnV6moFbSEYZ+hF7+wAxwiuvGbiTNwjb JWsSFXOQ0slk83Kai6UUtDEjhlIb/ge97ET2jfa3tEmQdLCyJYzTv/KiDfG3F5QYk3nv 0usj5AxSkBWa1FEGIjPSfdi4LUism+AnhZVaAW01BkP7/0YGQ39dw5Fu3rTgpJKJedUZ pfXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding; bh=VKoEeUzm1X3yJZwcy2+oY2guGOw0ekLgd4/4S2g0hEY=; b=e6e25DjwqTDNY9hOeIdoNW+Ku01Hzy6zZewijlE56FzStrt0l7vvuKXSqu7F8tuS3E Avlgy3X21jrYrRChOfm3MqREkwagccUcZh9ql/uPwOw/XC6LeJNdjmWlWxglpvmEsaIn a6/3a31BvtbzY7yBpeWjcKqnoOSwZrFKhl2B9eEweAsnD7mDGajFjjasntQAnmLkFvHx D/YzPRZStcH79DYdTG9Z0vRe+LdQp1Iw3wE+tFozoxNFQhTKWR3hy55haBh3BrVy284R mqWOPwfwLlHGIrlRrqIHtLg5ovBtrxp7QLZ9yUEwU/XA3G6p5NtYeI21JIImmNYJmgEX 6l+A== X-Gm-Message-State: AD7BkJLHl2dgrkv0Dx+tDaKiEtIRzEyQf1E9OMjPeIfmKafiRqn7Ei1CB3XkXv8XI9kdGqhK X-Received: by 10.28.188.197 with SMTP id m188mr3707956wmf.92.1459959226517; Wed, 06 Apr 2016 09:13:46 -0700 (PDT) Received: from xps13.localnet (91.111.75.86.rev.sfr.net. [86.75.111.91]) by smtp.gmail.com with ESMTPSA id js8sm3945935wjc.37.2016.04.06.09.13.45 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 06 Apr 2016 09:13:45 -0700 (PDT) From: Thomas Monjalon To: Yuanhan Liu Cc: dev@dpdk.org, "Loftus, Ciara" , Tetsuya Mukawa , "Tan, Jianfeng" Date: Wed, 06 Apr 2016 18:12:07 +0200 Message-ID: <4916622.WtR9CiyO17@xps13> Organization: 6WIND User-Agent: KMail/4.14.10 (Linux/4.1.6-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: <20160406160946.GZ3080@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> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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:13:47 -0000 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?