* [dpdk-stable] [PATCH] bus: clarify log for non-NUMA-aware devices
@ 2021-06-15 10:51 Dmitry Kozlyuk
2021-06-15 15:12 ` [dpdk-stable] [dpdk-dev] " Stephen Hemminger
2021-06-16 10:07 ` [dpdk-stable] [PATCH v2] " Dmitry Kozlyuk
0 siblings, 2 replies; 11+ messages in thread
From: Dmitry Kozlyuk @ 2021-06-15 10:51 UTC (permalink / raw)
To: dev
Cc: Xueming Li, stable, Marcin Wojtas, Michal Krawczyk, Guy Tzalik,
Evgeny Schemeilin, Igor Chauskin, Stephen Hemminger, Long Li,
Sergio Gonzalez Monroy
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 and reword the message.
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>
Reviewed-by: Slava Ovsiienko <viacheslavo@nvidia.com>
---
Hi Xueming,
Please align logging in the pending bus/auxiliary patch.
doc/guides/nics/ena.rst | 2 +-
drivers/bus/pci/pci_common.c | 2 +-
drivers/bus/vmbus/vmbus_common.c | 2 +-
3 files changed, 3 insertions(+), 3 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..bf06f81229 100644
--- a/drivers/bus/pci/pci_common.c
+++ b/drivers/bus/pci/pci_common.c
@@ -190,7 +190,7 @@ 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");
+ RTE_LOG(INFO, EAL, " Device is not NUMA-aware, defaulting socket to 0\n");
dev->device.numa_node = 0;
}
diff --git a/drivers/bus/vmbus/vmbus_common.c b/drivers/bus/vmbus/vmbus_common.c
index d25fd14ef5..ef23af90ec 100644
--- a/drivers/bus/vmbus/vmbus_common.c
+++ b/drivers/bus/vmbus/vmbus_common.c
@@ -112,7 +112,7 @@ 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");
+ VMBUS_LOG(INFO, " Device is not NUMA-aware, defaulting socket to 0\n");
dev->device.numa_node = 0;
}
--
2.18.2
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [dpdk-stable] [dpdk-dev] [PATCH] bus: clarify log for non-NUMA-aware devices
2021-06-15 10:51 [dpdk-stable] [PATCH] bus: clarify log for non-NUMA-aware devices Dmitry Kozlyuk
@ 2021-06-15 15:12 ` Stephen Hemminger
2021-06-16 10:07 ` [dpdk-stable] [PATCH v2] " Dmitry Kozlyuk
1 sibling, 0 replies; 11+ messages in thread
From: Stephen Hemminger @ 2021-06-15 15:12 UTC (permalink / raw)
To: Dmitry Kozlyuk
Cc: dev, Xueming Li, stable, Marcin Wojtas, Michal Krawczyk,
Guy Tzalik, Evgeny Schemeilin, Igor Chauskin, Stephen Hemminger,
Long Li, Sergio Gonzalez Monroy
On Tue, 15 Jun 2021 13:51:55 +0300
Dmitry Kozlyuk <dkozlyuk@nvidia.com> wrote:
> diff --git a/drivers/bus/pci/pci_common.c b/drivers/bus/pci/pci_common.c
> index 35d7d092d1..bf06f81229 100644
> --- a/drivers/bus/pci/pci_common.c
> +++ b/drivers/bus/pci/pci_common.c
> @@ -190,7 +190,7 @@ 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");
> + RTE_LOG(INFO, EAL, " Device is not NUMA-aware, defaulting socket to 0\n");
Also if RTE_MAX_NUMA_NODES is 1 then this message should be silenced.
It would be normal in that case.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [dpdk-stable] [PATCH v2] bus: clarify log for non-NUMA-aware devices
2021-06-15 10:51 [dpdk-stable] [PATCH] bus: clarify log for non-NUMA-aware devices Dmitry Kozlyuk
2021-06-15 15:12 ` [dpdk-stable] [dpdk-dev] " Stephen Hemminger
@ 2021-06-16 10:07 ` Dmitry Kozlyuk
2021-07-23 20:07 ` [dpdk-stable] [dpdk-dev] " Andrew Rybchenko
2021-07-27 10:27 ` [dpdk-stable] [PATCH v3] " Dmitry Kozlyuk
1 sibling, 2 replies; 11+ messages in thread
From: Dmitry Kozlyuk @ 2021-06-16 10:07 UTC (permalink / raw)
To: dev; +Cc: stable
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 <dkozlyuk@nvidia.com>
Reviewed-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Reviewed-by: Xueming Li <xuemingl@nvidia.com>
---
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;
}
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;
}
--
2.18.2
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [dpdk-stable] [dpdk-dev] [PATCH v2] bus: clarify log for non-NUMA-aware devices
2021-06-16 10:07 ` [dpdk-stable] [PATCH v2] " Dmitry Kozlyuk
@ 2021-07-23 20:07 ` Andrew Rybchenko
2021-07-27 8:08 ` Dmitry Kozlyuk
2021-07-27 10:27 ` [dpdk-stable] [PATCH v3] " Dmitry Kozlyuk
1 sibling, 1 reply; 11+ messages in thread
From: Andrew Rybchenko @ 2021-07-23 20:07 UTC (permalink / raw)
To: Dmitry Kozlyuk, dev; +Cc: stable
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 <dkozlyuk@nvidia.com>
> Reviewed-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
> Reviewed-by: Xueming Li <xuemingl@nvidia.com>
> ---
> 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.
> }
>
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [dpdk-stable] [dpdk-dev] [PATCH v2] bus: clarify log for non-NUMA-aware devices
2021-07-23 20:07 ` [dpdk-stable] [dpdk-dev] " Andrew Rybchenko
@ 2021-07-27 8:08 ` Dmitry Kozlyuk
0 siblings, 0 replies; 11+ messages in thread
From: Dmitry Kozlyuk @ 2021-07-27 8:08 UTC (permalink / raw)
To: Andrew Rybchenko, dev; +Cc: stable
> -----Original Message-----
> From: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
> Sent: 23 июля 2021 г. 23:07
> To: Dmitry Kozlyuk <dkozlyuk@nvidia.com>; dev@dpdk.org
> Cc: stable@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH v2] bus: clarify log for non-NUMA-aware devices
>
> External email: Use caution opening links or attachments
>
>
> 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 <dkozlyuk@nvidia.com>
> > Reviewed-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
> > Reviewed-by: Xueming Li <xuemingl@nvidia.com>
> > ---
> > 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?
TBH, it was not intended, but after analyzing dev->device.numa_node usages,
I think this can be the right thing to do. Even if there is only one NUMA node,
its number may be different from 0, e. g. if we're running on a set of cores
that belong to another node. For safety we can change this patch to only affect logs,
then fix numa_node setting as a follow-up
(maybe set it to the real number of the only node).
> > }
> >
> > 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.
>
> > }
> >
> >
^ permalink raw reply [flat|nested] 11+ messages in thread
* [dpdk-stable] [PATCH v3] bus: clarify log for non-NUMA-aware devices
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 10:27 ` Dmitry Kozlyuk
2021-07-28 22:06 ` [dpdk-stable] [PATCH v4] " Dmitry Kozlyuk
1 sibling, 1 reply; 11+ messages in thread
From: Dmitry Kozlyuk @ 2021-07-27 10:27 UTC (permalink / raw)
To: dev
Cc: Andrew Rybchenko, stable, Viacheslav Ovsiienko, Xueming Li,
Marcin Wojtas, Michal Krawczyk, Shai Brandes, Evgeny Schemeilin,
Igor Chauskin, Parav Pandit, Stephen Hemminger, Long Li
PCI, vmbus, and auxiliary 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")
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>
---
v3: keep resetting device NUMA node to 0 (Andrew).
doc/guides/nics/ena.rst | 2 +-
drivers/bus/auxiliary/auxiliary_common.c | 3 ++-
drivers/bus/pci/pci_common.c | 3 ++-
drivers/bus/vmbus/vmbus_common.c | 3 ++-
4 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/doc/guides/nics/ena.rst b/doc/guides/nics/ena.rst
index 63951098ea..c506fd5bd4 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 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..3891bab0e7 100644
--- a/drivers/bus/auxiliary/auxiliary_common.c
+++ b/drivers/bus/auxiliary/auxiliary_common.c
@@ -106,7 +106,8 @@ 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 is not NUMA-aware, defaulting socket to 0");
dev->device.numa_node = 0;
}
diff --git a/drivers/bus/pci/pci_common.c b/drivers/bus/pci/pci_common.c
index 35d7d092d1..b09e42c489 100644
--- a/drivers/bus/pci/pci_common.c
+++ b/drivers/bus/pci/pci_common.c
@@ -190,7 +190,8 @@ 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 is not NUMA-aware, defaulting socket to 0\n");
dev->device.numa_node = 0;
}
diff --git a/drivers/bus/vmbus/vmbus_common.c b/drivers/bus/vmbus/vmbus_common.c
index d25fd14ef5..2fdf2c7092 100644
--- a/drivers/bus/vmbus/vmbus_common.c
+++ b/drivers/bus/vmbus/vmbus_common.c
@@ -112,7 +112,8 @@ 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 is not NUMA-aware, defaulting socket to 0");
dev->device.numa_node = 0;
}
--
2.25.1
^ permalink raw reply [flat|nested] 11+ messages in thread
* [dpdk-stable] [PATCH v4] bus: clarify log for non-NUMA-aware devices
2021-07-27 10:27 ` [dpdk-stable] [PATCH v3] " Dmitry Kozlyuk
@ 2021-07-28 22:06 ` Dmitry Kozlyuk
2021-07-29 7:45 ` Andrew Rybchenko
` (2 more replies)
0 siblings, 3 replies; 11+ messages in thread
From: Dmitry Kozlyuk @ 2021-07-28 22:06 UTC (permalink / raw)
To: dev
Cc: Andrew Rybchenko, stable, Viacheslav Ovsiienko, Xueming Li,
Marcin Wojtas, Michal Krawczyk, Shai Brandes, Evgeny Schemeilin,
Igor Chauskin, Parav Pandit, Stephen Hemminger, Long Li
PCI, vmbus, and auxiliary 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, because 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")
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>
---
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 | 4 +++-
drivers/bus/pci/pci_common.c | 4 +++-
drivers/bus/vmbus/vmbus_common.c | 4 +++-
4 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/doc/guides/nics/ena.rst b/doc/guides/nics/ena.rst
index 63951098ea..c506fd5bd4 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 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..1d5af8e126 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,8 @@ 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 is not NUMA-aware, defaulting socket to 0");
dev->device.numa_node = 0;
}
diff --git a/drivers/bus/pci/pci_common.c b/drivers/bus/pci/pci_common.c
index 35d7d092d1..bafcddf96e 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,8 @@ 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 is not NUMA-aware, defaulting socket to 0\n");
dev->device.numa_node = 0;
}
diff --git a/drivers/bus/vmbus/vmbus_common.c b/drivers/bus/vmbus/vmbus_common.c
index d25fd14ef5..2ec4d77398 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,8 @@ 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 is not NUMA-aware, defaulting socket to 0");
dev->device.numa_node = 0;
}
--
2.25.1
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [dpdk-stable] [PATCH v4] bus: clarify log for non-NUMA-aware devices
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 ` [dpdk-stable] [PATCH v5] " Dmitry Kozlyuk
2 siblings, 0 replies; 11+ messages in thread
From: Andrew Rybchenko @ 2021-07-29 7:45 UTC (permalink / raw)
To: Dmitry Kozlyuk, dev
Cc: stable, Viacheslav Ovsiienko, Xueming Li, Marcin Wojtas,
Michal Krawczyk, Shai Brandes, Evgeny Schemeilin, Igor Chauskin,
Parav Pandit, Stephen Hemminger, Long Li
On 7/29/21 1:06 AM, Dmitry Kozlyuk wrote:
> PCI, vmbus, and auxiliary 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, because 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")
> 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>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [dpdk-stable] [PATCH v4] bus: clarify log for non-NUMA-aware devices
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 ` [dpdk-stable] [PATCH v5] " Dmitry Kozlyuk
2 siblings, 0 replies; 11+ messages in thread
From: Thomas Monjalon @ 2021-07-30 16:18 UTC (permalink / raw)
To: Dmitry Kozlyuk
Cc: dev, stable, Andrew Rybchenko, Viacheslav Ovsiienko, Xueming Li,
Marcin Wojtas, Michal Krawczyk, Shai Brandes, Evgeny Schemeilin,
Igor Chauskin, Parav Pandit, Stephen Hemminger, Long Li
29/07/2021 00:06, Dmitry Kozlyuk:
> 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
The indentation in logs are wrong because they are not all
at the same log level.
If you run at a non-debug-level, you lose the first line,
so the indent becomes meaningless and confusing.
[...]
> - AUXILIARY_LOG(INFO, "Device is not NUMA-aware, defaulting NUMA node to 0");
> + if (rte_socket_count() > 1)
> + AUXILIARY_LOG(INFO, " Device is not NUMA-aware, defaulting socket to
0");
Instead of adding an indent, I would prefer we print the device name.
And we should remove log indents in other bus drivers.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [dpdk-stable] [PATCH v5] bus: clarify log for non-NUMA-aware devices
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
2021-08-04 9:34 ` [dpdk-stable] [dpdk-dev] " Thomas Monjalon
2 siblings, 1 reply; 11+ messages in thread
From: Dmitry Kozlyuk @ 2021-08-04 8:03 UTC (permalink / raw)
To: dev
Cc: stable, Viacheslav Ovsiienko, Xueming Li, Andrew Rybchenko,
Marcin Wojtas, Michal Krawczyk, Shai Brandes, Evgeny Schemeilin,
Igor Chauskin, Parav Pandit, Stephen Hemminger, Long Li
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
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [dpdk-stable] [dpdk-dev] [PATCH v5] bus: clarify log for non-NUMA-aware devices
2021-08-04 8:03 ` [dpdk-stable] [PATCH v5] " Dmitry Kozlyuk
@ 2021-08-04 9:34 ` Thomas Monjalon
0 siblings, 0 replies; 11+ messages in thread
From: Thomas Monjalon @ 2021-08-04 9:34 UTC (permalink / raw)
To: Dmitry Kozlyuk
Cc: dev, stable, Viacheslav Ovsiienko, Xueming Li, Andrew Rybchenko,
Marcin Wojtas, Michal Krawczyk, Shai Brandes, Evgeny Schemeilin,
Igor Chauskin, Parav Pandit, Stephen Hemminger, Long Li
04/08/2021 10:03, Dmitry Kozlyuk:
> 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.
Yes we need to fix this terminology in a separate patch.
Applied, thanks.
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2021-08-04 9:34 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-15 10:51 [dpdk-stable] [PATCH] bus: clarify log for non-NUMA-aware devices 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 ` [dpdk-stable] [PATCH v5] " Dmitry Kozlyuk
2021-08-04 9:34 ` [dpdk-stable] [dpdk-dev] " Thomas Monjalon
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).