nvmf: add util to get subsystem from ctrlr
Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com> Change-Id: I28e51e1ca9f1334bf267c08b47b8fb6b961a0aa0 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/919 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> 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
e41d1a9411
commit
a00efdbfda
@ -341,6 +341,16 @@ void spdk_nvmf_request_exec_fabrics(struct spdk_nvmf_request *req);
|
|||||||
int spdk_nvmf_request_free(struct spdk_nvmf_request *req);
|
int spdk_nvmf_request_free(struct spdk_nvmf_request *req);
|
||||||
int spdk_nvmf_request_complete(struct spdk_nvmf_request *req);
|
int spdk_nvmf_request_complete(struct spdk_nvmf_request *req);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the NVMe-oF subsystem associated with this controller.
|
||||||
|
*
|
||||||
|
* \param ctrlr The NVMe-oF controller
|
||||||
|
*
|
||||||
|
* \return The NVMe-oF subsystem
|
||||||
|
*/
|
||||||
|
struct spdk_nvmf_subsystem *
|
||||||
|
spdk_nvmf_ctrlr_get_subsystem(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;
|
||||||
|
@ -3018,3 +3018,8 @@ void spdk_nvmf_request_get_data(struct spdk_nvmf_request *req, void **data, uint
|
|||||||
*data = req->data;
|
*data = req->data;
|
||||||
*length = req->length;
|
*length = req->length;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
struct spdk_nvmf_subsystem *spdk_nvmf_ctrlr_get_subsystem(struct spdk_nvmf_ctrlr *ctrlr)
|
||||||
|
{
|
||||||
|
return ctrlr->subsys;
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user