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 A6B89A0562; Wed, 14 Apr 2021 19:45:16 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8FD7B161BFB; Wed, 14 Apr 2021 19:45:16 +0200 (CEST) Received: from new3-smtp.messagingengine.com (new3-smtp.messagingengine.com [66.111.4.229]) by mails.dpdk.org (Postfix) with ESMTP id 6DFFF4013F for ; Wed, 14 Apr 2021 19:45:15 +0200 (CEST) Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailnew.nyi.internal (Postfix) with ESMTP id B4F68580819; Wed, 14 Apr 2021 13:45:14 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute7.internal (MEProxy); Wed, 14 Apr 2021 13:45:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; s=fm3; bh=jQRCmkOLjTOz9/IeNhGHnqNOt4 Vt1R74nJA+IlQNivE=; b=YkfPUrprQ2lH4JNPHrz5h7oYJHUGOsslT5WtOw61K7 VzGA6fpwtrDmLt9xcoLdl3QvzQd/N9J9zPExYixVg80Tpf3DUdORTeDd1fy9IinT +z5AnknxpFDNYtTUnA/sJSrgunGEpbfPHjj6/Sz+22IGVPjmt9N/R4R4c2Exh2mx luZOrmnwNbF9XpU0WLEquqaGAec/hdMa1c9Ldv/WO/9sXJ/imaVX63odxNJ4BYhi xKZdJq3QdyXBAgWzmUMnkOAs5gnvm4yfyrdtBQgiN5CWLfxRrFGw7jDxRDtS5SER RrO+TLSwjKSZi4GriICqbAVk6UNsZrOap+aeSH6bXQRw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :message-id:mime-version:subject:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=jQRCmkOLjTOz9/IeN hGHnqNOt4Vt1R74nJA+IlQNivE=; b=PIy8vfks/QjbbCB9EAfgWoTP1cC7ltRYg QrN5WRqgr0ygMvLY84eLpfzT7Y8pzg4MXvo2tmt+GqvjT72EO9rv0TIA7rWwXJ5x EEK+4zKPgCQScw1YdrCt8/JwzVMxlaLV5zYS17jk6UALEtob8M3zhkm+9T58GRd0 yQZbloTt6kXprojqZ5B8/g+8R6ehJZLPgO2PuALU410r6mR8QLtFvJePo/IFc91e SxVx38y9zIAUguX1o2b7KMyf+xabdMjsF4rei4KE8ac1dFACr0pS0bXpT57dkrcp KRr0gof4XVMKQcraYSF84oa8qJNOAgtuS0oyYj9UjZ1pFwjjQ4PoQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrudeluddguddujecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvffufffkofgggfestdekredtredttdenucfhrhhomhepvfhhohhmrghs ucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucggtf frrghtthgvrhhnpedvledvudehvdduudevuedvveehgeduleegiefgjeehudehtddtgedu ffejiefhgfenucfkphepjeejrddufeegrddvtdefrddukeegnecuvehluhhsthgvrhfuih iivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepthhhohhmrghssehmohhnjhgrlhho nhdrnhgvth X-ME-Proxy: Received: from xps.monjalon.net (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id E276924005A; Wed, 14 Apr 2021 13:45:10 -0400 (EDT) From: Thomas Monjalon To: dev@dpdk.org Cc: Hemant Agrawal , Sachin Saxena , Rosen Xu , Stephen Hemminger , Long Li , Jay Zhou , Gaetan Rivet , Matan Azrad , Shahaf Shuler , Tianfei zhang , Radha Mohan Chintakuntla , Veerasenareddy Burru , Anatoly Burakov , Nicolas Chautru , Ferruh Yigit , Andrew Rybchenko , Maxime Coquelin , Chenbo Xia Date: Wed, 14 Apr 2021 19:43:37 +0200 Message-Id: <20210414174338.657891-1-thomas@monjalon.net> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH] eal: remove useless bus API includes 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 Sender: "dev" The file rte_bus.h was included in too many files. The enum rte_iova_mode is moved from rte_bus.h to rte_eal.h because it is not specific to the bus layer. It allows to clean-up more includes of rte_bus.h. Some indirect includes had to be added in few files to compensate. Signed-off-by: Thomas Monjalon --- app/test-compress-perf/comp_perf_options.h | 2 ++ drivers/bus/dpaa/dpaa_bus.c | 1 - drivers/bus/fslmc/fslmc_bus.c | 1 - drivers/bus/fslmc/fslmc_vfio.c | 1 - drivers/bus/ifpga/ifpga_common.c | 1 - drivers/bus/ifpga/rte_bus_ifpga.h | 1 - drivers/bus/pci/linux/pci.c | 1 - drivers/bus/pci/pci_common.c | 1 - drivers/bus/vdev/vdev_params.c | 1 - drivers/bus/vmbus/linux/vmbus_uio.c | 1 - drivers/bus/vmbus/rte_bus_vmbus.h | 1 + drivers/bus/vmbus/vmbus_bufring.c | 1 - drivers/bus/vmbus/vmbus_channel.c | 1 - drivers/bus/vmbus/vmbus_common.c | 1 - drivers/bus/vmbus/vmbus_common_uio.c | 1 - drivers/crypto/virtio/virtio_pci.c | 1 - drivers/net/failsafe/failsafe.c | 1 + drivers/net/failsafe/failsafe_eal.c | 1 + drivers/net/mlx4/mlx4_ethdev.c | 1 + drivers/raw/ifpga/ifpga_rawdev.c | 1 - drivers/raw/octeontx2_dma/otx2_dpi_rawdev.c | 1 - drivers/raw/octeontx2_ep/otx2_ep_enqdeq.c | 1 - drivers/raw/octeontx2_ep/otx2_ep_rawdev.c | 1 - examples/multi_process/hotplug_mp/commands.c | 1 + lib/librte_bbdev/rte_bbdev.h | 1 - lib/librte_eal/common/hotplug_mp.c | 1 + lib/librte_eal/common/hotplug_mp.h | 1 - lib/librte_eal/include/rte_bus.h | 14 -------------- lib/librte_eal/include/rte_devargs.h | 3 ++- lib/librte_eal/include/rte_eal.h | 15 ++++++++++++++- lib/librte_eal/include/rte_lcore.h | 4 ++++ lib/librte_ethdev/rte_ethdev.c | 1 + lib/librte_pci/rte_pci.c | 1 - lib/librte_vhost/vhost_user.c | 1 + 34 files changed, 30 insertions(+), 37 deletions(-) diff --git a/app/test-compress-perf/comp_perf_options.h b/app/test-compress-perf/comp_perf_options.h index 0b777521c5..57dd146330 100644 --- a/app/test-compress-perf/comp_perf_options.h +++ b/app/test-compress-perf/comp_perf_options.h @@ -5,6 +5,8 @@ #ifndef _COMP_PERF_OPS_ #define _COMP_PERF_OPS_ +#include + #define MAX_LIST 32 #define MIN_COMPRESSED_BUF_SIZE 8 #define EXPANSE_RATIO 1.1 diff --git a/drivers/bus/dpaa/dpaa_bus.c b/drivers/bus/dpaa/dpaa_bus.c index 173041c026..98ff68c97c 100644 --- a/drivers/bus/dpaa/dpaa_bus.c +++ b/drivers/bus/dpaa/dpaa_bus.c @@ -30,7 +30,6 @@ #include #include #include -#include #include #include diff --git a/drivers/bus/fslmc/fslmc_bus.c b/drivers/bus/fslmc/fslmc_bus.c index 26910ac01f..05967512c8 100644 --- a/drivers/bus/fslmc/fslmc_bus.c +++ b/drivers/bus/fslmc/fslmc_bus.c @@ -9,7 +9,6 @@ #include #include -#include #include #include #include diff --git a/drivers/bus/fslmc/fslmc_vfio.c b/drivers/bus/fslmc/fslmc_vfio.c index c8373e627a..9fc0e01115 100644 --- a/drivers/bus/fslmc/fslmc_vfio.c +++ b/drivers/bus/fslmc/fslmc_vfio.c @@ -29,7 +29,6 @@ #include #include #include -#include #include #include "rte_fslmc.h" diff --git a/drivers/bus/ifpga/ifpga_common.c b/drivers/bus/ifpga/ifpga_common.c index 78e2eaee4e..223660d6ff 100644 --- a/drivers/bus/ifpga/ifpga_common.c +++ b/drivers/bus/ifpga/ifpga_common.c @@ -14,7 +14,6 @@ #include #include -#include #include #include #include diff --git a/drivers/bus/ifpga/rte_bus_ifpga.h b/drivers/bus/ifpga/rte_bus_ifpga.h index b43084155a..bb9432a54e 100644 --- a/drivers/bus/ifpga/rte_bus_ifpga.h +++ b/drivers/bus/ifpga/rte_bus_ifpga.h @@ -15,7 +15,6 @@ extern "C" { #endif /* __cplusplus */ -#include #include #include #include diff --git a/drivers/bus/pci/linux/pci.c b/drivers/bus/pci/linux/pci.c index 0dc99e9cb2..ff4ca1aa41 100644 --- a/drivers/bus/pci/linux/pci.c +++ b/drivers/bus/pci/linux/pci.c @@ -6,7 +6,6 @@ #include #include -#include #include #include #include diff --git a/drivers/bus/pci/pci_common.c b/drivers/bus/pci/pci_common.c index 30630809bb..74f58c8037 100644 --- a/drivers/bus/pci/pci_common.c +++ b/drivers/bus/pci/pci_common.c @@ -13,7 +13,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/bus/vdev/vdev_params.c b/drivers/bus/vdev/vdev_params.c index 6f74704d1c..02a6b534bb 100644 --- a/drivers/bus/vdev/vdev_params.c +++ b/drivers/bus/vdev/vdev_params.c @@ -5,7 +5,6 @@ #include #include -#include #include #include diff --git a/drivers/bus/vmbus/linux/vmbus_uio.c b/drivers/bus/vmbus/linux/vmbus_uio.c index b52ca5bf1d..8ce4207374 100644 --- a/drivers/bus/vmbus/linux/vmbus_uio.c +++ b/drivers/bus/vmbus/linux/vmbus_uio.c @@ -12,7 +12,6 @@ #include #include -#include #include #include #include diff --git a/drivers/bus/vmbus/rte_bus_vmbus.h b/drivers/bus/vmbus/rte_bus_vmbus.h index 4cf73ce815..00fa357ff6 100644 --- a/drivers/bus/vmbus/rte_bus_vmbus.h +++ b/drivers/bus/vmbus/rte_bus_vmbus.h @@ -28,6 +28,7 @@ extern "C" { #include #include #include +#include #include #include diff --git a/drivers/bus/vmbus/vmbus_bufring.c b/drivers/bus/vmbus/vmbus_bufring.c index c4aa07b307..c78619dc44 100644 --- a/drivers/bus/vmbus/vmbus_bufring.c +++ b/drivers/bus/vmbus/vmbus_bufring.c @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/bus/vmbus/vmbus_channel.c b/drivers/bus/vmbus/vmbus_channel.c index f67f1c438a..508cd955a9 100644 --- a/drivers/bus/vmbus/vmbus_channel.c +++ b/drivers/bus/vmbus/vmbus_channel.c @@ -12,7 +12,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/bus/vmbus/vmbus_common.c b/drivers/bus/vmbus/vmbus_common.c index 39b3308577..1b3be86700 100644 --- a/drivers/bus/vmbus/vmbus_common.c +++ b/drivers/bus/vmbus/vmbus_common.c @@ -11,7 +11,6 @@ #include #include -#include #include #include #include diff --git a/drivers/bus/vmbus/vmbus_common_uio.c b/drivers/bus/vmbus/vmbus_common_uio.c index 8582e32c1d..d283f286dc 100644 --- a/drivers/bus/vmbus/vmbus_common_uio.c +++ b/drivers/bus/vmbus/vmbus_common_uio.c @@ -13,7 +13,6 @@ #include #include #include -#include #include #include "private.h" diff --git a/drivers/crypto/virtio/virtio_pci.c b/drivers/crypto/virtio/virtio_pci.c index ae069794a6..95a43c8801 100644 --- a/drivers/crypto/virtio/virtio_pci.c +++ b/drivers/crypto/virtio/virtio_pci.c @@ -10,7 +10,6 @@ #endif #include -#include #include "virtio_pci.h" #include "virtqueue.h" diff --git a/drivers/net/failsafe/failsafe.c b/drivers/net/failsafe/failsafe.c index e3bda0df2b..57ed41c1b7 100644 --- a/drivers/net/failsafe/failsafe.c +++ b/drivers/net/failsafe/failsafe.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include "failsafe_private.h" diff --git a/drivers/net/failsafe/failsafe_eal.c b/drivers/net/failsafe/failsafe_eal.c index cb4a2abc02..05662f037e 100644 --- a/drivers/net/failsafe/failsafe_eal.c +++ b/drivers/net/failsafe/failsafe_eal.c @@ -5,6 +5,7 @@ #include #include +#include #include "failsafe_private.h" diff --git a/drivers/net/mlx4/mlx4_ethdev.c b/drivers/net/mlx4/mlx4_ethdev.c index 783ff94dce..7fd7a91a00 100644 --- a/drivers/net/mlx4/mlx4_ethdev.c +++ b/drivers/net/mlx4/mlx4_ethdev.c @@ -32,6 +32,7 @@ #pragma GCC diagnostic error "-Wpedantic" #endif +#include #include #include #include diff --git a/drivers/raw/ifpga/ifpga_rawdev.c b/drivers/raw/ifpga/ifpga_rawdev.c index d9a46ef915..1b5f57a356 100644 --- a/drivers/raw/ifpga/ifpga_rawdev.c +++ b/drivers/raw/ifpga/ifpga_rawdev.c @@ -11,7 +11,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/raw/octeontx2_dma/otx2_dpi_rawdev.c b/drivers/raw/octeontx2_dma/otx2_dpi_rawdev.c index efdba2779b..21d98e0d62 100644 --- a/drivers/raw/octeontx2_dma/otx2_dpi_rawdev.c +++ b/drivers/raw/octeontx2_dma/otx2_dpi_rawdev.c @@ -5,7 +5,6 @@ #include #include -#include #include #include #include diff --git a/drivers/raw/octeontx2_ep/otx2_ep_enqdeq.c b/drivers/raw/octeontx2_ep/otx2_ep_enqdeq.c index d04e957d82..415c6ab7a8 100644 --- a/drivers/raw/octeontx2_ep/otx2_ep_enqdeq.c +++ b/drivers/raw/octeontx2_ep/otx2_ep_enqdeq.c @@ -7,7 +7,6 @@ #include #include -#include #include #include #include diff --git a/drivers/raw/octeontx2_ep/otx2_ep_rawdev.c b/drivers/raw/octeontx2_ep/otx2_ep_rawdev.c index b2ccdda83e..4d0e84907f 100644 --- a/drivers/raw/octeontx2_ep/otx2_ep_rawdev.c +++ b/drivers/raw/octeontx2_ep/otx2_ep_rawdev.c @@ -4,7 +4,6 @@ #include #include -#include #include #include #include diff --git a/examples/multi_process/hotplug_mp/commands.c b/examples/multi_process/hotplug_mp/commands.c index 48fd329583..0e60ac39da 100644 --- a/examples/multi_process/hotplug_mp/commands.c +++ b/examples/multi_process/hotplug_mp/commands.c @@ -8,6 +8,7 @@ #include #include #include +#include #include /**********************************************************/ diff --git a/lib/librte_bbdev/rte_bbdev.h b/lib/librte_bbdev/rte_bbdev.h index 7017124414..7e5d8d2249 100644 --- a/lib/librte_bbdev/rte_bbdev.h +++ b/lib/librte_bbdev/rte_bbdev.h @@ -33,7 +33,6 @@ extern "C" { #include #include -#include #include #include diff --git a/lib/librte_eal/common/hotplug_mp.c b/lib/librte_eal/common/hotplug_mp.c index ae6010e8f8..f8fbf358ff 100644 --- a/lib/librte_eal/common/hotplug_mp.c +++ b/lib/librte_eal/common/hotplug_mp.c @@ -8,6 +8,7 @@ #include #include #include +#include #include "hotplug_mp.h" #include "eal_private.h" diff --git a/lib/librte_eal/common/hotplug_mp.h b/lib/librte_eal/common/hotplug_mp.h index 8fcf9b52e2..066494ff27 100644 --- a/lib/librte_eal/common/hotplug_mp.h +++ b/lib/librte_eal/common/hotplug_mp.h @@ -6,7 +6,6 @@ #define _HOTPLUG_MP_H_ #include "rte_dev.h" -#include "rte_bus.h" #define EAL_DEV_MP_ACTION_REQUEST "eal_dev_mp_request" #define EAL_DEV_MP_ACTION_RESPONSE "eal_dev_mp_response" diff --git a/lib/librte_eal/include/rte_bus.h b/lib/librte_eal/include/rte_bus.h index ebacc7adc3..f59a025955 100644 --- a/lib/librte_eal/include/rte_bus.h +++ b/lib/librte_eal/include/rte_bus.h @@ -28,20 +28,6 @@ extern "C" { TAILQ_HEAD(rte_bus_list, rte_bus); -/** - * IOVA mapping mode. - * - * IOVA mapping mode is iommu programming mode of a device. - * That device (for example: IOMMU backed DMA device) based - * on rte_iova_mode will generate physical or virtual address. - * - */ -enum rte_iova_mode { - RTE_IOVA_DC = 0, /* Don't care mode */ - RTE_IOVA_PA = (1 << 0), /* DMA using physical address */ - RTE_IOVA_VA = (1 << 1) /* DMA using virtual address */ -}; - /** * Bus specific scan for devices attached on the bus. * For each bus object, the scan would be responsible for finding devices and diff --git a/lib/librte_eal/include/rte_devargs.h b/lib/librte_eal/include/rte_devargs.h index 134b44a887..be850607bc 100644 --- a/lib/librte_eal/include/rte_devargs.h +++ b/lib/librte_eal/include/rte_devargs.h @@ -22,8 +22,9 @@ extern "C" { #include #include + #include -#include +#include /** * Type of generic device diff --git a/lib/librte_eal/include/rte_eal.h b/lib/librte_eal/include/rte_eal.h index eaf6469e50..530eb74391 100644 --- a/lib/librte_eal/include/rte_eal.h +++ b/lib/librte_eal/include/rte_eal.h @@ -18,7 +18,6 @@ #include #include #include -#include #include #include @@ -32,6 +31,20 @@ extern "C" { /* Maximum thread_name length. */ #define RTE_MAX_THREAD_NAME_LEN 16 +/** + * IOVA mapping mode. + * + * IOVA mapping mode is IOMMU programming mode of a device. + * That device (for example: IOMMU backed DMA device) based + * on rte_iova_mode will generate physical or virtual address. + * + */ +enum rte_iova_mode { + RTE_IOVA_DC = 0, /* Don't care mode */ + RTE_IOVA_PA = (1 << 0), /* DMA using physical address */ + RTE_IOVA_VA = (1 << 1) /* DMA using virtual address */ +}; + /** * The type of process in a linux, multi-process setup */ diff --git a/lib/librte_eal/include/rte_lcore.h b/lib/librte_eal/include/rte_lcore.h index 1550b75da0..edf3ebd338 100644 --- a/lib/librte_eal/include/rte_lcore.h +++ b/lib/librte_eal/include/rte_lcore.h @@ -11,7 +11,11 @@ * API for lcore and socket manipulation * */ + +#include + #include +#include #include #include #include diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c index 0419500fc3..b3448527f0 100644 --- a/lib/librte_ethdev/rte_ethdev.c +++ b/lib/librte_ethdev/rte_ethdev.c @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include diff --git a/lib/librte_pci/rte_pci.c b/lib/librte_pci/rte_pci.c index c91be8b167..a304c12fae 100644 --- a/lib/librte_pci/rte_pci.c +++ b/lib/librte_pci/rte_pci.c @@ -13,7 +13,6 @@ #include #include #include -#include #include #include #include diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c index cdd46a0116..f14c070e60 100644 --- a/lib/librte_vhost/vhost_user.c +++ b/lib/librte_vhost/vhost_user.c @@ -44,6 +44,7 @@ #include #include +#include #include #include "iotlb.h" -- 2.31.1