From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2C3D9A0548; Wed, 19 May 2021 08:00:06 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A933841103; Wed, 19 May 2021 08:00:05 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mails.dpdk.org (Postfix) with ESMTP id 370C14003F for ; Wed, 19 May 2021 08:00:02 +0200 (CEST) IronPort-SDR: UEmzm4keU/C7j3D0BShnNJRD6adVmaY08Bis99Kgtpi5FYxTtIlpvAIVl/vaZOL0Sy6mlKHwi5 YpcjpNU/8VsQ== X-IronPort-AV: E=McAfee;i="6200,9189,9988"; a="200958274" X-IronPort-AV: E=Sophos;i="5.82,312,1613462400"; d="scan'208";a="200958274" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 May 2021 23:00:00 -0700 IronPort-SDR: johzFroGVYVOqp8F32eGteZ27P2z8rgjtNOl9XY3Xujto7YH474ENuqNK36fcpxcS7IXbyCcdr D7Holj9ql2IA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,312,1613462400"; d="scan'208";a="439477427" Received: from fedora.sh.intel.com ([10.67.114.173]) by fmsmga008.fm.intel.com with ESMTP; 18 May 2021 22:59:59 -0700 From: Changpeng Liu To: dev@dpdk.org Cc: changpeng.liu@intel.com Date: Wed, 19 May 2021 14:45:48 +0800 Message-Id: <1621406749-15536-1-git-send-email-changpeng.liu@intel.com> X-Mailer: git-send-email 1.9.3 Subject: [dpdk-dev] [PATCH] eal/hotplug: suppress one error log on primary process X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" This is a normal case that the primary process already owned one PCI 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 ae6010e..bf55056 100644 --- a/lib/eal/common/hotplug_mp.c +++ b/lib/eal/common/hotplug_mp.c @@ -98,10 +98,9 @@ static int cmp_dev_name(const struct rte_device *dev, const void *_name) 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) { -- 1.9.3