From 7bc7bc3516ad7d4c082cb24daedd02117cc162ef Mon Sep 17 00:00:00 2001 From: Changpeng Liu Date: Wed, 19 May 2021 14:45:48 +0800 Subject: [PATCH] eal: suppress error log on multi-process hotplug This is a normal case that the primary process already owned one device while the secondary process try to attach it, so suppress the error log here to exclude this case. Signed-off-by: Changpeng Liu --- lib/eal/common/hotplug_mp.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/eal/common/hotplug_mp.c b/lib/eal/common/hotplug_mp.c index ae6010e8f8..bf55056f59 100644 --- a/lib/eal/common/hotplug_mp.c +++ b/lib/eal/common/hotplug_mp.c @@ -98,10 +98,9 @@ __handle_secondary_request(void *param) memset(&da, 0, sizeof(da)); if (req->t == EAL_DEV_REQ_TYPE_ATTACH) { ret = local_dev_probe(req->devargs, &dev); - if (ret != 0) { + if (ret != 0 && ret != -EEXIST) { RTE_LOG(ERR, EAL, "Failed to hotplug add device on primary\n"); - if (ret != -EEXIST) - goto finish; + goto finish; } ret = eal_dev_hotplug_request_to_secondary(&tmp_req); if (ret != 0) { -- 2.20.1