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 542EE45DAB; Tue, 26 Nov 2024 16:28:17 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0DAD940268; Tue, 26 Nov 2024 16:28:17 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.16]) by mails.dpdk.org (Postfix) with ESMTP id 0D7534025F for ; Tue, 26 Nov 2024 16:28:14 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1732634895; x=1764170895; h=date:from:to:cc:subject:message-id:references: content-transfer-encoding:in-reply-to:mime-version; bh=Usr319gdzAmXI+fWldZoR8N0yJbOJ1d31d9muGjg3J0=; b=ZEOWJg/tNCGEtvG3v3DkeVJTFDwLGH2OLvJEXymAan7po0EKcww71kGy QI2yZtW5/fBIgBzWLRRc34QrFhBTei0AHXNh4PNSoKo2X5UgPLDoJ+OiX h36jOeu1yW47XWgTBg5knUQFRUIMLIGfSkBMMwi7BBPgGLFohJ8eMYV7M +9b4ds5b2tfGl6jxoD5OvhxKFjvIyUfwTVh3GzgBjnD02WXWmbissvSDx B3yd0/2QJEcNr1RyG3bzY1KFZCjT4hRVJmBc8iTkW3In+NJoBohSbf0rZ ODu88UgeTN/YO3J7zHbVxA/g78BuATaaVykoQVqgWRLkk56YIFWEOqlfB A==; X-CSE-ConnectionGUID: sln4dsBGS5uQ/VvzC0sINw== X-CSE-MsgGUID: XCkXh2WqRlGx0FcBpSgUnQ== X-IronPort-AV: E=McAfee;i="6700,10204,11268"; a="32949560" X-IronPort-AV: E=Sophos;i="6.12,186,1728975600"; d="scan'208";a="32949560" Received: from fmviesa006.fm.intel.com ([10.60.135.146]) by orvoesa108.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Nov 2024 07:28:14 -0800 X-CSE-ConnectionGUID: mGMmgWGnQFGGT3Gln+JWLg== X-CSE-MsgGUID: lu9y+yQoR5W2fVfXJo7RTw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,186,1728975600"; d="scan'208";a="91265407" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by fmviesa006.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 26 Nov 2024 07:28:12 -0800 Received: from orsmsx601.amr.corp.intel.com (10.22.229.14) by ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Tue, 26 Nov 2024 07:28:11 -0800 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Tue, 26 Nov 2024 07:28:11 -0800 Received: from NAM02-DM3-obe.outbound.protection.outlook.com (104.47.56.41) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Tue, 26 Nov 2024 07:28:10 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=T1js7hOhZDN0lJnIrUF8RysRHnGnM5UHgTkFb8hm8FGwJRqqXI0lerSjCSKhfX3kJswmcHeI9Mh5e8OmBYtwYOjBFNgUtXaDGV8Dxz+MptJz0iNNgLO2R8n5P4XPjboI3cmRgHHLB7OXb+ypYzpL6KExxK3emY+zUnV81013Hq5DD4rWHbXH3FhGFjnSXSFkuaOeU11Ut+pVBOi+Xq5N1ftf84KynmQ2nJtgg9g9/Xyi4utgWp6WciJe3AoPOsoW7BEFkoKYL7OvSpGeDrD2wZtwgIRuyJnP58R5/PZsawOsq85gDdXVw7BKqeXrDKaXuDa34M9ChJveG8YDZA8XlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=IbhvPqBsjXDpAjDEI3HJCzE9VWOFBA9Ma47ApYncHeY=; b=Sahi4TRkKa/2O1LFn1nfXA0QcAyBTP9SBlrKGWG13BU2Rd/hwwnq6EtNYW3keCDhrKBLcL9bN90SLz9nAaP9qvVRxYQNF5UCwvYYFBIkv2m3aU3RHlI2QEaqD286YpnAfLdKQA9CiwLFzBNhsA8fAux5Hp1eUyXyTccFhnQw2/hu0snrW0FwAVTehPavintEPtR4SWnrk/xMTR3czWvC2DMfbr1n352Zcasr2amVxph4FklCtzAI37iWKKJZYaL72q4EcVPfh86xg1YGp550VIDsVXbDUiQg3vz/jPviyWQQKUQVN58ejvOJCtZL3Tvae0J1hlPKiXFa09GCc5Y5HA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) by CO1PR11MB5073.namprd11.prod.outlook.com (2603:10b6:303:92::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8182.21; Tue, 26 Nov 2024 15:28:04 +0000 Received: from DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::f120:cc1f:d78d:ae9b]) by DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::f120:cc1f:d78d:ae9b%4]) with mapi id 15.20.8093.018; Tue, 26 Nov 2024 15:28:04 +0000 Date: Tue, 26 Nov 2024 15:27:58 +0000 From: Bruce Richardson To: Thomas Monjalon CC: David Marchand , Subject: Re: [RFC PATCH 00/21] Reduce code duplication across Intel NIC drivers Message-ID: References: <20241122125418.2857301-1-bruce.richardson@intel.com> <4660096.iZASKD2KPV@thomas> Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <4660096.iZASKD2KPV@thomas> X-ClientProxiedBy: LO4P123CA0558.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:33b::14) To DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR11MB7309:EE_|CO1PR11MB5073:EE_ X-MS-Office365-Filtering-Correlation-Id: fd5aace8-b42a-4a35-99de-08dd0e2eeb9d X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|376014; X-Microsoft-Antispam-Message-Info: =?utf-8?B?ZjE1Y2s4VjVZMVdJbnlEOUtkN3ByMSs4dlpUclR3K3VUOGhSWGI0ZjQraVo2?= =?utf-8?B?QnFhMEFTaHlJS0NHbm43QlJSai8xRHF3LzdabnJydEtWWHRuNWFYTitiazRS?= =?utf-8?B?RURCZWh6eHZGMXlwUDZFZDdGcS9VVHozQnRKUWpUQkpsR1gzR3l5MGEwMnVK?= =?utf-8?B?M1hoQTVpNmxPbjlwKzdzU3EyU3NsSnRxa1V2dHNZYi94cGlXdTBYdGE2TmFs?= =?utf-8?B?Z05wZElBRitDWjd6Q2p4UHpoRnd2QSs4TEZBNms1dkVCT1hzM2FIZDNPd3ZM?= =?utf-8?B?aStKY2ZnZ3FaWDJCc1VBWmk4VGVYeUgzUEtjeGxXQWl5NVhjOVhIU3JFSTk3?= =?utf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MzA4eXZJMmNmWEVCaFJuUmwzTzdL?= =?utf-8?B?OE1DNHg2TGpRU2k3dG1BTGE0Z0FlUHRjNEREeEpRbzlWZ3FQRk0vS0k0ZVFw?= =?utf-8?B?Y0xLdTRMcVFnNjhXRWlSZzU0V2FQR2RFa0czM0oweTRERzBqc05ob0R5V0hV?= =?utf-8?B?dExHWWd5Y2lpeEpaTGdHQlZkNkMwUUVBWWFiU2p1OFV1NXU1TXJlb2xKTFVU?= =?utf-8?B?RjRQeUtqR1pmWm93VHB2VHlBZ3BXUWVKM0NVSVBSMm9YcmFwZ1BQeGFDYzdq?= =?utf-8?B?TDZQVmFiUEtnVTNEWDZrcnFHSzlzdk1rUWNvSmNDbDhEUThsVTZrVUtBamVs?= =?utf-8?B?MHZYYUJSM2xoTmZKZTFuc2t5WTVOSVc3alZ4U0xpWTQ3Y3BlTGkzTkhrNDhL?= =?utf-8?B?QlE4L1hMTkNKMk1iOW8ycHgyQzBTNnUyNTRSazFMbWEvdHBhQkNhZmtaUStB?= =?utf-8?B?aGF1YWlBcUJRNVFRMXlqWDlqZDg1a3MwRFhsU1o5SW1LOGQ0blExTE5ScmxT?= =?utf-8?B?L2VtSTVzcVhvSitKVjdTV0s3cVBtN2U0aEc2akNObHV1VFV1Zi8rNHEyTWM1?= =?utf-8?B?WlVQVnhDOEVMOUdLZzQ0dz09?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DS0PR11MB7309.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(1800799024)(366016)(376014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?dk0wU1JkazUzMHlqMUc1d0RHYTdibEZJa1dwMXdEcThPM21LUnlBUFBxMUla?= =?utf-8?B?VkVlZ2tDSFZDQXp2Z3RGbzFpanZaajZ0bmJiZTdvYVQwWHd6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HTTNpK09oRWZ0N0taRW9PMjdBeWIx?= =?utf-8?B?a25jZitmZlpha3B3eWFIN0UxLzJMZVFxbG9XdzRSUk5CamNpdlZXbVRGU1Ew?= =?utf-8?B?UmMwMnJ2YWxTbFV2cjRCUkNxVlBRSnlyYmFpbUwvbHE4WEpMZ0lITUNXd2Vy?= =?utf-8?B?cFZnbS9TcUhsTkE1dXF1MjB1ejVENVdKZzBNSWtPTlNNMXo1QWhXak9kTEty?= =?utf-8?B?VzcxV1ZybUhSRFJDQkNvOWQ1dFRkMjBhT2pLV2NkVnp5SUExNVdpd0xsOE5D?= =?utf-8?B?S2c9PQ==?= X-MS-Exchange-CrossTenant-Network-Message-Id: fd5aace8-b42a-4a35-99de-08dd0e2eeb9d X-MS-Exchange-CrossTenant-AuthSource: DS0PR11MB7309.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Nov 2024 15:28:04.2470 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: IFjzok470oZN24FwolhCquXbd2zmy7+HypS2iYVWSzEnskaE/XaHShon14bvkJNwVcRxG7JPgl0bFeg1i8saRv6hO/36KAzSaEb0MHSyi10= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR11MB5073 X-OriginatorOrg: intel.com 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 On Tue, Nov 26, 2024 at 03:57:42PM +0100, Thomas Monjalon wrote: > 25/11/2024 17:31, Bruce Richardson: > > On Mon, Nov 25, 2024 at 05:25:47PM +0100, David Marchand wrote: > > > Hello Bruce, > > > > > > On Fri, Nov 22, 2024 at 1:54 PM 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. > > > > > > Thanks for starting this effort! > > > > > > > > > > > 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 the > > > > "net" folder? > > > > > > 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. > > > > > > 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/). > > > > > > > > > For now, I prefer the second proposition and have this code hosted in > > > drivers/net/. > > > > > 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 keep it there. > In any choice you do, you will have to maintain some restrictions on the content due to the location. > Yes, good point. However, that would only apply if the common code was being built into a separate component to be linked into the other components using it. The initial prototype work has resulted in header files only, and my thinking was that even if .c files are added, they would not be compiled into a .a file, but rather compiled as source into each individual driver using them. This would allow for a certain amount of ifdef usage, for example, where things may have slight differences. However, I think we cross that bridge when we come to it. /Bruce