nvmf/vfio-user: inline io_q_id()
This function is called in the IO processing context, also rename internal queue pair variable with "vu_" prefix. Change-Id: Iac6be1fddf9ee28e0485ff0c3a707de4e98be96a Signed-off-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9120 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Community-CI: Mellanox Build Bot Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
40c447f843
commit
2746d51aa7
@ -452,21 +452,21 @@ ctrlr_id(struct nvmf_vfio_user_ctrlr *ctrlr)
|
|||||||
return endpoint_id(ctrlr->endpoint);
|
return endpoint_id(ctrlr->endpoint);
|
||||||
}
|
}
|
||||||
|
|
||||||
static uint16_t
|
static inline uint16_t
|
||||||
io_q_id(struct nvme_q *q)
|
io_q_id(struct nvme_q *q)
|
||||||
{
|
{
|
||||||
|
|
||||||
struct nvmf_vfio_user_qpair *vfio_user_qpair;
|
struct nvmf_vfio_user_qpair *vu_qpair;
|
||||||
|
|
||||||
assert(q);
|
assert(q);
|
||||||
|
|
||||||
if (q->is_cq) {
|
if (q->is_cq) {
|
||||||
vfio_user_qpair = SPDK_CONTAINEROF(q, struct nvmf_vfio_user_qpair, cq);
|
vu_qpair = SPDK_CONTAINEROF(q, struct nvmf_vfio_user_qpair, cq);
|
||||||
} else {
|
} else {
|
||||||
vfio_user_qpair = SPDK_CONTAINEROF(q, struct nvmf_vfio_user_qpair, sq);
|
vu_qpair = SPDK_CONTAINEROF(q, struct nvmf_vfio_user_qpair, sq);
|
||||||
}
|
}
|
||||||
assert(vfio_user_qpair);
|
assert(vu_qpair);
|
||||||
return vfio_user_qpair->qpair.qid;
|
return vu_qpair->qpair.qid;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Loading…
Reference in New Issue
Block a user