patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH 19.11] bus: clarify log for non-NUMA-aware devices
@ 2021-08-12  9:27 Dmitry Kozlyuk
  2021-08-16  8:52 ` Christian Ehrhardt
  0 siblings, 1 reply; 2+ messages in thread
From: Dmitry Kozlyuk @ 2021-08-12  9:27 UTC (permalink / raw)
  To: stable; +Cc: Asaf Penso, Matan Azrad

[ upstream commit e9b3d79b0696cd983ace8e6f65532b240f43a1bb ]

PCI and vmbus 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")
Cc: stable@dpdk.org

Signed-off-by: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 doc/guides/nics/ena.rst          | 2 +-
 drivers/bus/pci/pci_common.c     | 5 ++++-
 drivers/bus/vmbus/vmbus_common.c | 5 ++++-
 3 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/doc/guides/nics/ena.rst b/doc/guides/nics/ena.rst
index bbf27f235a..d39201c20b 100644
--- a/doc/guides/nics/ena.rst
+++ b/doc/guides/nics/ena.rst
@@ -198,7 +198,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/pci/pci_common.c b/drivers/bus/pci/pci_common.c
index ab73c009ac..cabfe69ec8 100644
--- a/drivers/bus/pci/pci_common.c
+++ b/drivers/bus/pci/pci_common.c
@@ -18,6 +18,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>
@@ -150,7 +151,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 3adef01c95..34676c48af 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>
@@ -113,7 +114,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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-stable] [PATCH 19.11] bus: clarify log for non-NUMA-aware devices
  2021-08-12  9:27 [dpdk-stable] [PATCH 19.11] bus: clarify log for non-NUMA-aware devices Dmitry Kozlyuk
@ 2021-08-16  8:52 ` Christian Ehrhardt
  0 siblings, 0 replies; 2+ messages in thread
From: Christian Ehrhardt @ 2021-08-16  8:52 UTC (permalink / raw)
  To: Dmitry Kozlyuk; +Cc: dpdk stable, Asaf Penso, Matan Azrad

On Thu, Aug 12, 2021 at 11:27 AM Dmitry Kozlyuk <dkozlyuk@nvidia.com> wrote:
>
> [ upstream commit e9b3d79b0696cd983ace8e6f65532b240f43a1bb ]
>
> PCI and vmbus drivers printed a warning when NUMA node
> had been reported as (-1) or not reported by OS:

Thanks, applied

>     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")
> Cc: stable@dpdk.org
>
> Signed-off-by: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
> Acked-by: Matan Azrad <matan@nvidia.com>
> ---
>  doc/guides/nics/ena.rst          | 2 +-
>  drivers/bus/pci/pci_common.c     | 5 ++++-
>  drivers/bus/vmbus/vmbus_common.c | 5 ++++-
>  3 files changed, 9 insertions(+), 3 deletions(-)
>
> diff --git a/doc/guides/nics/ena.rst b/doc/guides/nics/ena.rst
> index bbf27f235a..d39201c20b 100644
> --- a/doc/guides/nics/ena.rst
> +++ b/doc/guides/nics/ena.rst
> @@ -198,7 +198,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/pci/pci_common.c b/drivers/bus/pci/pci_common.c
> index ab73c009ac..cabfe69ec8 100644
> --- a/drivers/bus/pci/pci_common.c
> +++ b/drivers/bus/pci/pci_common.c
> @@ -18,6 +18,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>
> @@ -150,7 +151,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 3adef01c95..34676c48af 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>
> @@ -113,7 +114,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
>


-- 
Christian Ehrhardt
Staff Engineer, Ubuntu Server
Canonical Ltd

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-08-16  8:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-12  9:27 [dpdk-stable] [PATCH 19.11] bus: clarify log for non-NUMA-aware devices Dmitry Kozlyuk
2021-08-16  8:52 ` Christian Ehrhardt

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).