From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f177.google.com (mail-pf0-f177.google.com [209.85.192.177]) by dpdk.org (Postfix) with ESMTP id D39122C38 for ; Wed, 6 Apr 2016 08:49:28 +0200 (CEST) Received: by mail-pf0-f177.google.com with SMTP id n1so27389709pfn.2 for ; Tue, 05 Apr 2016 23:49:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=igel-co-jp.20150623.gappssmtp.com; s=20150623; h=subject:to:references:from:cc:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=hUY5KHIRYnF9DP0nulWE8USb8VQCL6JGoVciQyZFYRc=; b=qtjFwsTixM/b3tNbTxH6W09cCYtDltbOOLSiLy+DSptFLp9C4OPNOnpQ0h89K9LvMW eIr0eCKd9eQP+o5ET2dGQAuPMqssKbHkQkpSf4a1idY2M+4RAvBgpjBPtsV+ZIfyzDG7 mDG/fL74R6E7l9sEnXSQR0hofFF2XQQH3WxskSYURkctH8afGZB2P8yp8j9CQAsdJOHt ScKQdKkgZu+IPSDLLOMmBM++3a/k7CLEfZ7dFGms+NGE5tkXs68AQKSdKQW9qGcKkS8y tDJckfUK0MLDV2GRx1FIl3h8hKDd3fSxA9jiP8lv7rVCSLbJJ2eUtieuVL5/haiJFuTJ ejkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:cc:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=hUY5KHIRYnF9DP0nulWE8USb8VQCL6JGoVciQyZFYRc=; b=UPqHVGjlsFoUoWQkAckyojEtl7RrmxI5JsuhzxWMFE0mc+Rm8XOOiiXQ+9F+Mzov0Q 3+OD//qrlEdntASXcFhQhEsSX4W9ZAqkcqPPbC+pr9/tRw2Dky3CETy2ugEBxs73hT59 gv0PA7G5jGyTgWqfoeOtv5RYIFsTwd7Q/YzkLHQy5wLVjiKQW/fo/N9eV3+m4bvvZiFX aT2meXkDAkzsku+sby3oE4A6/X+mIkLHGzg3eqmhr+6TPKBK74YS8rzt5NCm/B1J8dxy WPlVPA+6bxrdRg3ZItlADROQZgGrSGVhQisfnb1JhHd/sXQYeVXumsOzmzUWkRguPGtp cn6g== X-Gm-Message-State: AD7BkJLBEv8RRoYE3ew29TNJLkwn7UsgLIb8oDLuRgJolzUQSbKQ4GgP9TGU9LYyu9VBvg== X-Received: by 10.98.14.147 with SMTP id 19mr35857650pfo.79.1459925368145; Tue, 05 Apr 2016 23:49:28 -0700 (PDT) Received: from [10.16.129.101] (napt.igel.co.jp. [219.106.231.132]) by smtp.googlemail.com with ESMTPSA id x18sm2100585pfi.42.2016.04.05.23.49.25 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 05 Apr 2016 23:49:27 -0700 (PDT) To: Ciara Loftus , dev@dpdk.org References: <1459872587-11655-1-git-send-email-ciara.loftus@intel.com> From: Tetsuya Mukawa Cc: Yuanhan Liu , "Tan, Jianfeng" Message-ID: <5704B175.3040700@igel.co.jp> Date: Wed, 6 Apr 2016 15:49:25 +0900 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <1459872587-11655-1-git-send-email-ciara.loftus@intel.com> Content-Type: text/plain; charset=iso-2022-jp Content-Transfer-Encoding: 7bit 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 06:49:29 -0000 On 2016/04/06 1:09, Ciara Loftus wrote: > After some testing, it was found that retrieving numa information > about a vhost device via a call to get_mempolicy is more > accurate when performed during the new_device callback versus > the vring_state_changed callback, in particular upon initial boot > of the VM. Performing this check during new_device is also > potentially more efficient as this callback is only triggered once > during device initialisation, compared with vring_state_changed > which may be called multiple times depending on the number of > queues assigned to the device. > > Reorganise the code to perform this check and assign the correct > socket_id to the device during the new_device callback. > > Signed-off-by: Ciara Loftus > --- > drivers/net/vhost/rte_eth_vhost.c | 28 ++++++++++++++-------------- > 1 file changed, 14 insertions(+), 14 deletions(-) > > diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c > index 4cc6bec..b1eb082 100644 > --- a/drivers/net/vhost/rte_eth_vhost.c > +++ b/drivers/net/vhost/rte_eth_vhost.c > 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(). So how about commenting it in 'rte_eth_vhost.h'? Thanks, Tetsuya