From patchwork Wed Sep 14 07:58:14 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Marchand X-Patchwork-Id: 116271 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 9AC5FA0032; Wed, 14 Sep 2022 09:59:01 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1131D40156; Wed, 14 Sep 2022 09:59:01 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 4AFE940141 for ; Wed, 14 Sep 2022 09:59:00 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1663142339; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=pKFSPG2L3xMpAiHA0dfN9Hpl1DjY0BvxiHBwrbmj+Tc=; b=ZaSpP8RGbhyinuMHXWzYwIFDKIGvTgnk0h3W3evpgIU2AM81EJHqmDEX1ET89+DEl7SH4n rU3fFNxxTLfkSFUwrJLr98+8IEwvmHgwZ9tIM2S0jLrx3IdshCZq57ixlYCbc8eK8AmbnV 3gYMRGF7QXjTeEf+0AwoNm3F5QgDDI4= 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-577-omFes_ZrNLWwYTOHUtqwIg-1; Wed, 14 Sep 2022 03:58:56 -0400 X-MC-Unique: omFes_ZrNLWwYTOHUtqwIg-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 401F3811E76; Wed, 14 Sep 2022 07:58:56 +0000 (UTC) Received: from localhost.localdomain (unknown [10.40.194.61]) by smtp.corp.redhat.com (Postfix) with ESMTP id 173D5C15BA4; Wed, 14 Sep 2022 07:58:54 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: thomas@monjalon.net, bruce.richardson@intel.com Subject: [PATCH v6 00/27] Bus and device cleanup for 22.11 Date: Wed, 14 Sep 2022 09:58:14 +0200 Message-Id: <20220914075841.51555-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 3.1 on 10.11.54.8 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 The rte_bus, rte_driver and rte_device objects are part of the public ABI and this has proved to be a problem when needing to extend them. This series hides them, 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. PCI bus specific handling are removed from testpmd, unit tests and examples. 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 first when introducing them, and later in the series marked as stable since external users will want to use those drop-in replacements right away. A check is added to ensure we won't pollute app/ and examples/ again, though some unit tests are left intentionnally untouched as they test some internals of DPDK. Changes since v5: - fixed Windows build (bis...), Changes since v4: - (hopefully, because I can't test) fixed Windows build, - dropped unneeded change in vdev unit test, Changes since RFC v3: - marked the series as non-RFC, - rebased on v22.11-rc0, - marked RTE_FUNC_PTR_* macros as deprecated, - split the bus specific patch in two patches, Changes since RFC v2: - added check for additions of include .*_(driver|pmd)\.h in apps and examples, - dropped legacy/debug testpmd commands to read PCI BAR0 registers, - dropped patches on bbdev, ethdev, rawdev driver headers for now, - reordered patches and separated changes per bus type to ease review, - added more accessor for device, - introduced rte_dev_bus_info to provide a Bus specific description of a device, a first use is for providing a PCI device vendor / device identifiers that are otherwise unavailable through a generic existing API, 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,