DPDK patches and discussions
 help / color / mirror / Atom feed
From: Yunjian Wang <wangyunjian@huawei.com>
To: <dev@dpdk.org>
Cc: <david.marchand@redhat.com>, <qi.z.zhang@intel.com>,
	<anatoly.burakov@intel.com>, <huangshaozhang@huawei.com>,
	Yunjian Wang <wangyunjian@huawei.com>, <stable@dpdk.org>,
	Lipei Liang <lianglipei@huawei.com>
Subject: [dpdk-dev] [PATCH 1/1] eal: fix error log in rte_dev_probe
Date: Mon, 5 Dec 2022 16:02:29 +0800	[thread overview]
Message-ID: <a18b51355c3c07c9b76b6c2d868851b73b01abf7.1669973539.git.wangyunjian@huawei.com> (raw)

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


             reply	other threads:[~2022-12-05  8:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-05  8:02 Yunjian Wang [this message]
2023-01-05  8:34 ` David Marchand
2023-05-24  7:11   ` wangyunjian

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a18b51355c3c07c9b76b6c2d868851b73b01abf7.1669973539.git.wangyunjian@huawei.com \
    --to=wangyunjian@huawei.com \
    --cc=anatoly.burakov@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=huangshaozhang@huawei.com \
    --cc=lianglipei@huawei.com \
    --cc=qi.z.zhang@intel.com \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).