* [dpdk-dev] [PATCH] bus/dpaa: do nothing if bus not present
@ 2018-12-05 22:02 Stephen Hemminger
2018-12-07 6:45 ` Shreyansh Jain
0 siblings, 1 reply; 3+ messages in thread
From: Stephen Hemminger @ 2018-12-05 22:02 UTC (permalink / raw)
To: shreyansh.jain, hemant.agrawal; +Cc: dev, Stephen Hemminger
The DPAA bus support code put out messages like:
dpaax: read_memory_node(): Unable to glob device-tree memory node: (/proc/device-tree/memory[@0-9]*/reg)(3)
dpaax: PA->VA translation not available;
dpaax: Expect performance impact.
These are unnecessary and likely to confuse the end user.
Fix this by doing nothing if bus is empty.
Fixes: 5a7dbb934d75 ("dpaa: enable dpaax library")
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/bus/dpaa/dpaa_bus.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/bus/dpaa/dpaa_bus.c b/drivers/bus/dpaa/dpaa_bus.c
index 203f60dc18cb..204a50b1eba3 100644
--- a/drivers/bus/dpaa/dpaa_bus.c
+++ b/drivers/bus/dpaa/dpaa_bus.c
@@ -542,6 +542,10 @@ rte_dpaa_bus_probe(void)
unsigned int svr_ver;
int probe_all = rte_dpaa_bus.bus.conf.scan_mode != RTE_BUS_SCAN_WHITELIST;
+ /* If DPAA bus is not present nothing needs to be done */
+ if (TAILQ_EMPTY(&rte_dpaa_bus.device_list))
+ return 0;
+
svr_file = fopen(DPAA_SOC_ID_FILE, "r");
if (svr_file) {
if (fscanf(svr_file, "svr:%x", &svr_ver) > 0)
@@ -586,8 +590,7 @@ rte_dpaa_bus_probe(void)
/* Register DPAA mempool ops only if any DPAA device has
* been detected.
*/
- if (!TAILQ_EMPTY(&rte_dpaa_bus.device_list))
- rte_mbuf_set_platform_mempool_ops(DPAA_MEMPOOL_OPS_NAME);
+ rte_mbuf_set_platform_mempool_ops(DPAA_MEMPOOL_OPS_NAME);
return 0;
}
--
2.19.2
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH] bus/dpaa: do nothing if bus not present
2018-12-05 22:02 [dpdk-dev] [PATCH] bus/dpaa: do nothing if bus not present Stephen Hemminger
@ 2018-12-07 6:45 ` Shreyansh Jain
2018-12-19 2:08 ` Thomas Monjalon
0 siblings, 1 reply; 3+ messages in thread
From: Shreyansh Jain @ 2018-12-07 6:45 UTC (permalink / raw)
To: Stephen Hemminger, Hemant Agrawal; +Cc: dev
On Thursday 06 December 2018 03:32 AM, Stephen Hemminger wrote:
> The DPAA bus support code put out messages like:
> dpaax: read_memory_node(): Unable to glob device-tree memory node: (/proc/device-tree/memory[@0-9]*/reg)(3)
> dpaax: PA->VA translation not available;
> dpaax: Expect performance impact.
Though I agree with the change below, I am surprised that you are
observing such logs as above. These were disabled by bumping the dpaax
library default log level to ERR:
--->8---
commit 93ec301495316922c0fb1df762e9322bad90b8dc
Author: Shreyansh Jain <shreyansh.jain@nxp.com>
Date: Wed Oct 17 10:10:34 2018 +0000
common/dpaax: reduce log level
---8>---
And the messages you observed above were either WARN or DEBUG.
Is this system running in debug mode?
>
> These are unnecessary and likely to confuse the end user.
> Fix this by doing nothing if bus is empty.
>
> Fixes: 5a7dbb934d75 ("dpaa: enable dpaax library")
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> ---
> drivers/bus/dpaa/dpaa_bus.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/bus/dpaa/dpaa_bus.c b/drivers/bus/dpaa/dpaa_bus.c
> index 203f60dc18cb..204a50b1eba3 100644
> --- a/drivers/bus/dpaa/dpaa_bus.c
> +++ b/drivers/bus/dpaa/dpaa_bus.c
> @@ -542,6 +542,10 @@ rte_dpaa_bus_probe(void)
> unsigned int svr_ver;
> int probe_all = rte_dpaa_bus.bus.conf.scan_mode != RTE_BUS_SCAN_WHITELIST;
>
> + /* If DPAA bus is not present nothing needs to be done */
> + if (TAILQ_EMPTY(&rte_dpaa_bus.device_list))
> + return 0;
> +
> svr_file = fopen(DPAA_SOC_ID_FILE, "r");
> if (svr_file) {
> if (fscanf(svr_file, "svr:%x", &svr_ver) > 0)
> @@ -586,8 +590,7 @@ rte_dpaa_bus_probe(void)
> /* Register DPAA mempool ops only if any DPAA device has
> * been detected.
> */
> - if (!TAILQ_EMPTY(&rte_dpaa_bus.device_list))
> - rte_mbuf_set_platform_mempool_ops(DPAA_MEMPOOL_OPS_NAME);
> + rte_mbuf_set_platform_mempool_ops(DPAA_MEMPOOL_OPS_NAME);
>
> return 0;
> }
>
This is actually the right thing to do - No work should be done by probe
if scan didn't find anything. Thanks.
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH] bus/dpaa: do nothing if bus not present
2018-12-07 6:45 ` Shreyansh Jain
@ 2018-12-19 2:08 ` Thomas Monjalon
0 siblings, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2018-12-19 2:08 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: dev, Shreyansh Jain, Hemant Agrawal, stable
07/12/2018 07:45, Shreyansh Jain:
> On Thursday 06 December 2018 03:32 AM, Stephen Hemminger wrote:
> > The DPAA bus support code put out messages like:
> > dpaax: read_memory_node(): Unable to glob device-tree memory node: (/proc/device-tree/memory[@0-9]*/reg)(3)
> > dpaax: PA->VA translation not available;
> > dpaax: Expect performance impact.
> >
> > These are unnecessary and likely to confuse the end user.
> > Fix this by doing nothing if bus is empty.
> >
> > Fixes: 5a7dbb934d75 ("dpaa: enable dpaax library")
> > Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
>
> This is actually the right thing to do - No work should be done by probe
> if scan didn't find anything. Thanks.
>
> Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
+Cc: stable@dpdk.org
Applied, thanks
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-12-19 2:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-05 22:02 [dpdk-dev] [PATCH] bus/dpaa: do nothing if bus not present Stephen Hemminger
2018-12-07 6:45 ` Shreyansh Jain
2018-12-19 2:08 ` 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).