From e03861f138787f30dbedad4bb9c09475b87c5778 Mon Sep 17 00:00:00 2001 From: Darek Stojaczyk Date: Thu, 27 Feb 2020 14:38:02 +0100 Subject: [PATCH] memory.h: move to public headers There's no reason not to publish those. Especially if they're needed in other public headers. Change-Id: I7dfc6922fcc0dfc46822ad8a16a375f997b98e84 Signed-off-by: Darek Stojaczyk Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1041 Tested-by: SPDK CI Jenkins Reviewed-by: Aleksey Marchuk Reviewed-by: Ben Walker Reviewed-by: Shuhei Matsumoto --- include/{spdk_internal => spdk}/memory.h | 6 +++--- lib/env_dpdk/memory.c | 2 +- lib/ioat/ioat.c | 2 +- lib/nvme/nvme_internal.h | 2 +- lib/vhost/rte_vhost_compat.c | 2 +- lib/vhost/vhost.c | 3 +-- lib/virtio/virtio_pci.c | 2 +- test/nvme/e2edp/nvme_dp.c | 3 +-- 8 files changed, 10 insertions(+), 12 deletions(-) rename include/{spdk_internal => spdk}/memory.h (95%) diff --git a/include/spdk_internal/memory.h b/include/spdk/memory.h similarity index 95% rename from include/spdk_internal/memory.h rename to include/spdk/memory.h index 38240568a..a2cb19669 100644 --- a/include/spdk_internal/memory.h +++ b/include/spdk/memory.h @@ -31,8 +31,8 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef SPDK_INTERNAL_MEMORY_H -#define SPDK_INTERNAL_MEMORY_H +#ifndef SPDK_MEMORY_H +#define SPDK_MEMORY_H #include "spdk/stdinc.h" @@ -57,4 +57,4 @@ extern "C" { } #endif -#endif /* SPDK_INTERNAL_MEMORY_H */ +#endif /* SPDK_MEMORY_H */ diff --git a/lib/env_dpdk/memory.c b/lib/env_dpdk/memory.c index 96daafafb..ccc6cda09 100644 --- a/lib/env_dpdk/memory.c +++ b/lib/env_dpdk/memory.c @@ -41,12 +41,12 @@ #include #include "spdk_internal/assert.h" -#include "spdk_internal/memory.h" #include "spdk/assert.h" #include "spdk/likely.h" #include "spdk/queue.h" #include "spdk/util.h" +#include "spdk/memory.h" #include "spdk/env_dpdk.h" #ifdef __FreeBSD__ diff --git a/lib/ioat/ioat.c b/lib/ioat/ioat.c index a3e9b0bcf..ccc16ce11 100644 --- a/lib/ioat/ioat.c +++ b/lib/ioat/ioat.c @@ -37,9 +37,9 @@ #include "spdk/env.h" #include "spdk/util.h" +#include "spdk/memory.h" #include "spdk_internal/log.h" -#include "spdk_internal/memory.h" struct ioat_driver { pthread_mutex_t lock; diff --git a/lib/nvme/nvme_internal.h b/lib/nvme/nvme_internal.h index 6dceb4a0f..9f0de3e73 100644 --- a/lib/nvme/nvme_internal.h +++ b/lib/nvme/nvme_internal.h @@ -50,13 +50,13 @@ #include "spdk/mmio.h" #include "spdk/pci_ids.h" #include "spdk/util.h" +#include "spdk/memory.h" #include "spdk/nvme_intel.h" #include "spdk/nvmf_spec.h" #include "spdk/uuid.h" #include "spdk_internal/assert.h" #include "spdk_internal/log.h" -#include "spdk_internal/memory.h" extern pid_t g_spdk_nvme_pid; diff --git a/lib/vhost/rte_vhost_compat.c b/lib/vhost/rte_vhost_compat.c index 24696f40f..0c3bf8ff1 100644 --- a/lib/vhost/rte_vhost_compat.c +++ b/lib/vhost/rte_vhost_compat.c @@ -42,12 +42,12 @@ #include "spdk/likely.h" #include "spdk/string.h" #include "spdk/util.h" +#include "spdk/memory.h" #include "spdk/barrier.h" #include "spdk/vhost.h" #include "vhost_internal.h" #include "spdk_internal/vhost_user.h" -#include "spdk_internal/memory.h" static inline void vhost_session_mem_region_calc(uint64_t *previous_start, uint64_t *start, uint64_t *end, diff --git a/lib/vhost/vhost.c b/lib/vhost/vhost.c index fbb1d534e..e01f5107c 100644 --- a/lib/vhost/vhost.c +++ b/lib/vhost/vhost.c @@ -37,12 +37,11 @@ #include "spdk/likely.h" #include "spdk/string.h" #include "spdk/util.h" +#include "spdk/memory.h" #include "spdk/barrier.h" #include "spdk/vhost.h" #include "vhost_internal.h" -#include "spdk_internal/memory.h" - /* Path to folder where character device will be created. Can be set by user. */ static char dev_dirname[PATH_MAX] = ""; diff --git a/lib/virtio/virtio_pci.c b/lib/virtio/virtio_pci.c index bf9d7719d..646f77c1a 100644 --- a/lib/virtio/virtio_pci.c +++ b/lib/virtio/virtio_pci.c @@ -33,12 +33,12 @@ #include "spdk/stdinc.h" +#include "spdk/memory.h" #include "spdk/mmio.h" #include "spdk/string.h" #include "spdk/env.h" #include "spdk_internal/virtio.h" -#include "spdk_internal/memory.h" struct virtio_hw { uint8_t use_msix; diff --git a/test/nvme/e2edp/nvme_dp.c b/test/nvme/e2edp/nvme_dp.c index 4bffee93a..31c68742d 100644 --- a/test/nvme/e2edp/nvme_dp.c +++ b/test/nvme/e2edp/nvme_dp.c @@ -41,8 +41,7 @@ #include "spdk/env.h" #include "spdk/crc16.h" #include "spdk/endian.h" - -#include "spdk_internal/memory.h" +#include "spdk/memory.h" #define MAX_DEVS 64