From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 91BC11B3E8 for ; Thu, 29 Nov 2018 08:17:28 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Nov 2018 23:17:27 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,293,1539673200"; d="scan'208";a="278620598" Received: from jim-aorus.sh.intel.com ([10.67.104.245]) by orsmga005.jf.intel.com with ESMTP; 28 Nov 2018 23:17:26 -0800 From: Yahui Cao To: thomas@monjalon.net, ferruh.yigit@intel.com Cc: dev@dpdk.org Date: Thu, 29 Nov 2018 15:16:08 +0800 Message-Id: <20181129071608.20820-1-yahui.cao@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [dpdk-dev] [PATCH] bus/vdev: add warning for duplicated vdev name 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: Thu, 29 Nov 2018 07:17:29 -0000 If duplicated vdev name is detected, print out a warning message. Signed-off-by: Yahui Cao --- drivers/bus/vdev/vdev.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/bus/vdev/vdev.c b/drivers/bus/vdev/vdev.c index 9c66bdc78..ff2db7d3f 100644 --- a/drivers/bus/vdev/vdev.c +++ b/drivers/bus/vdev/vdev.c @@ -462,6 +462,8 @@ vdev_scan(void) if (find_vdev(devargs->name)) { rte_spinlock_recursive_unlock(&vdev_device_list_lock); free(dev); + VDEV_LOG(WARNING, "duplicated vdev name %s detected!", + devargs->name); continue; } -- 2.17.1