Skip to content

Commit 2ac0206

Browse files
authored
Merge pull request #1732 from igaw/nvme-cli-monolithic
Drop incomplete support for TP8013 and 8014
2 parents 94812af + b2e51f9 commit 2ac0206

File tree

2 files changed

+3
-15
lines changed

2 files changed

+3
-15
lines changed

fabrics.c

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ struct connect_args {
8282
char *trsvcid;
8383
char *host_traddr;
8484
char *host_iface;
85-
char *subsystype;
8685
struct connect_args *next;
8786
struct connect_args *tail;
8887
};
@@ -143,9 +142,8 @@ static inline const char *adrfam_str(__u8 adrfam)
143142
}
144143

145144
static const char * const subtypes[] = {
146-
[NVME_NQN_DISC] = "discovery subsystem referral",
145+
[NVME_NQN_DISC] = "discovery subsystem",
147146
[NVME_NQN_NVME] = "nvme subsystem",
148-
[NVME_NQN_CURR] = "current subsystem",
149147
};
150148

151149
static inline const char *subtype_str(__u8 subtype)
@@ -298,13 +296,6 @@ static bool ctrl_matches_connectargs(const char *name, struct connect_args *args
298296
addr = nvme_get_ctrl_attr(path, "address");
299297
cargs.subsysnqn = nvme_get_ctrl_attr(path, "subsysnqn");
300298
cargs.transport = nvme_get_ctrl_attr(path, "transport");
301-
cargs.subsystype = nvme_get_ctrl_attr(path, "subsystype");
302-
if (!cargs.subsystype) {
303-
if (!strcmp(cargs.subsysnqn, NVME_DISC_SUBSYS_NAME))
304-
cargs.subsystype = strdup("discovery");
305-
else
306-
cargs.subsystype = strdup("nvm");
307-
}
308299

309300
if (!addr || !cargs.subsysnqn || !cargs.transport) {
310301
fprintf(stderr, "nvme_get_ctrl_attr failed\n");
@@ -316,7 +307,7 @@ static bool ctrl_matches_connectargs(const char *name, struct connect_args *args
316307
cargs.host_traddr = parse_conn_arg(addr, ' ', conarg_host_traddr);
317308
cargs.host_iface = parse_conn_arg(addr, ' ', conarg_host_iface);
318309

319-
if (!strcmp(cargs.subsystype, "discovery")) {
310+
if (!strcmp(cargs.subsysnqn, NVME_DISC_SUBSYS_NAME)) {
320311
char *kato_str = nvme_get_ctrl_attr(path, "kato"), *p;
321312
unsigned int kato = 0;
322313

@@ -425,7 +416,6 @@ static void destruct_connect_args(struct connect_args *cargs)
425416
free(cargs->trsvcid);
426417
free(cargs->host_traddr);
427418
free(cargs->host_iface);
428-
free(cargs->subsystype);
429419
}
430420

431421
static void free_connect_args(struct connect_args *cargs)
@@ -1173,7 +1163,6 @@ static int connect_ctrl(struct nvmf_disc_rsp_page_entry *e)
11731163

11741164
switch (e->subtype) {
11751165
case NVME_NQN_DISC:
1176-
case NVME_NQN_CURR:
11771166
discover = true;
11781167
case NVME_NQN_NVME:
11791168
break;

linux/nvme.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,8 @@ static inline uint64_t le64_to_cpu(__le64 x)
7575
#define NVME_NSID_ALL 0xffffffff
7676

7777
enum nvme_subsys_type {
78-
NVME_NQN_DISC = 1, /* Referral Discovery type target subsystem */
78+
NVME_NQN_DISC = 1, /* Discovery type target subsystem */
7979
NVME_NQN_NVME = 2, /* NVME type target subsystem */
80-
NVME_NQN_CURR = 3, /* Current Discovery type target subsystem */
8180
};
8281

8382
/* Address Family codes for Discovery Log Page entry ADRFAM field */

0 commit comments

Comments
 (0)