From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from wout2-smtp.messagingengine.com (wout2-smtp.messagingengine.com [64.147.123.25]) by dpdk.org (Postfix) with ESMTP id ECE291B581 for ; Wed, 19 Dec 2018 03:26:39 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id A97F1187C; Tue, 18 Dec 2018 21:26:38 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Tue, 18 Dec 2018 21:26:39 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=mesmtp; bh=Bl3OhQYqHUNQGy8qBwB61EILEJRRUOvLQue/NznkmPM=; b=MoXfMckCcUG3 WotM/b7mTeo8DuQ5Db5ReBNa3F/nydLdkEUQHGvpePwKl9lNvH1HzUDFtzlX0dH7 8Q6yh9V/rdr1X/YW/exfCRKszyHVkWpla+csncIrFDYkuxgilHDj4rgAeKiZYBB1 HfeqDW8fF56uSgSMQWJjLEPc87WD7Eo= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=Bl3OhQYqHUNQGy8qBwB61EILEJRRUOvLQue/Nznkm PM=; b=vi5UWVTm8vrlJxdrPVUbhUMd1z+5YKlFc3fP16s7XqtkZPKF7j7Ch5kT0 Lw/3SKIXwBzcKmD+Ap8oIPZB68l/MXR2b8EV92A/190MvDeirWA8JE0F5FE4SW4l ZoAMncyJhrx6tYEcpMFuMSapvTRZQIU00yeoljVir9N7hgkybdJS5SYsXTxAYqYx QMubHwSw1LpAoJwg+FQnyxjnsOLlgS9dGR25IhAuu2R0m5+5ZPOQvLRUyQJEU+GW KtdLeHegMRpf7EJtcNtRf0LlpPnnA8471eV/KVI3G+AB5rMxzd2X1rIvIV45Cm53 8E9purMl35tRsSJwCDSEe4yocQ/yg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedtkedrudeiledgudejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfquhhtnecuuegrihhlohhuthemucef tddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffufffkjg hfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhmrghsucfoohhnjhgrlhhonhcu oehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucfkphepjeejrddufeegrddvtd efrddukeegnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhhomhgrshesmhhonhhjrghl ohhnrdhnvghtnecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 36537E40FF; Tue, 18 Dec 2018 21:26:37 -0500 (EST) From: Thomas Monjalon To: Yahui Cao Cc: dev@dpdk.org, ferruh.yigit@intel.com Date: Wed, 19 Dec 2018 03:26:36 +0100 Message-ID: <1682296.hbgUrQPOuL@xps> In-Reply-To: <20181129071608.20820-1-yahui.cao@intel.com> References: <20181129071608.20820-1-yahui.cao@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [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: Wed, 19 Dec 2018 02:26:40 -0000 29/11/2018 08:16, Yahui Cao: > 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; > } I'm surprised there is nothing to prevent from creating 2 vdevs with the same name. It should be considered as an error and reject the vdev creation.