patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 1/1] eal: fix error log in rte_dev_probe
@ 2022-12-05  8:02 Yunjian Wang
  2023-01-05  8:34 ` David Marchand
  0 siblings, 1 reply; 3+ messages in thread
From: Yunjian Wang @ 2022-12-05  8:02 UTC (permalink / raw)
  To: dev
  Cc: david.marchand, qi.z.zhang, anatoly.burakov, huangshaozhang,
	Yunjian Wang, stable, Lipei Liang

In the device probing, there is no need to log the error message in the
case, that device has been already probed and return with -EEXIST.

Fixes: 244d5130719c ("eal: enable hotplug on multi-process")
Cc: stable@dpdk.org

Signed-off-by: Lipei Liang <lianglipei@huawei.com>
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
---
 lib/eal/common/eal_common_dev.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/eal/common/eal_common_dev.c b/lib/eal/common/eal_common_dev.c
index 614ef6c9fc..4650216c78 100644
--- a/lib/eal/common/eal_common_dev.c
+++ b/lib/eal/common/eal_common_dev.c
@@ -264,17 +264,17 @@ rte_dev_probe(const char *devargs)
 	ret = local_dev_probe(devargs, &dev);
 
 	if (ret != 0) {
-		RTE_LOG(ERR, EAL,
-			"Failed to attach device on primary process\n");
-
 		/**
 		 * it is possible that secondary process failed to attached a
 		 * device that primary process have during initialization,
 		 * so for -EEXIST case, we still need to sync with secondary
 		 * process.
 		 */
-		if (ret != -EEXIST)
+		if (ret != -EEXIST) {
+			RTE_LOG(ERR, EAL,
+				"Failed to attach device on primary process\n");
 			return ret;
+		}
 	}
 
 	/* primary send attach sync request to secondary. */
-- 
2.27.0


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

end of thread, other threads:[~2023-05-24  7:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-05  8:02 [dpdk-dev] [PATCH 1/1] eal: fix error log in rte_dev_probe Yunjian Wang
2023-01-05  8:34 ` David Marchand
2023-05-24  7:11   ` wangyunjian

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