From patchwork Sat Jul 9 08:26:15 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Marchand X-Patchwork-Id: 113857 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id E433FA00C5; Sat, 9 Jul 2022 10:27:13 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D4B21410DD; Sat, 9 Jul 2022 10:27:13 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 7E49B40C35 for ; Sat, 9 Jul 2022 10:27:12 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1657355232; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/wu6XAdQcoW0szwCvH5ISYCyqLnIit4XLKqkC5OkuT0=; b=FnpZuDBULg+OkSRm0DkE4V4T3Y+1bgzi+T0mg0WHWnHde78XT7KxKRafcbf7cLvRiLvp5y CDe7n8Jaz70al1MGP4W3tT2V2xMPciBOOBttxKoSU/kKCOtA7sAJgBtYou69D4RRVd+QYv pmAJ3Er6pj46lK60pWjesAMWHx5kem4= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-198-_S85_NY_Mx6uklPPGtfbNg-1; Sat, 09 Jul 2022 04:26:58 -0400 X-MC-Unique: _S85_NY_Mx6uklPPGtfbNg-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 757CE8032F1 for ; Sat, 9 Jul 2022 08:26:58 +0000 (UTC) Received: from localhost.localdomain (unknown [10.40.192.194]) by smtp.corp.redhat.com (Postfix) with ESMTP id A2CEA2026D2D for ; Sat, 9 Jul 2022 08:26:57 +0000 (UTC) From: David Marchand To: dev@dpdk.org Subject: [RFC v2 v2 00/29] Bus and device cleanup for 22.11 Date: Sat, 9 Jul 2022 10:26:15 +0200 Message-Id: <20220709082644.664675-1-david.marchand@redhat.com> In-Reply-To: <20220628144643.1213026-1-david.marchand@redhat.com> References: <20220628144643.1213026-1-david.marchand@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=david.marchand@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.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 This is a PoC for hiding the rte_bus, rte_driver and rte_device objects. And mark associated driver only API as internal. A good amount of the patches are preparation work on rte_bus.h, rte_dev.h, rte_devargs.h and rte_eal.h headers, removing dependencies between them. This is something I had in store for some time, maybe I should have dropped it from the PoC, but I think those cleanups are worth it in any case. Then PCI bus specific handling are moved from unit tests and examples, though there is still a special case left in testpmd that may require a new API, to be discussed. After this series, driver-only API headers for registering to buses are not exported anymore, unless the enable_driver_sdk meson option is selected. New accessors for rte_bus, rte_driver and rte_device have been added, marked with an experimental tag though we may declare them as stable right away so that users can switch to them directly. That's also something to agree on. I simplified my series and switched to only update "external" users, like app/ and examples/ files. We need some checkpatch new checks to be sure we won't get some driver-only headers included in these areas. That's something I'll work on in the non RFC series. "Internal" users are simply using the internal headers. That helps greatly reducing the size of the changes. Disclaimer: again, in this v2, this series is a bit rushed (I brute forced compilation tests in GHA so that it passes between patches, but there still may be something broken...). Not surprisingly, the ABI check in the CI is expected to fail. Comments welcome. Changes since RFC v1: - added two more cleanups (new patch 3 and 4) for unit test and examples relying on PCI specific info, - went on with masking rte_driver and rte_device too,