nvme: Rename cmic.multi_host by cmic.multi_ctrlr of spdk_nvme_ctrlr_data

Bit 1 in the CMIC of the Identify Controller Data Structure specifies
if the NVM subsystem may have multiple controllers or not.

However, multi_host indicated a particular use case such that the NVM
subsystem is used by multiple hosts.

multi_ctrlr will be more appropriate.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I0246096a5cc44721aeff3ff6f96473a2abe11964
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8719
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
This commit is contained in:
Shuhei Matsumoto 2021-07-08 00:21:44 +09:00 committed by Tomasz Zawadzki
parent 798ad0fb16
commit efbd101b8b
5 changed files with 9 additions and 4 deletions

View File

@ -66,6 +66,11 @@ polling until all detachments complete.
An existing function `spdk_nvme_detach_async` was updated to add one or more detachments
to an active context while it is being polled.
Rename a variable in the member `cmic` of the struct `spdk_nvme_ctrlr_data` from
`multi_host` to `multi_ctrlr`. The variable means that the NVM subsystem may have two or
more controllers if set to 1. However `multi_host` had indicated a particular use case
such that the NVM subsystem is used by multiple hosts.
### rpc
New RPC `bdev_rbd_register_cluster` and `bdev_rbd_unregister_cluster` was added, it allows to create

View File

@ -1285,7 +1285,7 @@ print_controller(struct spdk_nvme_ctrlr *ctrlr, const struct spdk_nvme_transport
cdata->ieee[0], cdata->ieee[1], cdata->ieee[2]);
printf("Multi-path I/O\n");
printf(" May have multiple subsystem ports: %s\n", cdata->cmic.multi_port ? "Yes" : "No");
printf(" May be connected to multiple hosts: %s\n", cdata->cmic.multi_host ? "Yes" : "No");
printf(" May have multiple controllers: %s\n", cdata->cmic.multi_ctrlr ? "Yes" : "No");
printf(" Associated with SR-IOV VF: %s\n", cdata->cmic.sr_iov ? "Yes" : "No");
printf("Max Data Transfer Size: ");
if (cdata->mdts == 0) {

View File

@ -1875,7 +1875,7 @@ struct __attribute__((packed)) spdk_nvme_ctrlr_data {
/** controller multi-path I/O and namespace sharing capabilities */
struct {
uint8_t multi_port : 1;
uint8_t multi_host : 1;
uint8_t multi_ctrlr : 1;
uint8_t sr_iov : 1;
uint8_t ana_reporting : 1;
uint8_t reserved : 4;

View File

@ -2346,7 +2346,7 @@ spdk_nvmf_ctrlr_identify_ctrlr(struct spdk_nvmf_ctrlr *ctrlr, struct spdk_nvme_c
cdata->rab = 6;
cdata->cmic.multi_port = 1;
cdata->cmic.multi_host = 1;
cdata->cmic.multi_ctrlr = 1;
if (subsystem->flags.ana_reporting) {
/* Asymmetric Namespace Access Reporting is supported. */
cdata->cmic.ana_reporting = 1;

View File

@ -82,7 +82,7 @@ print_controller(struct nvme_ctrlr *ctrlr, const struct spdk_pci_addr *addr)
cdata->ieee[0], cdata->ieee[1], cdata->ieee[2]);
printf("Multi-path I/O\n");
printf(" May have multiple subsystem ports: %s\n", cdata->cmic.multi_port ? "Yes" : "No");
printf(" May be connected to multiple hosts: %s\n", cdata->cmic.multi_host ? "Yes" : "No");
printf(" May have multiple controllers: %s\n", cdata->cmic.multi_ctrlr ? "Yes" : "No");
printf(" Associated with SR-IOV VF: %s\n", cdata->cmic.sr_iov ? "Yes" : "No");
printf("Max Number of Namespaces: %d\n", cdata->nn);
if (cdata->ver.raw != 0) {