From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-f195.google.com (mail-pf1-f195.google.com [209.85.210.195]) by dpdk.org (Postfix) with ESMTP id E75AC5F1C for ; Wed, 5 Dec 2018 23:02:34 +0100 (CET) Received: by mail-pf1-f195.google.com with SMTP id b7so10669294pfi.8 for ; Wed, 05 Dec 2018 14:02:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Bgh31/T+fYkZWay++HCCONeLrXvhOjnTKWRKizk50hA=; b=zk20QnErF42fvy9123qDEJXRxkh0xjtuiFsnrIB8LYIzarBcpxmdW1zsXyUlIXXmkm sbt3w3v5Wu6rkNucCD0ex3J4k6WPH7WwO3qyxukFAzq7fIaL5Qnv88Ob6ft5mswLMNE6 TntOpwIVf9MfuOpBIbBobDQq5ZeLo+zy36sAiiDfipeMxQsLJszrcl9Msy5kbilY5OAA q9xjkbtcvAtReaI5TdFu3YfHeGbFq3dKDEjjpDhZVKtsu60qlm2/UkTJajAxiqgntQWh HsHLzzwrnV23D+UzaM2Ih9X5OYM81FIHMl9QKikRC/T57+j4hjx/9fuQB0fBXa+KHlIn HUxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Bgh31/T+fYkZWay++HCCONeLrXvhOjnTKWRKizk50hA=; b=foHZQp/vKoCR4+7Fr5J1ImLYcpEkSDI+/1SqszNwSiCCregqfroKQ/QcmDrX9ux71b 52HoGT1YpoTgej6nrf01aBHImhZ4inJ5BlSFyS4PdazbjHlTrZ6iU/oj+zCFiCKEg/zX WU/a35R7kqrg7yULmJ5hNUQOT0VuMAFKlGeW10z7pIQkoVrSNnOt5+B3+E5JuVB134S2 QZ2MwCeMiukh1KEbvHW3EdOtjyida+ZyFzIWQ8LPIxnIVlT1Uiy/loiCqrKihN7JQ+tj 983kc+5tJOzEGoLFRxcaY+q8ZgBy6lASgEPHvdEFK0aZMWGpL4MY3Ma3QxNvjhx00OWD kAxA== X-Gm-Message-State: AA+aEWZlB9tbE9+pIXEHJKV1K/MvzprVOVPmLTwGlVU0UwB/3fNqpkAs kHpjZJJS7O62ftc9dZ5/YomB+A== X-Google-Smtp-Source: AFSGD/WEh1dqY9eionZu3bW6MvRzTEn91OH3CUKSJnOBU45cJ5jpZowpn0GUWkBUwQhGW9/D37ZWnQ== X-Received: by 2002:a63:de46:: with SMTP id y6mr21958047pgi.198.1544047353754; Wed, 05 Dec 2018 14:02:33 -0800 (PST) Received: from xeon-e3.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id 202sm43171937pfy.87.2018.12.05.14.02.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Dec 2018 14:02:33 -0800 (PST) From: Stephen Hemminger To: shreyansh.jain@nxp.com, hemant.agrawal@nxp.com Cc: dev@dpdk.org, Stephen Hemminger Date: Wed, 5 Dec 2018 14:02:30 -0800 Message-Id: <20181205220230.5640-1-stephen@networkplumber.org> X-Mailer: git-send-email 2.19.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH] bus/dpaa: do nothing if bus not present X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Dec 2018 22:02:35 -0000 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 --- 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