summaryrefslogtreecommitdiff
path: root/drivers/bus
diff options
context:
space:
mode:
authorStephen Hemminger <stephen@networkplumber.org>2018-12-05 14:02:30 -0800
committerThomas Monjalon <thomas@monjalon.net>2018-12-19 03:13:29 +0100
commitf18e18e0ccf7d3cb08042ad77074e1cbd070555d (patch)
tree8106f37643ea5c65644a9da21b7fffb5d80635d7 /drivers/bus
parent07938364f249d06c658b71911ee32679eeb453e3 (diff)
downloaddpdk-next-eventdev-f18e18e0ccf7d3cb08042ad77074e1cbd070555d.zip
dpdk-next-eventdev-f18e18e0ccf7d3cb08042ad77074e1cbd070555d.tar.gz
dpdk-next-eventdev-f18e18e0ccf7d3cb08042ad77074e1cbd070555d.tar.xz
bus/dpaa: do nothing if bus not present
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") Cc: stable@dpdk.org Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Diffstat (limited to 'drivers/bus')
-rw-r--r--drivers/bus/dpaa/dpaa_bus.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/bus/dpaa/dpaa_bus.c b/drivers/bus/dpaa/dpaa_bus.c
index 203f60d..204a50b 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;
}