From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-vk0-f50.google.com (mail-vk0-f50.google.com [209.85.213.50]) by dpdk.org (Postfix) with ESMTP id D4DE2C2E6 for ; Wed, 8 Jun 2016 23:51:34 +0200 (CEST) Received: by mail-vk0-f50.google.com with SMTP id d64so30505704vkb.0 for ; Wed, 08 Jun 2016 14:51:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bigswitch-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=ndq+2jums9DlEpSjGRGO9nQ+e4kh+W8wyQXwjohZO0I=; b=OMS8GogPkg+Jyp16SbW9xSY+OEf+/X+Mu8MBDaGU2sFB0naFsdn3SMFQg1qGGFHoPj E5nKLOgBW7ZG4+ppihxGVhafRVY6VBjCGmVixOyqE0rY7coirUCwfpb5o0XhRZSu3kVz aZJKhDduzjJ+6tEEw9/beCz4wI0KqMgGE20U7P1h3yHrizm14nRU9oXIvOWjHiBuVzBw QNtx/WtuVQwdDtVdQWoIbxlmCIZlAZUAHhR+/gyC9+3+wUZXd2emVxG5BmflURbExALy mGLXXAmIQmRG/41qiAYtk3txQLUPwAj2yVKsPVmuorZ/luf3Th14+Hz4URUGg790Jcv7 Kd4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=ndq+2jums9DlEpSjGRGO9nQ+e4kh+W8wyQXwjohZO0I=; b=ZtJmRs+VgfkjYsTxbus2Ks3ps9WB7xicLLvbAZwp+EpMflxBasB94vVQarMWdMykQu +XBnen1K5Dnc089zAyAsQD7Ej+u15deKy56F8RZ933W4KRCsY22thMee0GTsj/zR8bJR WCtf+CY3zjlxQ0X9sumQZ9ptmcR+I6kGCff/Y+YRqMjKrhtx3gGwt1pI8kBrHbQpYQ9u clomCB5w4ei7X3TgpL9wC4NVSb6GAcfT+dRocypbHOwIZOZAUMX8hbB/cWkquUd81/Wv khJC2qLg1aOMO+kxq/1aC/KYiXGXTgWeZ3rm0baJmlzD91xDkG8NIErcWlhrXegh4uw6 njOA== X-Gm-Message-State: ALyK8tLLQTvy7NZ56nvt90l9zmt1cnuIenxXVh5Gs7cSAt3ffpjXwjopuI2ut/mBqaG0dkFbLr+bE2cerK8s/Sw+ X-Received: by 10.176.64.98 with SMTP id h89mr2882780uad.89.1465422694387; Wed, 08 Jun 2016 14:51:34 -0700 (PDT) MIME-Version: 1.0 Received: by 10.31.190.14 with HTTP; Wed, 8 Jun 2016 14:51:33 -0700 (PDT) In-Reply-To: <1465271530-27878-9-git-send-email-yuanhan.liu@linux.intel.com> References: <1463117111-27050-1-git-send-email-yuanhan.liu@linux.intel.com> <1465271530-27878-1-git-send-email-yuanhan.liu@linux.intel.com> <1465271530-27878-9-git-send-email-yuanhan.liu@linux.intel.com> From: Rich Lane Date: Wed, 8 Jun 2016 14:51:33 -0700 Message-ID: To: Yuanhan Liu Cc: dev@dpdk.org, "huawei.xie" , Thomas Monjalon , Panu Matilainen , Traynor Kevin , Tetsuya Mukawa Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH v3 08/20] vhost: introduce new API to export 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: Wed, 08 Jun 2016 21:51:35 -0000 On Mon, Jun 6, 2016 at 8:51 PM, Yuanhan Liu wrote: > > @@ -248,14 +248,9 @@ new_device(struct virtio_net *dev) > internal = eth_dev->data->dev_private; > > #ifdef RTE_LIBRTE_VHOST_NUMA > - ret = get_mempolicy(&newnode, NULL, 0, dev, > - MPOL_F_NODE | MPOL_F_ADDR); > - if (ret < 0) { > - RTE_LOG(ERR, PMD, "Unknown numa node\n"); > - return -1; > - } > - > - eth_dev->data->numa_node = newnode; > + newnode = rte_vhost_get_numa_node(dev->vid); > + if (newnode > 0) > Should be "newnode >= 0". + eth_dev->data->numa_node = newnode; > #endif >