nvme: Add spdk_nvme_ctrlr_get_opts
This is needed for reporting additional information in JSON RPCs Change-Id: I45da2ea78cd5415f7536130b6793ca29e929b86e Signed-off-by: Ben Walker <benjamin.walker@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9338 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: Paul Luse <paul.e.luse@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Ziye Yang <ziye.yang@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
This commit is contained in:
parent
343e2c8565
commit
3875f287dd
@ -63,6 +63,8 @@ Added new functions `spdk_nvme_ctrlr_write_boot_partition`,
|
||||
`spdk_nvme_ctrlr_read_boot_partition_start` and `spdk_nvme_ctrlr_read_boot_partition_poll`
|
||||
to write and read the boot partitions of a controller.
|
||||
|
||||
Added `spdk_nvme_ctrlr_get_opts` to retrieve the current controller options.
|
||||
|
||||
### dpdk
|
||||
|
||||
Updated DPDK submodule to DPDK 21.08.
|
||||
|
@ -142,7 +142,7 @@ struct spdk_nvme_ctrlr_opts {
|
||||
/**
|
||||
* The host NQN to use when connecting to NVMe over Fabrics controllers.
|
||||
*
|
||||
* Unused for local PCIe-attached NVMe devices.
|
||||
* If empty, a default value will be used.
|
||||
*/
|
||||
char hostnqn[SPDK_NVMF_NQN_MAX_LEN + 1];
|
||||
|
||||
@ -324,6 +324,13 @@ bool spdk_nvme_ctrlr_is_fabrics(struct spdk_nvme_ctrlr *ctrlr);
|
||||
void spdk_nvme_ctrlr_get_default_ctrlr_opts(struct spdk_nvme_ctrlr_opts *opts,
|
||||
size_t opts_size);
|
||||
|
||||
/*
|
||||
* Get the options in use for a given controller.
|
||||
*
|
||||
* \param ctrlr Opaque handle to NVMe controller.
|
||||
*/
|
||||
const struct spdk_nvme_ctrlr_opts *spdk_nvme_ctrlr_get_opts(struct spdk_nvme_ctrlr *ctrlr);
|
||||
|
||||
/**
|
||||
* Reason for qpair disconnect at the transport layer.
|
||||
*
|
||||
|
@ -234,6 +234,12 @@ spdk_nvme_ctrlr_get_default_ctrlr_opts(struct spdk_nvme_ctrlr_opts *opts, size_t
|
||||
#undef SET_FIELD
|
||||
}
|
||||
|
||||
const struct spdk_nvme_ctrlr_opts *
|
||||
spdk_nvme_ctrlr_get_opts(struct spdk_nvme_ctrlr *ctrlr)
|
||||
{
|
||||
return &ctrlr->opts;
|
||||
}
|
||||
|
||||
/**
|
||||
* This function will be called when the process allocates the IO qpair.
|
||||
* Note: the ctrlr_lock must be held when calling this function.
|
||||
|
@ -33,6 +33,7 @@
|
||||
spdk_nvme_ctrlr_is_discovery;
|
||||
spdk_nvme_ctrlr_is_fabrics;
|
||||
spdk_nvme_ctrlr_get_default_ctrlr_opts;
|
||||
spdk_nvme_ctrlr_get_opts;
|
||||
spdk_nvme_ctrlr_set_trid;
|
||||
spdk_nvme_ctrlr_reset_subsystem;
|
||||
spdk_nvme_ctrlr_reset;
|
||||
|
Loading…
Reference in New Issue
Block a user