Thread (11 messages) 11 messages, 4 authors, 2021-08-04

Re: [dpdk-dev] [PATCH v2] bus: clarify log for non-NUMA-aware devices

From: Andrew Rybchenko <hidden>
Date: 2021-07-23 20:07:11

On 6/16/21 1:07 PM, Dmitry Kozlyuk wrote:
quoted hunk ↗ jump to hunk
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 <redacted>
Reviewed-by: Viacheslav Ovsiienko <redacted>
Reviewed-by: Xueming Li <redacted>
---
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?
quoted hunk ↗ jump to hunk
  	}
  
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.
  	}
  
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help