nvme: add spdk_nvme_qpair_get_id

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I550d42806a84eb94effd1e1c4e26d9493cda7703

Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6395
Community-CI: Broadcom CI
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: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This commit is contained in:
Jim Harris 2021-02-11 13:10:55 -07:00 committed by Tomasz Zawadzki
parent 17ef8ec9ac
commit 5e37d3b2d8
3 changed files with 16 additions and 0 deletions

View File

@ -3244,6 +3244,14 @@ void spdk_nvme_qpair_print_command(struct spdk_nvme_qpair *qpair,
void spdk_nvme_qpair_print_completion(struct spdk_nvme_qpair *qpair,
struct spdk_nvme_cpl *cpl);
/**
* \brief Gets the NVMe qpair ID for the specified qpair.
*
* \param qpair Pointer to the NVMe queue pair.
* \returns ID for the specified qpair.
*/
uint16_t spdk_nvme_qpair_get_id(struct spdk_nvme_qpair *qpair);
/**
* \brief Prints (SPDK_NOTICELOG) the contents of an NVMe submission queue entry (command).
*

View File

@ -1072,3 +1072,9 @@ spdk_nvme_qpair_remove_cmd_error_injection(struct spdk_nvme_ctrlr *ctrlr,
return;
}
uint16_t
spdk_nvme_qpair_get_id(struct spdk_nvme_qpair *qpair)
{
return qpair->id;
}

View File

@ -151,6 +151,8 @@
spdk_nvme_qpair_remove_cmd_error_injection;
spdk_nvme_qpair_print_command;
spdk_nvme_qpair_print_completion;
spdk_nvme_qpair_get_id;
spdk_nvme_print_command;
spdk_nvme_print_completion;