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 59820A056B; Tue, 28 Jun 2022 16:46:54 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0D024400D7; Tue, 28 Jun 2022 16:46:54 +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 0ABA840042 for ; Tue, 28 Jun 2022 16:46:52 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1656427612; 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; bh=pga1LF60LcJExiMMgf8WtLg6/yKDJ2fT7zY6BKiqVxI=; b=ABr/GCVaq6UFzcX1yAQGskz4ruFo/EdKbATeAwNZbhHFl28JMsiKxKlILQzoSw5+92jN2F BgDjPmnVR4fMi155WahSq42rXEmYvOSPa+7twXayGZPsUnI9u85SLSQff94GZESkg77EcS 92NM3cAYAWRgEyIjDtHNhBmPs+PoAjg= 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-407-vstAlrRfOSeD1Gia9Rsviw-1; Tue, 28 Jun 2022 10:46:51 -0400 X-MC-Unique: vstAlrRfOSeD1Gia9Rsviw-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id D5CD7811E7A; Tue, 28 Jun 2022 14:46:50 +0000 (UTC) Received: from fchome.redhat.com (unknown [10.40.194.174]) by smtp.corp.redhat.com (Postfix) with ESMTP id CC62E2166B26; Tue, 28 Jun 2022 14:46:49 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: thomas@monjalon.net, bruce.richardson@intel.com, kevin.laatz@intel.com Subject: [RFC PATCH 00/11] Bus cleanup for 22.11 Date: Tue, 28 Jun 2022 16:46:32 +0200 Message-Id: <20220628144643.1213026-1-david.marchand@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 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 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true 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 object and mark associated 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. The last two patches do the actual job: add accessors and make the rte_bus object opaque to non internal users. Disclaimer: 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. I also hope we can do the same work on other generic objects (rte_driver, rte_device), but this is another story. -- David Marchand David Marchand (11): common/mlx5: rework check on driver registration raw/ifpga: remove PCI bus accessor dev: hide debug messages in device iterator dev: move unrelated macros from header devargs: remove dependency on bus header bus: remove unneded inclusion of bus header bus: move IOVA definition from header drivers/bus: remove back reference to bus objects drivers/bus: hide specific structures bus: introduce accessors bus: hide bus object app/test-compress-perf/comp_perf_options.h | 2 + app/test-pmd/config.c | 10 +- app/test-pmd/testpmd.c | 4 +- app/test-pmd/testpmd.h | 5 +- app/test/test_devargs.c | 6 +- app/test/test_kni.c | 7 +- app/test/test_vdev.c | 1 + drivers/bus/auxiliary/auxiliary_common.c | 2 - drivers/bus/auxiliary/linux/auxiliary.c | 1 - drivers/bus/auxiliary/private.h | 30 +- drivers/bus/auxiliary/rte_bus_auxiliary.h | 5 - drivers/bus/dpaa/dpaa_bus.c | 20 +- drivers/bus/dpaa/rte_dpaa_bus.h | 14 - drivers/bus/fslmc/fslmc_bus.c | 11 +- drivers/bus/fslmc/fslmc_vfio.c | 2 +- drivers/bus/fslmc/portal/dpaa2_hw_dprc.c | 1 + drivers/bus/fslmc/private.h | 27 ++ drivers/bus/fslmc/rte_fslmc.h | 21 -- drivers/bus/ifpga/ifpga_bus.c | 2 +- drivers/bus/ifpga/ifpga_common.c | 1 - drivers/bus/ifpga/rte_bus_ifpga.h | 1 - drivers/bus/pci/bsd/pci.c | 2 - drivers/bus/pci/linux/pci.c | 3 - drivers/bus/pci/pci_common.c | 2 - drivers/bus/pci/private.h | 18 +- drivers/bus/pci/rte_bus_pci.h | 23 -- drivers/bus/pci/windows/pci.c | 1 + drivers/bus/pci/windows/pci_netuio.c | 1 + drivers/bus/vdev/vdev.c | 2 +- drivers/bus/vdev/vdev_params.c | 1 - drivers/bus/vmbus/linux/vmbus_uio.c | 1 - drivers/bus/vmbus/private.h | 18 ++ drivers/bus/vmbus/rte_bus_vmbus.h | 21 -- drivers/bus/vmbus/vmbus_bufring.c | 1 - drivers/bus/vmbus/vmbus_channel.c | 1 - drivers/bus/vmbus/vmbus_common.c | 3 - drivers/bus/vmbus/vmbus_common_uio.c | 1 - .../common/mlx5/linux/mlx5_common_auxiliary.c | 10 +- drivers/common/mlx5/mlx5_common_pci.c | 3 +- drivers/common/qat/qat_device.c | 1 + drivers/compress/qat/qat_comp_pmd.c | 1 + drivers/compress/zlib/zlib_pmd_ops.c | 1 + .../scheduler/rte_cryptodev_scheduler.c | 1 + drivers/crypto/virtio/virtio_pci.c | 1 - drivers/dma/cnxk/cnxk_dmadev.c | 1 - drivers/dma/idxd/idxd_bus.c | 2 +- drivers/net/bonding/rte_eth_bond_args.c | 1 + drivers/net/failsafe/failsafe.c | 3 +- drivers/net/failsafe/failsafe_eal.c | 3 +- drivers/net/ixgbe/rte_pmd_ixgbe.c | 1 + drivers/net/liquidio/lio_ethdev.c | 1 + drivers/net/mlx5/linux/mlx5_os.c | 3 +- drivers/net/netvsc/hn_ethdev.c | 5 +- drivers/net/vdev_netvsc/vdev_netvsc.c | 2 +- drivers/raw/ifpga/ifpga_rawdev.c | 7 +- drivers/raw/ifpga/ifpga_rawdev.h | 1 - drivers/raw/ifpga/rte_pmd_ifpga.c | 6 - drivers/raw/ifpga/rte_pmd_ifpga.h | 10 - drivers/raw/ifpga/version.map | 1 - examples/ethtool/lib/rte_ethtool.c | 4 +- examples/ip_pipeline/kni.c | 3 +- examples/multi_process/hotplug_mp/commands.c | 6 +- lib/compressdev/rte_compressdev.c | 2 + lib/compressdev/rte_compressdev_pmd.c | 1 + lib/cryptodev/cryptodev_pmd.c | 2 + lib/dmadev/rte_dmadev.c | 1 + lib/eal/common/eal_common_bus.c | 28 +- lib/eal/common/eal_common_dev.c | 15 +- lib/eal/common/eal_common_devargs.c | 14 +- lib/eal/common/eal_thread.h | 1 + lib/eal/common/hotplug_mp.c | 9 +- lib/eal/include/bus_driver.h | 295 ++++++++++++++++++ lib/eal/include/meson.build | 4 + lib/eal/include/rte_bus.h | 290 +---------------- lib/eal/include/rte_common.h | 11 + lib/eal/include/rte_dev.h | 11 - lib/eal/include/rte_devargs.h | 4 +- lib/eal/include/rte_eal.h | 15 +- lib/eal/include/rte_lcore.h | 2 + lib/eal/linux/eal_dev.c | 2 +- lib/eal/version.map | 7 +- lib/eal/windows/eal.c | 1 + lib/ethdev/ethdev_driver.c | 1 + lib/ethdev/ethdev_pci.h | 1 + lib/ethdev/rte_ethdev.c | 11 +- lib/mempool/rte_mempool_ops.c | 1 + lib/pcapng/rte_pcapng.c | 3 +- lib/regexdev/rte_regexdev.c | 1 + lib/security/rte_security.c | 1 + lib/vhost/vdpa.c | 1 + 90 files changed, 554 insertions(+), 531 deletions(-) create mode 100644 drivers/bus/fslmc/private.h create mode 100644 lib/eal/include/bus_driver.h -- 2.36.1