From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v3 7/7] app/testpmd: adjust ethdev port ownership Date: Tue, 23 Jan 2018 15:18:54 +0100 Message-ID: <2244903.IzFUvMzFb5@xps> References: <1515318351-4756-1-git-send-email-matan@mellanox.com> <2601191342CEEE43887BDE71AB97725886282587@irsmsx105.ger.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: Matan Azrad , =?ISO-8859-1?Q?Ga=EBtan?= Rivet , "Wu, Jingjing" , dev@dpdk.org, Neil Horman , "Richardson, Bruce" To: "Ananyev, Konstantin" 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) In-Reply-To: <2601191342CEEE43887BDE71AB97725886282587@irsmsx105.ger.corp.intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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.