Skip to content

Commit 7726169

Browse files
authored
Merge pull request #196 from hreinecke/rc-cleanup
Cleanups for release candidate
2 parents fcf7edf + 0c3978a commit 7726169

4 files changed

Lines changed: 36 additions & 76 deletions

File tree

doc/man/nvmf_add_ctrl_opts.2

Lines changed: 0 additions & 9 deletions
This file was deleted.

src/libnvme.map

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,6 @@ LIBNVME_1_0 {
312312
nvme_zns_mgmt_send;
313313
nvme_zns_report_zones;
314314
nvmf_add_ctrl;
315-
nvmf_add_ctrl_opts;
316315
nvmf_adrfam_str;
317316
nvmf_cms_str;
318317
nvmf_connect_disc_entry;

src/nvme/fabrics.c

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -553,39 +553,6 @@ static int __nvmf_add_ctrl(const char *argstr)
553553
return ret;
554554
}
555555

556-
int nvmf_add_ctrl_opts(nvme_ctrl_t c, struct nvme_fabrics_config *cfg)
557-
{
558-
nvme_subsystem_t s = nvme_ctrl_get_subsystem(c);
559-
nvme_host_t h = nvme_subsystem_get_host(s);
560-
char *argstr;
561-
int ret;
562-
563-
cfg = merge_config(c, cfg);
564-
if (traddr_is_hostname(c)) {
565-
ret = hostname2traddr(c);
566-
if (ret) {
567-
errno = -ret;
568-
return -1;
569-
}
570-
}
571-
572-
ret = build_options(h, c, &argstr);
573-
if (ret) {
574-
errno = -ret;
575-
return -1;
576-
}
577-
578-
ret = __nvmf_add_ctrl(argstr);
579-
free(argstr);
580-
if (ret < 0) {
581-
errno = -ret;
582-
ret = -1;
583-
} else {
584-
nvme_msg(LOG_INFO, "nvme%d: ctrl connected\n", ret);
585-
}
586-
return ret;
587-
}
588-
589556
int nvmf_add_ctrl(nvme_host_t h, nvme_ctrl_t c,
590557
const struct nvme_fabrics_config *cfg)
591558
{

src/nvme/fabrics.h

Lines changed: 36 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -111,34 +111,46 @@ const char *nvmf_treq_str(__u8 treq);
111111
const char *nvmf_eflags_str(__u16 eflags);
112112

113113
/**
114-
* nvmf_sectype_str() -
115-
* @sectype:
114+
* nvmf_sectype_str() - Decode SECTYPE field
115+
* @sectype: value to be decoded
116116
*
117-
* Return:
117+
* Decode the SECTYPE field in the discovery log page
118+
* entry.
119+
*
120+
* Return: decoded string
118121
*/
119122
const char *nvmf_sectype_str(__u8 sectype);
120123

121124
/**
122-
* nvmf_prtype_str() -
123-
* @prtype:
125+
* nvmf_prtype_str() - Decode RDMA Provider type field
126+
* @prtype: value to be decoded
127+
*
128+
* Decode the RDMA Provider type field in the discovery
129+
* log page entry.
124130
*
125-
* Return:
131+
* Return: decoded string
126132
*/
127133
const char *nvmf_prtype_str(__u8 prtype);
128134

129135
/**
130-
* nvmf_qptype_str() -
131-
* @qptype:
136+
* nvmf_qptype_str() - Decode RDMA QP Service type field
137+
* @qptype: value to be decoded
138+
*
139+
* Decode the RDMA QP Service type field in the discovery log page
140+
* entry.
132141
*
133-
* Return:
142+
* Return: decoded string
134143
*/
135144
const char *nvmf_qptype_str(__u8 qptype);
136145

137146
/**
138-
* nvmf_cms_str() -
139-
* @cms:
147+
* nvmf_cms_str() - Decode RDMA connection management service field
148+
* @cms: value to be decoded
149+
*
150+
* Decode the RDMA connection management service field in the discovery
151+
* log page entry.
140152
*
141-
* Return:
153+
* Return: decoded string
142154
*/
143155
const char *nvmf_cms_str(__u8 cms);
144156

@@ -150,15 +162,6 @@ const char *nvmf_cms_str(__u8 cms);
150162
*/
151163
void nvmf_default_config(struct nvme_fabrics_config *cfg);
152164

153-
/**
154-
* nvmf_add_ctrl_opts() -
155-
* @c:
156-
* @cfg:
157-
*
158-
* Return:
159-
*/
160-
int nvmf_add_ctrl_opts(nvme_ctrl_t c, struct nvme_fabrics_config *cfg);
161-
162165
/**
163166
* nvmf_add_ctrl() - Connect a controller and update topology
164167
* @h: Host to which the controller should be attached
@@ -175,12 +178,12 @@ int nvmf_add_ctrl(nvme_host_t h, nvme_ctrl_t c,
175178
const struct nvme_fabrics_config *cfg);
176179

177180
/**
178-
* nvmf_get_discovery_log() -
179-
* @c:
180-
* @logp:
181-
* @max_retries:
181+
* nvmf_get_discovery_log() - Return the discovery log page
182+
* @c: Discover controller to use
183+
* @logp: Pointer to the log page to be returned
184+
* @max_retries: maximum number of log page entries to be returned
182185
*
183-
* Return:
186+
* Return: 0 on success; on failure -1 is returned and errno is set
184187
*/
185188
int nvmf_get_discovery_log(nvme_ctrl_t c, struct nvmf_discovery_log **logp,
186189
int max_retries);
@@ -209,21 +212,21 @@ char *nvmf_hostnqn_from_file();
209212
char *nvmf_hostid_from_file();
210213

211214
/**
212-
* nvmf_connect_disc_entry() -
213-
* @h:
214-
* @e:
215-
* @defcfg:
216-
* @discover:
215+
* nvmf_connect_disc_entry() - Connect controller based on the discovery log page entry
216+
* @h: Host to which the controller should be connected
217+
* @e: Discovery log page entry
218+
* @defcfg: Default configurationn to be used for the new controller
219+
* @discover: Set to 'true' if the new controller is a discovery controller
217220
*
218-
* Return: An
221+
* Return: Pointer to the new controller
219222
*/
220223
nvme_ctrl_t nvmf_connect_disc_entry(nvme_host_t h,
221224
struct nvmf_disc_log_entry *e,
222225
const struct nvme_fabrics_config *defcfg, bool *discover);
223226

224227
/**
225228
* nvme_chomp() - Strip trailing white space
226-
* &s: String to strip
229+
* @s: String to strip
227230
* @l: Maximum length of string
228231
*/
229232
static inline void nvme_chomp(char *s, int l)

0 commit comments

Comments
 (0)