From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by dpdk.org (Postfix) with ESMTP id CAEA9397D for ; Tue, 23 Jan 2018 15:19:35 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 44D6B20C9A; Tue, 23 Jan 2018 09:19:34 -0500 (EST) Received: from frontend1 ([10.202.2.160]) by compute1.internal (MEProxy); Tue, 23 Jan 2018 09:19:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=mesmtp; bh=S1MleLZX7wlohluI/OB22rZM2o eJzIbVy9Vy9wcXylo=; b=a1T30oCnZnsvfDmLmt/ukZHGQkymL+Q5PdMz58jIjz Afib7Tpe20uprM+fRmfVxES2unvus/u7JzFJR9OPmKC4J4ktkWwv74NHeD8LRZnp xzSCRRBxdLvoEduJh9WYHMPiBYbaWb24GqEJknIGV88PzTKLx5WiyB9CiO5H12px g= 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-sender:x-me-sender:x-sasl-enc; s=fm1; bh=S1MleL ZX7wlohluI/OB22rZM2oeJzIbVy9Vy9wcXylo=; b=ZHfAjCIszaQLOXMKVN/2fj IflALbQn9UQH7d99iHZLFwjat3yBww1yF7A+SLQFCxBKp5+0jkLawjh2HjEELPNx SjG8o/ftgV+N/4RwGVjN4Q6vjOXwkdVw1VzR3w0uRbWadAg2E2Mtapw0/Ma4JSAh 1xgpKA5xmiekPndM+kDNO8d8DSvi9LHpPW1kkRr4cL58FOTJEmwznEGmau3ysSaT oBuGMoWr/fJtF55EMiVK/cK5s2Ju2O3mYpTd0I4CoROVMqwlLWGboirUIj1z8AtG ahQiixacxzloItjWC6SPPwsDl8l2I2hoOV5uLNYdrATm3Eg8TRRpy4EPZ62JMgzA == X-ME-Sender: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id EEEEA7E496; Tue, 23 Jan 2018 09:19:33 -0500 (EST) From: Thomas Monjalon To: "Ananyev, Konstantin" Cc: Matan Azrad , =?ISO-8859-1?Q?Ga=EBtan?= Rivet , "Wu, Jingjing" , dev@dpdk.org, Neil Horman , "Richardson, Bruce" Date: Tue, 23 Jan 2018 15:18:54 +0100 Message-ID: <2244903.IzFUvMzFb5@xps> In-Reply-To: <2601191342CEEE43887BDE71AB97725886282587@irsmsx105.ger.corp.intel.com> References: <1515318351-4756-1-git-send-email-matan@mellanox.com> <2601191342CEEE43887BDE71AB97725886282587@irsmsx105.ger.corp.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v3 7/7] app/testpmd: adjust ethdev port ownership 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: Tue, 23 Jan 2018 14:19:36 -0000 23/01/2018 14:34, Ananyev, Konstantin: > If that' s the use case, then I think you need to set device ownership at creation time - > inside dev_allocate(). > Again that would avoid such racing conditions inside testpmd. The devices must be allocated at a low level layer. When a new device appears (hotplug), an ethdev port should be allocated automatically if it passes the whitelist/blacklist policy test. Then we must decide who will manage this device. I suggest notifying the DPDK libs first. So a DPDK lib or PMD like failsafe can have the priority to take the ownership in its notification callback.