From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from dpdk.org (dpdk.org [92.243.14.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 60DC9A0526;
	Fri, 24 Jul 2020 15:54:39 +0200 (CEST)
Received: from [92.243.14.124] (localhost [127.0.0.1])
	by dpdk.org (Postfix) with ESMTP id 9582D1C01E;
	Fri, 24 Jul 2020 15:54:38 +0200 (CEST)
Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com
 [66.111.4.29]) by dpdk.org (Postfix) with ESMTP id 29E411BFE7
 for <dev@dpdk.org>; Fri, 24 Jul 2020 15:54:37 +0200 (CEST)
Received: from compute7.internal (compute7.nyi.internal [10.202.2.47])
 by mailout.nyi.internal (Postfix) with ESMTP id 91C995C0140;
 Fri, 24 Jul 2020 09:54:35 -0400 (EDT)
Received: from mailfrontend2 ([10.202.2.163])
 by compute7.internal (MEProxy); Fri, 24 Jul 2020 09:54:35 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h=
 from:to:cc:subject:date:message-id:in-reply-to:references
 :mime-version:content-transfer-encoding:content-type; s=fm1; bh=
 NAOrBQaBWA7KpS41XJN9M+xxZVbP/zr18lrD5XDZTgg=; b=d3OYPBj4F2KDjMnr
 wC6uJm6Vdl1i22n5Za9ZNMXttVS5PwOrnSImlaeeodT7I0NmEHEP4iHE56F+piXm
 1msBPTba+mt562Np8AeGKNOeElm/ZcdJ1hTTbPLF8sGks7BsWCBtcIhY3G3YTXeK
 C3a4CQ7TjM/Nh3Z1ptczcyyslqUM/9FU1R0bKqTprhj4pwbatFK70hGmZBvoTJKQ
 RrUuIcGugq8bZzZiw3ZvR7cWCdq7wLivQySQIfPqsVLm/OK+iJxW4Rnbum8xmpT0
 rJM/RHhWscMAm1eLnr4vmhbL8R5QqxhQOK5/h8R4jI+tdG8mdjfSfRot9Nsp6gpa
 sF3hzw==
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-proxy:x-me-proxy:x-me-sender:x-me-sender
 :x-sasl-enc; s=fm3; bh=NAOrBQaBWA7KpS41XJN9M+xxZVbP/zr18lrD5XDZT
 gg=; b=rGunRumQ+4sVjOUsV6i/7WaDdgJWJNg8sXsuq8F0lFrfjq+/tsrfqfBgT
 yb4dmLYSPqBkPgSj7ICjAnW0/8OfGEm/twewwlIleBrEWnDYPqSYa+WuD0LApX8b
 xwzAV31KgFe+Tccv/YVFH8cxVczyiPn5aZF+2N3QQsgvJuDcqG2DyTy/NerScMss
 KrhctoqHLLDgLhvSpZb/DIfQW9rNVo1OwFcvUNXus6JHQ7eb2EvZu/qmVInKI642
 GU4yN0X1AK/ApHmjiQmwHBbSIZz8xsOY8e7d1mB5fWTEJxOIoroQ9nU1IqgNIOux
 00qA/GnNeBoJYz97Jp+pHJYxg9Mhg==
X-ME-Sender: <xms:G-gaXyoZOz-r6M6GsPCDZ0nSAG00xRdfj58QIKRdHKcIHQQYqRBQEA>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedrheefgdejfecutefuodetggdotefrodftvf
 curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu
 uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc
 fjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhmrghs
 ucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucggtf
 frrghtthgvrhhnpedugefgvdefudfftdefgeelgffhueekgfffhfeujedtteeutdejueei
 iedvffegheenucfkphepjeejrddufeegrddvtdefrddukeegnecuvehluhhsthgvrhfuih
 iivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepthhhohhmrghssehmohhnjhgrlhho
 nhdrnhgvth
X-ME-Proxy: <xmx:G-gaXwqPc-vQTEwvU79V_EvpPn-3p_GyoIjNJ9QcgrMESC61iMwQaQ>
 <xmx:G-gaX3M7T5MXdBULuIFI-9BNduF5K-wdONNwGqiQIqcxPrW-cvwMtA>
 <xmx:G-gaXx4ODbXPwxpoTG9jV87x-91KTotOS7KOn4FUYyhdjdrPo6R9Sg>
 <xmx:G-gaX_SEH-M4u2SWCgiqTbiUb6I6J3COLd5pxdKBFyWXxxzG7QpMIg>
Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184])
 by mail.messagingengine.com (Postfix) with ESMTPA id 20D10306005F;
 Fri, 24 Jul 2020 09:54:34 -0400 (EDT)
From: Thomas Monjalon <thomas@monjalon.net>
To: Bruce Richardson <bruce.richardson@intel.com>,
 Parav Pandit <parav@mellanox.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>, "grive@u256.net" <grive@u256.net>,
 "ferruh.yigit@intel.com" <ferruh.yigit@intel.com>,
 Raslan Darawsheh <rasland@mellanox.com>, Ori Kam <orika@mellanox.com>,
 Matan Azrad <matan@mellanox.com>, "joyce.kong@arm.com" <joyce.kong@arm.com>
Date: Fri, 24 Jul 2020 15:54:33 +0200
Message-ID: <4937496.TfPSyrM900@thomas>
In-Reply-To: <AM0PR05MB4866DD854EA53813E7A16557D1770@AM0PR05MB4866.eurprd05.prod.outlook.com>
References: <20200610171728.89-2-parav@mellanox.com>
 <20200724110718.GB2305@bricha3-MOBL.ger.corp.intel.com>
 <AM0PR05MB4866DD854EA53813E7A16557D1770@AM0PR05MB4866.eurprd05.prod.outlook.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 7Bit
Content-Type: text/plain; charset="us-ascii"
Subject: Re: [dpdk-dev] [PATCH v8 03/10] drivers: relax dependency order
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>

24/07/2020 15:48, Parav Pandit:
> Hi Bruce,
> 
> > From: Bruce Richardson <bruce.richardson@intel.com>
> > Sent: Friday, July 24, 2020 4:37 PM
> > 
> > On Thu, Jul 23, 2020 at 11:09:03PM +0300, Parav Pandit wrote:
> > > From: Thomas Monjalon <thomas@monjalon.net>
> > >
> > > Drivers dependencies are evaluated in the order defined per their
> > > parent directory (also called class).
> > > This strict ordering prevent from having 2 different drivers of the
> > > same class with different dependencies ordering.
> > > This problem occurs if drivers/common/mlx5 depends on drivers/bus/pci,
> > > while drivers/bus/dpaa depends on drivers/common/dpaax.
> > > Having a strict ordering between directories bus and common is too
> > > much restrictive.
> > >
> > > That's why it is made possible to have a more fine-grain directory
> > > list, adding a driver sub-directory in the list.
> > > In this case, the isolated driver must be removed from its class list,
> > > and added directly in drivers/meson.build.
> > > Also, the per-class variables must be duplicated in the isolated
> > > driver, because the call "subdir(class)" is skipped in the isolated driver case.
> > >
> > > Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> > 
> > The commit log above has some strange word-wrapping, and occasionally
> > strange phrasing. I think it could be slightly reworded, perhaps as:
> > 
> I updated the commit log as you suggested below along with RB, ack tag.
> Thank you.
> 
> >   Drivers dependencies are evaluated in the order defined per their parent
> >   directory (also called class). This strict ordering prevents from us

Is "from us" too much?

> >   from having pairs of drivers from two classes with different dependency
> >   ordering. For example, if the mlx5 common code depends on the pci bus
> >   driver, while the dpaax common code is itself a dependency of the dpaa
> >   bus driver.  Having a strict ordering between directories bus and common
> >   is too restrictive, as processing either common drivers or bus drivers
> >   first leads us to missing dependencies in this scenario.
> > 
> >   This patch makes it possible to have a more fine-grain directory list,
> >   adding a specific driver sub-directory in the top-level drivers
> >   subdirectory list. In this case, the isolated driver must also be removed
> >   from its class list, and the per-class variables must be duplicated in
> >   the isolated driver, because the call "subdir(class)" is skipped in the
> >   isolated driver case.
> > 
> > 
> > Apart from that, I think this is a good idea to give us some flexibility in
> > managing driver ordering which should help other drivers too - perhaps QAT?
> > Ideally, though, I'd like if we can limit the flexible ordering to *only* common
> > code, in which case we could move the per-class variables for common to the
> > top-level to prevent duplication, and maybe even get rid of
> > common/meson.build completely. That, however, will depend on how much
> > this feature gets used and by whom.

For now it is used only to have common/mlx5 isolated of the rest
of common drivers, as an exception.
I think it is good to keep common/meson.build
until there are more exceptions than the rest.