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 B70D41BEE4 for ; Wed, 4 Jul 2018 09:33:55 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 1D033211B7; Wed, 4 Jul 2018 03:33:55 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Wed, 04 Jul 2018 03:33:55 -0400 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=NjyVR82TRAtiqtrrWuIeeu19fX a3xYrMlP5N1uYxGrU=; b=Ok2DJc9h8AjGc5uo4sfDRLJCqtqtoywfQBsNI3iH03 55O9Ug0jsc+EgothT8udIXfbZCFns5j+WjHZ5kaiDxLhQvc78+Kw9PWv+g3qIt5z yC6Z7iL2WkTcKZpnk/Z/9tEdoPgaaYtlHmha9Dd3pbhv6QudNzcDeNWT8wLvqQP6 A= 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=fm3; bh=NjyVR8 2TRAtiqtrrWuIeeu19fXa3xYrMlP5N1uYxGrU=; b=lkLnDd4hS4IQA+p1TX5C21 0iyCaj4TCOxscm9anBamcK9LxZArm8XiLCxZMo0Soq8YFstCjEwqBqMjzYsaC0FP 8qhyk/PYVGNlqvb/o7gfMPj3lLGOkDGTs3XBeAn4RFuHuKt1BPSSXD/ZGr4PXbsh bhjssz5Qx72487/Ks0TV0YnBnQEuKnpTTp36HbZHaHMT/MVsxRJ8+L2DjiTACpxu Ysu03sMXAc6AKEbiPh46mk6jaM03qFaYQaidqg4Ax1bLTpvus9uO8YXbOifEarri +FlUbWKimNy9RMLx6rZGwiX08bUkbKMLsWy2Jkwtoh7Y1eS8eswAOEqaRFChhzlQ == X-ME-Proxy: 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 95E9410324; Wed, 4 Jul 2018 03:33:50 -0400 (EDT) From: Thomas Monjalon To: "Zhang, Qi Z" Cc: "dev@dpdk.org" , "Burakov, Anatoly" , "Ananyev, Konstantin" , "Richardson, Bruce" , "Yigit, Ferruh" , "Shelton, Benjamin H" , "Vangati, Narender" , gaetan.rivet@6wind.com Date: Wed, 04 Jul 2018 09:33:49 +0200 Message-ID: <3322666.pe3fEbMk70@xps> In-Reply-To: <039ED4275CED7440929022BC67E7061153249D11@shsmsx102.ccr.corp.intel.com> References: <20180607123849.14439-1-qi.z.zhang@intel.com> <6685892.NTdOAgpAes@xps> <039ED4275CED7440929022BC67E7061153249D11@shsmsx102.ccr.corp.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v8 03/19] ethdev: enable hotplug on multi-process 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, 04 Jul 2018 07:33:56 -0000 04/07/2018 04:26, Zhang, Qi Z: > From: Thomas Monjalon [mailto:thomas@monjalon.net] > > 03/07/2018 23:57, Thomas Monjalon: > > > 03/07/2018 17:03, Zhang, Qi Z: > > > > From: Thomas Monjalon [mailto:thomas@monjalon.net] > > > > > 03/07/2018 14:59, Zhang, Qi Z: > > > > > > > > +do_eth_dev_attach(const char *devargs, uint16_t *port_id); > > > > > > > > > > > > > > So you are duplicating rte_eth_dev_attach which is flawed in > > > > > > > its design and should be deprecated... > > > > > > > > > > > > OK, just to know this, but I guess it will not be the issue, if > > > > > > we move the dev > > > > > sync mechanism into eal layer in future right? > > > > > > > > > > Future is now :) > > > > > We must stop mixing devargs and port id in the same layer. > > > > > > > > Ok, is there any RFC I can learn? > > > > > > RFC for what? > > > It is just a design issue that we must stop propagating. > > > > Please read at this commit, which is 2 years old: > > http://git.dpdk.org/dpdk/commit/?id=b0fb26685570 > > It was starting to fix early design mistakes, but unfortunately it is not yet totally > > fixed today. > > OK, rte_eth_dev_attach is going to be deprecated. > Do you mean we will use rte_eal_hotplug_add to attach a device directly, > then the device driver will be responsible for propagating all the ethdev port, > and application could register callback for RTE_ETH_EVENT_NEW to know new ports are created, > is that correct? Exact! All what you describe is already implemented. To make it clear, EAL and ethdev must stay 2 separate layers. The bridge between these 2 layers is done only by PMDs. > > > > > > > As you may have noticed, rte_eth_dev_attach() is calling > > > > > > > rte_eal_hotplug_add() which manages the EAL device. > > > > > > > It is wrong because the relation between an ethdev port and an > > > > > > > EAL device is not a 1:1 mapping. > > > > > > > We must manage the ethdev port as one of the possible > > > > > > > abstractions of a device represented by rte_device.