xref: /spdk/lib/nvmf/stubs.c (revision 001db1ead56b74c6a678a244477f0e688dcbbabd)
1  /* SPDX-License-Identifier: BSD-3-Clause
2   * Copyright (c) 2024 Intel Corporation
3   */
4  
5  #include "spdk/config.h"
6  #include "spdk/log.h"
7  #include "spdk/nvmf_transport.h"
8  
9  #include "nvmf_internal.h"
10  
11  #ifndef SPDK_CONFIG_HAVE_EVP_MAC
12  int
13  nvmf_qpair_auth_init(struct spdk_nvmf_qpair *qpair)
14  {
15  	return -ENOTSUP;
16  }
17  
18  void
19  nvmf_qpair_auth_destroy(struct spdk_nvmf_qpair *qpair)
20  {
21  	assert(qpair->auth == NULL);
22  }
23  
24  void
25  nvmf_qpair_auth_dump(struct spdk_nvmf_qpair *qpair, struct spdk_json_write_ctx *w)
26  {
27  }
28  
29  int
30  nvmf_auth_request_exec(struct spdk_nvmf_request *req)
31  {
32  	struct spdk_nvme_cpl *cpl = &req->rsp->nvme_cpl;
33  
34  	cpl->status.sct = SPDK_NVME_SCT_GENERIC;
35  	cpl->status.sc = SPDK_NVME_SC_INVALID_OPCODE;
36  
37  	spdk_nvmf_request_complete(req);
38  
39  	return SPDK_NVMF_REQUEST_EXEC_STATUS_ASYNCHRONOUS;
40  }
41  
42  bool
43  nvmf_auth_is_supported(void)
44  {
45  	return false;
46  }
47  
48  SPDK_LOG_REGISTER_COMPONENT(nvmf_auth)
49  #endif /* !SPDK_CONFIG_HAVE_EVP_MAC */
50  
51  #ifndef SPDK_CONFIG_RDMA
52  void
53  spdk_nvmf_rdma_init_hooks(struct spdk_nvme_rdma_hooks *hooks)
54  {
55  	SPDK_ERRLOG("spdk_nvmf_rdma_init_hooks() is unsupported: RDMA transport is not available\n");
56  	abort();
57  }
58  #endif /* !SPDK_CONFIG_RDMA */
59  
60  #ifndef SPDK_CONFIG_AVAHI
61  int
62  nvmf_publish_mdns_prr(struct spdk_nvmf_tgt *tgt)
63  {
64  	SPDK_ERRLOG("nvmf_publish_mdns_prr is supported when built with the --with-avahi option\n");
65  
66  	return -ENOTSUP;
67  }
68  
69  void
70  nvmf_tgt_stop_mdns_prr(struct spdk_nvmf_tgt *tgt)
71  {
72  }
73  
74  int
75  nvmf_tgt_update_mdns_prr(struct spdk_nvmf_tgt *tgt)
76  {
77  	return 0;
78  }
79  #endif /* !SPDK_CONFIG_AVAHI */
80