nvmf: add util to get id from ctrlr
Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com> Change-Id: If9246be80d9d43863c1f9cc6ee33c1126dc67fd8 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2983 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Broadcom CI Community-CI: Mellanox Build Bot Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
This commit is contained in:
parent
b1bb9917a9
commit
3dff6a3b48
@ -417,6 +417,16 @@ void spdk_nvmf_poll_group_remove(struct spdk_nvmf_qpair *qpair);
|
|||||||
struct spdk_nvmf_subsystem *
|
struct spdk_nvmf_subsystem *
|
||||||
spdk_nvmf_ctrlr_get_subsystem(struct spdk_nvmf_ctrlr *ctrlr);
|
spdk_nvmf_ctrlr_get_subsystem(struct spdk_nvmf_ctrlr *ctrlr);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the NVMe-oF controller ID.
|
||||||
|
*
|
||||||
|
* \param ctrlr The NVMe-oF controller
|
||||||
|
*
|
||||||
|
* \return The NVMe-oF controller ID
|
||||||
|
*/
|
||||||
|
uint16_t
|
||||||
|
spdk_nvmf_ctrlr_get_id(struct spdk_nvmf_ctrlr *ctrlr);
|
||||||
|
|
||||||
static inline enum spdk_nvme_data_transfer
|
static inline enum spdk_nvme_data_transfer
|
||||||
spdk_nvmf_req_get_xfer(struct spdk_nvmf_request *req) {
|
spdk_nvmf_req_get_xfer(struct spdk_nvmf_request *req) {
|
||||||
enum spdk_nvme_data_transfer xfer;
|
enum spdk_nvme_data_transfer xfer;
|
||||||
|
@ -3218,3 +3218,8 @@ struct spdk_nvmf_subsystem *spdk_nvmf_ctrlr_get_subsystem(struct spdk_nvmf_ctrlr
|
|||||||
{
|
{
|
||||||
return ctrlr->subsys;
|
return ctrlr->subsys;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint16_t spdk_nvmf_ctrlr_get_id(struct spdk_nvmf_ctrlr *ctrlr)
|
||||||
|
{
|
||||||
|
return ctrlr->cntlid;
|
||||||
|
}
|
||||||
|
@ -107,6 +107,7 @@
|
|||||||
spdk_nvmf_request_free;
|
spdk_nvmf_request_free;
|
||||||
spdk_nvmf_request_complete;
|
spdk_nvmf_request_complete;
|
||||||
spdk_nvmf_ctrlr_get_subsystem;
|
spdk_nvmf_ctrlr_get_subsystem;
|
||||||
|
spdk_nvmf_ctrlr_get_id;
|
||||||
spdk_nvmf_req_get_xfer;
|
spdk_nvmf_req_get_xfer;
|
||||||
spdk_nvmf_poll_group_remove;
|
spdk_nvmf_poll_group_remove;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user