forked from linux-nvme/nvme-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfabrics.h
More file actions
68 lines (63 loc) · 2.23 KB
/
Copy pathfabrics.h
File metadata and controls
68 lines (63 loc) · 2.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
/* SPDX-License-Identifier: GPL-2.0-or-later */
#pragma once
/* Parsed "nvme connect"/"discover"/"connect-all" argv-style arguments. */
struct nvmf_args {
const char *subsysnqn;
const char *transport;
const char *traddr;
const char *host_traddr;
const char *host_iface;
const char *trsvcid;
const char *hostnqn;
const char *hostid;
const char *hostkey;
const char *ctrlkey;
const char *keyring;
const char *tls_key;
const char *tls_key_identity;
int queue_size;
int nr_io_queues;
int reconnect_delay;
int ctrl_loss_tmo;
int fast_io_fail_tmo;
int keep_alive_tmo;
int nr_write_queues;
int nr_poll_queues;
int tos;
long keyring_id;
long tls_key_id;
long tls_configured_key_id;
bool duplicate_connect;
bool disable_sqflow;
bool hdr_digest;
bool data_digest;
bool tls;
bool concat;
};
int fabrics_discovery(const char *desc, int argc, char **argv, bool connect);
int fabrics_connect(const char *desc, int argc, char **argv);
int fabrics_disconnect(const char *desc, int argc, char **argv);
int fabrics_disconnect_all(const char *desc, int argc, char **argv);
int fabrics_config_validate(const char *desc, int argc, char **argv);
int fabrics_config_show(const char *desc, int argc, char **argv);
int fabrics_dim(const char *desc, int argc, char **argv);
/*
* Legacy config.json/discovery.conf support -- both the explicit converter
* ("nvme config-convert", config-convert.c/.h) and the implicit fallback
* (fabrics_discovery()/fabrics_connect() auto-converting these files before
* reading the INI) go away together when legacy config support is
* eventually dropped; this section (and nvmf_convert_discovery_line() in
* fabrics.c) goes with them.
*/
struct libnvmf_config_emitter;
#define PATH_NVMF_DISC SYSCONFDIR "/nvme/discovery.conf"
#define PATH_NVMF_CONFIG SYSCONFDIR "/nvme/config.json"
#define PATH_NVMF_INI SYSCONFDIR "/nvme/nvme-fabrics.conf"
/*
* Parse one discovery.conf line (the argv-style syntax 'nvme discover'
* accepts) and add it to @emitter as a discovery controller entry. @line is
* modified in place. Returns 0 for a parsed entry, a skipped blank/comment
* line, or a malformed one; negative errno only on allocation failure.
*/
int nvmf_convert_discovery_line(struct libnvmf_config_emitter *emitter,
char *line);