xref: /spdk/module/event/subsystems/nvmf/event_nvmf.h (revision cc6920a4763d4b9a43aa40583c8397d8f14fa100)
1 /*-
2  *   BSD LICENSE
3  *
4  *   Copyright (c) Intel Corporation.
5  *   All rights reserved.
6  *   Copyright (c) 2021 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
7  *
8  *   Redistribution and use in source and binary forms, with or without
9  *   modification, are permitted provided that the following conditions
10  *   are met:
11  *
12  *     * Redistributions of source code must retain the above copyright
13  *       notice, this list of conditions and the following disclaimer.
14  *     * Redistributions in binary form must reproduce the above copyright
15  *       notice, this list of conditions and the following disclaimer in
16  *       the documentation and/or other materials provided with the
17  *       distribution.
18  *     * Neither the name of Intel Corporation nor the names of its
19  *       contributors may be used to endorse or promote products derived
20  *       from this software without specific prior written permission.
21  *
22  *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23  *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24  *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
25  *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
26  *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
27  *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
28  *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
29  *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
30  *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31  *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
32  *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33  */
34 
35 #ifndef NVMF_TGT_H
36 #define NVMF_TGT_H
37 
38 #include "spdk/stdinc.h"
39 
40 #include "spdk/nvmf.h"
41 #include "spdk/queue.h"
42 
43 #include "spdk_internal/init.h"
44 #include "spdk/log.h"
45 
46 #define ACCEPT_TIMEOUT_US	10000 /* 10ms */
47 
48 struct spdk_nvmf_admin_passthru_conf {
49 	bool identify_ctrlr;
50 };
51 
52 struct spdk_nvmf_tgt_conf {
53 	uint32_t acceptor_poll_rate;
54 	uint32_t conn_sched; /* Deprecated. */
55 	struct spdk_nvmf_admin_passthru_conf admin_passthru;
56 	enum spdk_nvmf_tgt_discovery_filter discovery_filter;
57 };
58 
59 extern struct spdk_nvmf_tgt_conf g_spdk_nvmf_tgt_conf;
60 
61 extern uint32_t g_spdk_nvmf_tgt_max_subsystems;
62 extern uint16_t g_spdk_nvmf_tgt_crdt[3];
63 
64 extern struct spdk_nvmf_tgt *g_spdk_nvmf_tgt;
65 
66 extern struct spdk_cpuset *g_poll_groups_mask;
67 
68 #endif
69