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 54098271 for ; Fri, 19 Jan 2018 19:13:13 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id EB1C720B53; Fri, 19 Jan 2018 13:13:12 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute1.internal (MEProxy); Fri, 19 Jan 2018 13:13:12 -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=Hgq8JNsSjXOChZ82iZBzFkZH+Z a1kR4eiroXGHUN3jw=; b=bj4PBMkFKsiocMGZI9DWZF7OpArNr3IlsBFF081TmZ DSpkryVzNW9LqYgI1+32RWImGZeR1if5I66fj15lusfCHmSylh/nzKNR0cAcoTJ/ R0ZpUhdKcaoGjCz8P3rgjV7VozY5Az6wcNr5k1f95MB8XvVpcteKc1GtMXha/sVZ 0= 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=Hgq8JN sSjXOChZ82iZBzFkZH+Za1kR4eiroXGHUN3jw=; b=VWSeIjGuBT02Z0AczdkCUj sJQrspGr9zGv4p4D5p1BpVAzxx7HD0t1exGv+jfxhwdYtWuwEeXMbw4/veJ9EvMQ bqniOIbeh0PkdlL9865H79cUXUgWfCG2Iudv5bY2DtQv7TMZGDnWrffzyAFHPgi1 b9RWLorIDXdgRWLk+4eUP6g3SFZQSC9VDJKDhay3ybQpu1z+frs4tjt/q28TTrKY T2s5EzDJSEXLOFluTLY/h7vE/11blE7VH0j2+5JU7G+5bBv1PyDZ+d4gSpjZuKjm LMrAVx5QOq7Qt1M4JHWvdNcjhhdXlfljXcEXJUSa1eRFxtoO6I70KkNq/m+luUDQ == 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 9D76924697; Fri, 19 Jan 2018 13:13:12 -0500 (EST) From: Thomas Monjalon To: Neil Horman Cc: dev@dpdk.org, Matan Azrad , Bruce Richardson , "Ananyev, Konstantin" , Gaetan Rivet , "Wu, Jingjing" Date: Fri, 19 Jan 2018 19:12:36 +0100 Message-ID: <1959306.0b6nHJGtEC@xps> In-Reply-To: <20180119174340.GE9519@hmswarspite.think-freely.org> References: <20180118131017.GA1622@hmswarspite.think-freely.org> <7777073.qS0DmqPron@xps> <20180119174340.GE9519@hmswarspite.think-freely.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v2 2/6] ethdev: add 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: Fri, 19 Jan 2018 18:13:13 -0000 19/01/2018 18:43, Neil Horman: > On Fri, Jan 19, 2018 at 06:17:51PM +0100, Thomas Monjalon wrote: > > 19/01/2018 16:27, Neil Horman: > > > On Fri, Jan 19, 2018 at 03:13:47PM +0100, Thomas Monjalon wrote: > > > > 19/01/2018 14:30, Neil Horman: > > > > > So it seems like the real point of contention that we need to settle here is, > > > > > what codifies an 'owner'. Must it be a specific execution context, or can we > > > > > define any arbitrary section of code as being an owner? I would agrue against > > > > > the latter. > > > > > > > > This is the first thing explained in the cover letter: > > > > "2. The port usage synchronization will be managed by the port owner." > > > > There is no intent to manage the threads synchronization for a given port. > > > > It is the responsibility of the owner (a code object) to configure its > > > > port via only one thread. > > > > It is consistent with not trying to manage threads synchronization > > > > for Rx/Tx on a given queue. > > > > > > > > > > > Yes, in his cover letter, and I contend that notion is an invalid design point. > > > By codifying an area of code as an 'owner', rather than an execution context, > > > you're defining the notion of heirarchy, not ownership. That is to say, > > > you want to codify the notion that there are top level ports that the > > > application might see, and some of those top level ports are parents to > > > subordinate ports, which only the parent port should access directly. If thats > > > all you want to encode, there are far easier ways to do it: > > > > > > struct rte_eth_shared_data { > > > < existing bits > > > > struct rte_eth_port_list { > > > struct rte_eth_port_list *children; > > > struct rte_eth_port_list *parent; > > > }; > > > }; > > > > > > > > > Build an api around a structure like that, so that the parent/child relationship > > > is globally clear, and this would be much easier, especially if you want to > > > continue asserting that the notion of synchronization/exclusion is an exercise > > > left to the application. > > > > Not only Neil. > > An owner can be something else than a port. > > An owner can be an app process (multi-processes). > > An owner can be a library. > > The intent is really to solve the generic problem of which code > > is managing a port. > > > I don't see how this precludes any part of what you just said. Define the > rte_eth_port_list externally to the shared_data struct and allow any object you > want to allocate it, then anything you want to control a heirarchy of ports can > do so without issue, and the structure is far more clear than an opaque id that > carries subtle semantic ordering with it. Sorry, I don't understand. Please could you rephrase?