patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
To: <dev@dpdk.org>
Cc: <stable@dpdk.org>, Viacheslav Ovsiienko <viacheslavo@nvidia.com>,
	"Xueming Li" <xuemingl@nvidia.com>,
	Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>,
	Marcin Wojtas <mw@semihalf.com>,
	Michal Krawczyk <mk@semihalf.com>,
	"Shai Brandes" <shaibran@amazon.com>,
	Evgeny Schemeilin <evgenys@amazon.com>,
	"Igor Chauskin" <igorch@amazon.com>,
	Parav Pandit <parav@nvidia.com>,
	"Stephen Hemminger" <sthemmin@microsoft.com>,
	Long Li <longli@microsoft.com>
Subject: [dpdk-stable] [PATCH v5] bus: clarify log for non-NUMA-aware devices
Date: Wed, 4 Aug 2021 11:03:01 +0300	[thread overview]
Message-ID: <20210804080301.1440491-1-dkozlyuk@nvidia.com> (raw)
In-Reply-To: <20210728220618.1048721-1-dkozlyuk@nvidia.com>

PCI, vmbus, and auxiliary drivers printed a warning
when NUMA node had been reported as (-1) or not reported by OS:

    EAL:   Invalid NUMA socket, default to 0

This message and its level might confuse users because the configuration
is valid and nothing happens that requires attention or intervention.
It was also printed without the device identification and with an indent
(PCI only), which is confusing unless DEBUG logging is on to print
the header message with the device name.

Reduce level to INFO, reword the message, and suppress it when there is
only one NUMA node because NUMA awareness does not matter in this case.
Also, remove the indent for PCI.

Fixes: f0e0e86aa35d ("pci: move NUMA node check from scan to probe")
Fixes: 831dba47bd36 ("bus/vmbus: add Hyper-V virtual bus support")
Fixes: 1afce3086cf4 ("bus/auxiliary: introduce auxiliary bus")
Cc: stable@dpdk.org

Signed-off-by: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
Reviewed-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Reviewed-by: Xueming Li <xuemingl@nvidia.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
The messages say "socket" and not "node", because this is current
terminology in DPDK.

v5: Add device name, remove indent, fix typos (Thomas Monjalon)
v4: Fix build errors and a typo (CI).
v3: Keep resetting device NUMA node to 0 (Andrew Rybchenko).
v2: Add NUMA node count check (Stephen Hemminger).

 doc/guides/nics/ena.rst                  | 2 +-
 drivers/bus/auxiliary/auxiliary_common.c | 5 ++++-
 drivers/bus/pci/pci_common.c             | 5 ++++-
 drivers/bus/vmbus/vmbus_common.c         | 5 ++++-
 4 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/doc/guides/nics/ena.rst b/doc/guides/nics/ena.rst
index 63951098ea..92b1858e7a 100644
--- a/doc/guides/nics/ena.rst
+++ b/doc/guides/nics/ena.rst
@@ -246,7 +246,7 @@ Example output:
 
    [...]
    EAL: PCI device 0000:00:06.0 on NUMA socket -1
-   EAL:   Invalid NUMA socket, default to 0
+   EAL: Device 0000:00:06.0 is not NUMA-aware, defaulting socket to 0
    EAL:   probe driver: 1d0f:ec20 net_ena
 
    Interactive-mode selected
diff --git a/drivers/bus/auxiliary/auxiliary_common.c b/drivers/bus/auxiliary/auxiliary_common.c
index 89e653c54e..603b6fdc02 100644
--- a/drivers/bus/auxiliary/auxiliary_common.c
+++ b/drivers/bus/auxiliary/auxiliary_common.c
@@ -17,6 +17,7 @@
 #include <rte_memory.h>
 #include <rte_eal.h>
 #include <rte_eal_paging.h>
+#include <rte_lcore.h>
 #include <rte_string_fns.h>
 #include <rte_common.h>
 #include <rte_devargs.h>
@@ -106,7 +107,9 @@ rte_auxiliary_probe_one_driver(struct rte_auxiliary_driver *drv,
 	}
 
 	if (dev->device.numa_node < 0) {
-		AUXILIARY_LOG(INFO, "Device is not NUMA-aware, defaulting NUMA node to 0");
+		if (rte_socket_count() > 1)
+			AUXILIARY_LOG(INFO, "Device %s is not NUMA-aware, defaulting socket to 0",
+					dev->name);
 		dev->device.numa_node = 0;
 	}
 
diff --git a/drivers/bus/pci/pci_common.c b/drivers/bus/pci/pci_common.c
index 35d7d092d1..79a6fcffbd 100644
--- a/drivers/bus/pci/pci_common.c
+++ b/drivers/bus/pci/pci_common.c
@@ -16,6 +16,7 @@
 #include <rte_bus.h>
 #include <rte_pci.h>
 #include <rte_bus_pci.h>
+#include <rte_lcore.h>
 #include <rte_per_lcore.h>
 #include <rte_memory.h>
 #include <rte_eal.h>
@@ -190,7 +191,9 @@ rte_pci_probe_one_driver(struct rte_pci_driver *dr,
 	}
 
 	if (dev->device.numa_node < 0) {
-		RTE_LOG(WARNING, EAL, "  Invalid NUMA socket, default to 0\n");
+		if (rte_socket_count() > 1)
+			RTE_LOG(INFO, EAL, "Device %s is not NUMA-aware, defaulting socket to 0\n",
+					dev->name);
 		dev->device.numa_node = 0;
 	}
 
diff --git a/drivers/bus/vmbus/vmbus_common.c b/drivers/bus/vmbus/vmbus_common.c
index d25fd14ef5..519ca9c6fe 100644
--- a/drivers/bus/vmbus/vmbus_common.c
+++ b/drivers/bus/vmbus/vmbus_common.c
@@ -15,6 +15,7 @@
 #include <rte_eal.h>
 #include <rte_tailq.h>
 #include <rte_devargs.h>
+#include <rte_lcore.h>
 #include <rte_malloc.h>
 #include <rte_errno.h>
 #include <rte_memory.h>
@@ -112,7 +113,9 @@ vmbus_probe_one_driver(struct rte_vmbus_driver *dr,
 	dev->driver = dr;
 
 	if (dev->device.numa_node < 0) {
-		VMBUS_LOG(WARNING, "  Invalid NUMA socket, default to 0");
+		if (rte_socket_count() > 1)
+			VMBUS_LOG(INFO, "Device %s is not NUMA-aware, defaulting socket to 0",
+					guid);
 		dev->device.numa_node = 0;
 	}
 
-- 
2.25.1


  parent reply	other threads:[~2021-08-04  8:03 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-15 10:51 [dpdk-stable] [PATCH] " Dmitry Kozlyuk
2021-06-15 15:12 ` [dpdk-stable] [dpdk-dev] " Stephen Hemminger
2021-06-16 10:07 ` [dpdk-stable] [PATCH v2] " Dmitry Kozlyuk
2021-07-23 20:07   ` [dpdk-stable] [dpdk-dev] " Andrew Rybchenko
2021-07-27  8:08     ` Dmitry Kozlyuk
2021-07-27 10:27   ` [dpdk-stable] [PATCH v3] " Dmitry Kozlyuk
2021-07-28 22:06     ` [dpdk-stable] [PATCH v4] " Dmitry Kozlyuk
2021-07-29  7:45       ` Andrew Rybchenko
2021-07-30 16:18       ` Thomas Monjalon
2021-08-04  8:03       ` Dmitry Kozlyuk [this message]
2021-08-04  9:34         ` [dpdk-stable] [dpdk-dev] [PATCH v5] " Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210804080301.1440491-1-dkozlyuk@nvidia.com \
    --to=dkozlyuk@nvidia.com \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=dev@dpdk.org \
    --cc=evgenys@amazon.com \
    --cc=igorch@amazon.com \
    --cc=longli@microsoft.com \
    --cc=mk@semihalf.com \
    --cc=mw@semihalf.com \
    --cc=parav@nvidia.com \
    --cc=shaibran@amazon.com \
    --cc=stable@dpdk.org \
    --cc=sthemmin@microsoft.com \
    --cc=viacheslavo@nvidia.com \
    --cc=xuemingl@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).