From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id DBD9F45DAB; Tue, 26 Nov 2024 15:57:46 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7541540268; Tue, 26 Nov 2024 15:57:46 +0100 (CET) Received: from fhigh-a4-smtp.messagingengine.com (fhigh-a4-smtp.messagingengine.com [103.168.172.155]) by mails.dpdk.org (Postfix) with ESMTP id 704374025F for ; Tue, 26 Nov 2024 15:57:45 +0100 (CET) Received: from phl-compute-11.internal (phl-compute-11.phl.internal [10.202.2.51]) by mailfhigh.phl.internal (Postfix) with ESMTP id D98F0114008F; Tue, 26 Nov 2024 09:57:44 -0500 (EST) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-11.internal (MEProxy); Tue, 26 Nov 2024 09:57:44 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1732633064; x=1732719464; bh=v10v3UBaXe8n9Hx5RQka9IW5+aV3/mUF8QqeJff54u0=; b= py3zkMdbt2aAIgSt7r3E9PV/o6fhIpT57zakc5yeq7dmu69sr42pQTwjP/UdTiF5 YJsPaAXhsTm/enwsJar58Pro69USc1rB2veodu+spLmI6nUXoDeugIICO6Oj2Tl3 4Cr29taa7t9XtMmtxbCYAQ8WfvkzifFWN2HTdij3FpuzpkqtuKoXTF29rclUpT7X 4ysTbfM4F3dAExKRPwP2Zu1OGK7/axU2t34KQo3cEQHaa9YQbPjF/K4LoV8fQWxQ OJgGv6bM2J81xCvb0kW1ghcpmzNtYflB9FALPO7Vu5w8IaJ+TI7XWSMOM8SBMAa0 Zlp+s7nzn/E1a31yAYocBw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1732633064; x= 1732719464; bh=v10v3UBaXe8n9Hx5RQka9IW5+aV3/mUF8QqeJff54u0=; b=a SZwGel2MaFaiZU+H31TBtmR9usNjwmRVR4Q6W5jjqb11lBu16pdNj74dP7C+SXzC XQ20E8HcIalx4k25pAoU5HeWVa3p6SbnGhhNKVyVttCu66azVt4P9QZ0O4v4AoyO rcjBriAmSzSCDwgUcsjUCBIRkCHxyTKFCOASCvLPByxtxM8MiE0zKHJlIG3arWmU gEa5stwUdQbPgtFfsaelRjntiCOYfrUzRh8C75i3bEBG3up120L16v0XuYP6XLnN bbrHtEzjdTZoSdq/2bPQTqbl9M0sMO6PmQWDQsTHYCg8SZhDS9PXJcD1RKGD0SID TvvQkOQwKxKpB71FNh5mQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrgeejgdeijecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdpuffr tefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnth hsucdlqddutddtmdenucfjughrpefhvfevufffkfgjfhgggfgtsehtqhertddttdejnecu hfhrohhmpefvhhhomhgrshcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlh honhdrnhgvtheqnecuggftrfgrthhtvghrnhepgedttdeljeejgeffkeekkedtjeevtdeh vedtkeeivdeuuedvieduvdelveejueejnecuvehluhhsthgvrhfuihiivgeptdenucfrrg hrrghmpehmrghilhhfrhhomhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvthdpnhgs pghrtghpthhtohepfedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepsghruhgtvg drrhhitghhrghrughsohhnsehinhhtvghlrdgtohhmpdhrtghpthhtohepuggrvhhiugdr mhgrrhgthhgrnhgusehrvgguhhgrthdrtghomhdprhgtphhtthhopeguvghvseguphgukh drohhrgh X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 26 Nov 2024 09:57:43 -0500 (EST) From: Thomas Monjalon To: Bruce Richardson Cc: David Marchand , dev@dpdk.org Subject: Re: [RFC PATCH 00/21] Reduce code duplication across Intel NIC drivers Date: Tue, 26 Nov 2024 15:57:42 +0100 Message-ID: <4660096.iZASKD2KPV@thomas> In-Reply-To: References: <20241122125418.2857301-1-bruce.richardson@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org 25/11/2024 17:31, Bruce Richardson: > On Mon, Nov 25, 2024 at 05:25:47PM +0100, David Marchand wrote: > > Hello Bruce, > >=20 > > On Fri, Nov 22, 2024 at 1:54=E2=80=AFPM Bruce Richardson > > wrote: > > > > > > This RFC attempts to reduce the amount of code duplication across a > > > number of Intel NIC drivers, specifically: ixgbe, i40e, iavf, and ice. > >=20 > > Thanks for starting this effort! > >=20 > > > > > > The first patch extract a function from the Rx side, otherwise the > > > majority of the changes are on the Tx side, leading to a converged Tx > > > queue structure across the 4 drivers, and a large number of common > > > functions. > > > > > > Open question: > > > * How should common code across drivers within a single device class = be > > > managed? > > > - For now, I've created an "intel_eth" folder within the "common" > > > driver directory, thinking about it after, it implies to me that > > > it is common across driver classes. > > > - Would it be better to create an "intel_common" directory within t= he > > > "net" folder? > >=20 > > common/ drivers currently host code that is device class agnostic, > > like providing helpers to talk with hw. > > No common/ driver has a dependency on some device class library. > >=20 > > This series adds code that is not built into a library so there is no > > need to express dependencies in meson. > > But if the need arises, could it become a problem? (adding a > > dependency to lib/ethdev to some drivers/common/xx/). > >=20 > >=20 > > For now, I prefer the second proposition and have this code hosted in > > drivers/net/. > >=20 > Thanks for the feedback. While when I started this prototyping I felt that > common was the right place for it, at this point I'm now tending towards > this second location - keeping it in net. > Any other thoughts on the relative merits of the various locations? We just need to know in which order building the common directory. It can be before bus drivers or later, but you cannot have bus common code, and some ethdev code at the same time. If you just want to share code inside drivers/net/, I suppose it is OK to k= eep it there. In any choice you do, you will have to maintain some restrictions on the co= ntent due to the location.