From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9E4BEA0C50; Fri, 23 Jul 2021 22:07:09 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1B2B240DDA; Fri, 23 Jul 2021 22:07:09 +0200 (CEST) Received: from shelob.oktetlabs.ru (shelob.oktetlabs.ru [91.220.146.113]) by mails.dpdk.org (Postfix) with ESMTP id C277D406A3; Fri, 23 Jul 2021 22:07:07 +0200 (CEST) Received: from [192.168.100.116] (unknown [37.139.99.76]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by shelob.oktetlabs.ru (Postfix) with ESMTPSA id 226387F510; Fri, 23 Jul 2021 23:07:07 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru 226387F510 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=oktetlabs.ru; s=default; t=1627070827; bh=MIcKvpJgX5Dg/4NO+TCwXMprxGtN8yZ8SHkXReWN94Q=; h=Subject:To:Cc:References:From:Date:In-Reply-To; b=IZ+dOo3mJCtqe/Z3xmvQWElQP4Az2riUQ/FanbcbEM00fBCmLgtcxOZRG2XPujNvu 7JMRD1EI6IhbKbUbnn7Ky6kQSias9Zja/is9Do1feKQG/jqUDjn8zSH9DJon66SLR5 U5c6tJqyHQ0PwlU62yNETaVU4QZavC3IbS04oruU= To: Dmitry Kozlyuk , dev@dpdk.org Cc: stable@dpdk.org References: <20210615105156.760308-1-dkozlyuk@nvidia.com> <20210616100712.829035-1-dkozlyuk@nvidia.com> From: Andrew Rybchenko Message-ID: Date: Fri, 23 Jul 2021 23:07:06 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: <20210616100712.829035-1-dkozlyuk@nvidia.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v2] bus: clarify log for non-NUMA-aware devices X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 6/16/21 1:07 PM, Dmitry Kozlyuk wrote: > PCI and vmbus drivers printed a warning > when NUMA node had beed reported as (-1) or not reported by OS: > > EAL: Invalid NUMA socket, default to 0 > > This message and its level might confuse users, because configuration > is valid and nothing happens that requires attention or intervention. > > Reduce level to INFO, reword the message, and suppress it when there is > only one NUMA node, bacause NUMA-awareness does not matter in this case. > > Fixes: f0e0e86aa35d ("pci: move NUMA node check from scan to probe") > Fixes: 831dba47bd36 ("bus/vmbus: add Hyper-V virtual bus support") > Cc: stable@dpdk.org > > Signed-off-by: Dmitry Kozlyuk > Reviewed-by: Viacheslav Ovsiienko > Reviewed-by: Xueming Li > --- > v2: Add NUMA node count check (Stephen Hemminger). > > doc/guides/nics/ena.rst | 2 +- > drivers/bus/pci/pci_common.c | 4 ++-- > drivers/bus/vmbus/vmbus_common.c | 4 ++-- > 3 files changed, 5 insertions(+), 5 deletions(-) > > diff --git a/doc/guides/nics/ena.rst b/doc/guides/nics/ena.rst > index 0f1f63f722..694ce1da74 100644 > --- a/doc/guides/nics/ena.rst > +++ b/doc/guides/nics/ena.rst > @@ -234,7 +234,7 @@ Example output: > > [...] > EAL: PCI device 0000:00:06.0 on NUMA socket -1 > - EAL: Invalid NUMA socket, default to 0 > + EAL: Device is not NUMA-aware, defaulting socket to 0 > EAL: probe driver: 1d0f:ec20 net_ena > > Interactive-mode selected > diff --git a/drivers/bus/pci/pci_common.c b/drivers/bus/pci/pci_common.c > index 35d7d092d1..0bb56d9b7f 100644 > --- a/drivers/bus/pci/pci_common.c > +++ b/drivers/bus/pci/pci_common.c > @@ -189,8 +189,8 @@ rte_pci_probe_one_driver(struct rte_pci_driver *dr, > return 1; > } > > - if (dev->device.numa_node < 0) { > - RTE_LOG(WARNING, EAL, " Invalid NUMA socket, default to 0\n"); > + if (rte_socket_count() > 1 && dev->device.numa_node < 0) { > + RTE_LOG(INFO, EAL, " Device is not NUMA-aware, defaulting socket to 0\n"); > dev->device.numa_node = 0; Is it intended side-effect of the patch that above assignment is not done if node is negative and there is only one socket? > } > > diff --git a/drivers/bus/vmbus/vmbus_common.c b/drivers/bus/vmbus/vmbus_common.c > index d25fd14ef5..5b654b0289 100644 > --- a/drivers/bus/vmbus/vmbus_common.c > +++ b/drivers/bus/vmbus/vmbus_common.c > @@ -111,8 +111,8 @@ vmbus_probe_one_driver(struct rte_vmbus_driver *dr, > /* reference driver structure */ > dev->driver = dr; > > - if (dev->device.numa_node < 0) { > - VMBUS_LOG(WARNING, " Invalid NUMA socket, default to 0"); > + if (rte_socket_count() > 1 && dev->device.numa_node < 0) { > + VMBUS_LOG(INFO, " Device is not NUMA-aware, defaulting socket to 0\n"); > dev->device.numa_node = 0; Same question here. > } > >