nvme: Don't use spdk/config.h in spdk/nvme.h

Some definitions in spdk/nvme.h were hidden behind a CONFIG
that other libraries can't compile against a "clean" SPDK
repository's headers because spdk/config.h is missing. Just
remove the use of that #define from the header. That means the
RDMA stuff is declared, but it is never called and never
implemented when RDMA is off, so it is just stripped out by
the linker anyway.

Change-Id: I72ce4902eb327fc4a893ba78503fe0f9c6f6ee3f
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/463245
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
Ben Walker 2019-07-25 15:20:47 -07:00
parent 6d4f580e79
commit e10fc6ea00
2 changed files with 1 additions and 8 deletions

View File

@ -44,7 +44,6 @@
extern "C" {
#endif
#include "spdk/config.h"
#include "spdk/env.h"
#include "spdk/nvme_spec.h"
#include "spdk/nvmf_spec.h"
@ -2372,7 +2371,6 @@ void spdk_nvme_qpair_print_command(struct spdk_nvme_qpair *qpair,
void spdk_nvme_qpair_print_completion(struct spdk_nvme_qpair *qpair,
struct spdk_nvme_cpl *cpl);
#ifdef SPDK_CONFIG_RDMA
struct ibv_context;
struct ibv_pd;
struct ibv_mr;
@ -2418,8 +2416,6 @@ struct spdk_nvme_rdma_hooks {
*/
void spdk_nvme_rdma_init_hooks(struct spdk_nvme_rdma_hooks *hooks);
#endif
#ifdef __cplusplus
}
#endif

View File

@ -922,7 +922,6 @@ void
spdk_nvmf_transport_poll_group_free_stat(struct spdk_nvmf_transport *transport,
struct spdk_nvmf_transport_poll_group_stat *stat);
#ifdef SPDK_CONFIG_RDMA
/**
* \brief Set the global hooks for the RDMA transport, if necessary.
*
@ -935,9 +934,7 @@ spdk_nvmf_transport_poll_group_free_stat(struct spdk_nvmf_transport *transport,
*
* \param hooks for initializing global hooks
*/
void
spdk_nvmf_rdma_init_hooks(struct spdk_nvme_rdma_hooks *hooks);
#endif
void spdk_nvmf_rdma_init_hooks(struct spdk_nvme_rdma_hooks *hooks);
#ifdef __cplusplus
}