Skip to content

Commit 8005600

Browse files
authored
Merge pull request #421 from martin-belanger/eflag-1
fabrics: add NCC to nvmf_disc_eflags
2 parents e99b63e + 556f49a commit 8005600

2 files changed

Lines changed: 30 additions & 7 deletions

File tree

src/nvme/fabrics.c

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,21 @@ static const char * const eflags_strings[] = {
118118
[NVMF_DISC_EFLAGS_NONE] = "not specified",
119119
[NVMF_DISC_EFLAGS_EPCSD] = "explicit discovery connections",
120120
[NVMF_DISC_EFLAGS_DUPRETINFO] = "duplicate discovery information",
121-
[NVMF_DISC_EFLAGS_BOTH] = "explicit discovery connections, "
121+
[NVMF_DISC_EFLAGS_EPCSD |
122+
NVMF_DISC_EFLAGS_DUPRETINFO] = "explicit discovery connections, "
122123
"duplicate discovery information",
124+
[NVMF_DISC_EFLAGS_NCC] = "no cdc connectivity",
125+
[NVMF_DISC_EFLAGS_EPCSD |
126+
NVMF_DISC_EFLAGS_NCC] = "explicit discovery connections, "
127+
"no cdc connectivity",
128+
[NVMF_DISC_EFLAGS_DUPRETINFO |
129+
NVMF_DISC_EFLAGS_NCC] = "duplicate discovery information, "
130+
"no cdc connectivity",
131+
[NVMF_DISC_EFLAGS_EPCSD |
132+
NVMF_DISC_EFLAGS_DUPRETINFO |
133+
NVMF_DISC_EFLAGS_NCC] = "explicit discovery connections, "
134+
"duplicate discovery information, "
135+
"no cdc connectivity",
123136
};
124137

125138
const char *nvmf_eflags_str(__u16 eflags)

src/nvme/types.h

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4635,17 +4635,27 @@ enum nvme_subsys_type {
46354635
* this flag set.
46364636
* @NVMF_DISC_EFLAGS_EPCSD: Explicit Persistent Connection Support for Discovery (EPCSD):
46374637
* Indicates that Explicit Persistent Connections are
4638-
* supported for the Discovery controller.
4639-
* @NVMF_DISC_EFLAGS_BOTH: Indicates that both the DUPRETINFO and EPCSD
4640-
* features are supported.
4638+
* supported for the Discovery controller.
4639+
* @NVMF_DISC_EFLAGS_NCC: No CDC Connectivity (NCC): If set to
4640+
* '1', then no DDC that describes this entry
4641+
* is currently connected to the CDC. If
4642+
* cleared to '0', then at least one DDC that
4643+
* describes this entry is currently
4644+
* connected to the CDC. If the Discovery
4645+
* controller returning this log page is not
4646+
* a CDC, then this bit shall be cleared to
4647+
* '0' and should be ignored by the host.
46414648
*/
46424649
enum nvmf_disc_eflags {
46434650
NVMF_DISC_EFLAGS_NONE = 0,
4644-
NVMF_DISC_EFLAGS_DUPRETINFO = 1,
4645-
NVMF_DISC_EFLAGS_EPCSD = 2,
4646-
NVMF_DISC_EFLAGS_BOTH = 3,
4651+
NVMF_DISC_EFLAGS_DUPRETINFO = 1 << 0,
4652+
NVMF_DISC_EFLAGS_EPCSD = 1 << 1,
4653+
NVMF_DISC_EFLAGS_NCC = 1 << 2,
46474654
};
46484655

4656+
/* Backwards compatibility. Will be removed with next major release */
4657+
#define NVMF_DISC_EFLAGS_BOTH (NVMF_DISC_EFLAGS_DUPRETINFO | NVMF_DISC_EFLAGS_EPCSD)
4658+
46494659
/**
46504660
* union nvmf_tsas - Transport Specific Address Subtype
46514661
* @common: Common transport specific attributes

0 commit comments

Comments
 (0)