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 9CF621BEB3 for ; Tue, 3 Jul 2018 16:11:24 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 00C2321E33; Tue, 3 Jul 2018 10:11:24 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Tue, 03 Jul 2018 10:11:24 -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=7qXqf4mgKVzYH53muS0SvVq2RZ /GHFF37/YcJRdiztI=; b=ZP1N9RSlxEj38iFTMnpigVdOvPRpJYL4ttyuz5FN2v tKoICkv3d9x+59DuShd025iBH60iTzR12TW0UM+4tzSLydZYVUaecsJduOukMvE3 wOBVq66zu7cA107tQMmHHnMIkmTwbK+N3BOHiV20zTuv1Rh85kJz0MDgQGJ/xP2S o= 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=7qXqf4 mgKVzYH53muS0SvVq2RZ/GHFF37/YcJRdiztI=; b=g95bVEv/yjc8bdBSIsY37W yxW1DdS1m9mvYDLsZlGVB/rI0DrC/KmZIgS8DT9UH3cOW92QPdDC8M5AcL3YU/sC 5p9397eX3TRe/u3ClgjlwVJD7U9J2W7UizEKlWRoeqchFXFqFF4YL1MpruiPoI/H Muoph99FwN03Gzx36P/l3qmPon17hSrtKNADRR7mndW8+9+OkPn/ukzFLfB0HJwq rYkitb0VCrsGOkG2f0uXzOMGsHilcoPyp/Sp1JinnPmst7zh03/DQMPmmHUZr78R 2xwYKsEWxfu3YYK/5KyCbwZUd+uaqokwO46S6DhA4WuC9wH/jIvvOMgChPrTxa3g == X-ME-Proxy: X-ME-Sender: Received: from xps.localnet (171.19.136.77.rev.sfr.net [77.136.19.171]) by mail.messagingengine.com (Postfix) with ESMTPA id 93D54E4117; Tue, 3 Jul 2018 10:11:19 -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" Date: Tue, 03 Jul 2018 16:11:14 +0200 Message-ID: <1673164.0Yk3bj6gtc@xps> In-Reply-To: <039ED4275CED7440929022BC67E7061153243483@SHSMSX103.ccr.corp.intel.com> References: <20180607123849.14439-1-qi.z.zhang@intel.com> <2271872.YPHGBAMJzT@xps> <039ED4275CED7440929022BC67E7061153243483@SHSMSX103.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: Tue, 03 Jul 2018 14:11:24 -0000 03/07/2018 14:59, Zhang, Qi Z: > > > +/** > > > + * this is a synchronous wrapper for secondary process send > > > + * request to primary process, this is invoked when an attach > > > + * or detach request issued from primary. > > > + */ > > > +int eth_dev_request_to_primary(struct eth_dev_mp_req *req); > > > + > > > +/** > > > + * this is a synchronous wrapper for primary process send > > > + * request to secondary process, this is invoked when an attach > > > + * or detach request issued from secondary process. > > > + */ > > > +int eth_dev_request_to_secondary(struct eth_dev_mp_req *req); > > > > > > Why do we need ethdev functions for IPC (mp request/response)? > > How this model can reasonnably scale to other device classes (crypto, > > compression, bbdev, eventdev, etc)? > > Yes it will be more generic to more the multi-process device sync mechanism into eal layer.(rte_eal_hotplug_add/rte_eal_hotplug_remove) > I didn't do this is I'm not very sure if all anothers kinds of device type need this, but if you think this is a good direction and we need to enable for all devices, > I think this could be our next step. BTW, I guess ethdev still need some IPC to sync port_id which is specific for itself, and other device type may have similar requirement. I don't understand what is specific to ethdev in this IPC. If it is just about a port id, I think it can be done elsewhere (EAL?) > > > --- /dev/null > > > +++ b/lib/librte_ethdev/ethdev_private.h > > > > What is the purpose of a file ethdev_private.h? You did not reply this question. > > > +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. > > 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.