nvmf/vfio-user: rename vfio_user_handle_intr()
This is better represented under the name vfio_user_ctrlr_intr(). Signed-off-by: John Levon <john.levon@nutanix.com> Change-Id: Ic3fa0fe238fd8ce4930bfd3e34b9dbc1b935aa6e Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12662 Community-CI: Mellanox Build Bot Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
c47c93fac4
commit
3c481cc271
@ -583,19 +583,18 @@ vfio_user_migr_data_len(void)
|
|||||||
return SPDK_ALIGN_CEIL(sizeof(struct vfio_user_nvme_migr_state), PAGE_SIZE);
|
return SPDK_ALIGN_CEIL(sizeof(struct vfio_user_nvme_migr_state), PAGE_SIZE);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int vfio_user_ctrlr_intr(void *ctx);
|
||||||
vfio_user_handle_intr(void *ctx);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Wrap vfio_user_handle_intr() such that it can be used with
|
* Wrap vfio_user_ctrlr_intr() such that it can be used with
|
||||||
* spdk_thread_send_msg().
|
* spdk_thread_send_msg().
|
||||||
* Pollers have type int (*)(void *) while message functions should have type
|
* Pollers have type int (*)(void *) while message functions should have type
|
||||||
* void (*)(void *), so simply discard the returned value.
|
* void (*)(void *), so simply discard the returned value.
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
vfio_user_handle_intr_wrapper(void *ctx)
|
vfio_user_ctrlr_intr_wrapper(void *ctx)
|
||||||
{
|
{
|
||||||
vfio_user_handle_intr(ctx);
|
vfio_user_ctrlr_intr(ctx);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int
|
static inline int
|
||||||
@ -611,7 +610,7 @@ self_kick(struct nvmf_vfio_user_ctrlr *ctrlr)
|
|||||||
ctrlr->self_kick_requested = true;
|
ctrlr->self_kick_requested = true;
|
||||||
|
|
||||||
return spdk_thread_send_msg(ctrlr->thread,
|
return spdk_thread_send_msg(ctrlr->thread,
|
||||||
vfio_user_handle_intr_wrapper,
|
vfio_user_ctrlr_intr_wrapper,
|
||||||
ctrlr);
|
ctrlr);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4425,7 +4424,7 @@ nvmf_vfio_user_get_optimal_poll_group(struct spdk_nvmf_qpair *qpair)
|
|||||||
/*
|
/*
|
||||||
* If we're in interrupt mode, align all qpairs for a controller
|
* If we're in interrupt mode, align all qpairs for a controller
|
||||||
* on the same poll group, to avoid complications in
|
* on the same poll group, to avoid complications in
|
||||||
* vfio_user_handle_intr().
|
* vfio_user_ctrlr_intr().
|
||||||
*/
|
*/
|
||||||
if (in_interrupt_mode(vu_transport)) {
|
if (in_interrupt_mode(vu_transport)) {
|
||||||
result = sq->ctrlr->sqs[0]->group;
|
result = sq->ctrlr->sqs[0]->group;
|
||||||
@ -4579,7 +4578,7 @@ static int nvmf_vfio_user_poll_group_poll(struct spdk_nvmf_transport_poll_group
|
|||||||
static int set_ctrlr_intr_mode(struct nvmf_vfio_user_ctrlr *ctrlr);
|
static int set_ctrlr_intr_mode(struct nvmf_vfio_user_ctrlr *ctrlr);
|
||||||
|
|
||||||
static int
|
static int
|
||||||
vfio_user_handle_intr(void *ctx)
|
vfio_user_ctrlr_intr(void *ctx)
|
||||||
{
|
{
|
||||||
struct nvmf_vfio_user_ctrlr *ctrlr = ctx;
|
struct nvmf_vfio_user_ctrlr *ctrlr = ctx;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
@ -4590,11 +4589,18 @@ vfio_user_handle_intr(void *ctx)
|
|||||||
|
|
||||||
ctrlr->self_kick_requested = false;
|
ctrlr->self_kick_requested = false;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Poll vfio-user for this controller.
|
||||||
|
*/
|
||||||
vfio_user_poll_vfu_ctx(ctrlr);
|
vfio_user_poll_vfu_ctx(ctrlr);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* See nvmf_vfio_user_get_optimal_poll_group() for why it's OK to only
|
* See nvmf_vfio_user_get_optimal_poll_group() for why it's OK to only
|
||||||
* poll this poll group.
|
* poll this poll group.
|
||||||
|
*
|
||||||
|
* Note that this could end up polling other controller's SQs as well
|
||||||
|
* (since a single poll group can have SQs from multiple separate
|
||||||
|
* controllers).
|
||||||
*/
|
*/
|
||||||
ret |= nvmf_vfio_user_poll_group_poll(ctrlr->sqs[0]->group);
|
ret |= nvmf_vfio_user_poll_group_poll(ctrlr->sqs[0]->group);
|
||||||
|
|
||||||
@ -4670,8 +4676,7 @@ handle_queue_connect_rsp(struct nvmf_vfio_user_req *req, void *cb_arg)
|
|||||||
assert(vu_ctrlr->intr_fd != -1);
|
assert(vu_ctrlr->intr_fd != -1);
|
||||||
|
|
||||||
vu_ctrlr->intr = SPDK_INTERRUPT_REGISTER(vu_ctrlr->intr_fd,
|
vu_ctrlr->intr = SPDK_INTERRUPT_REGISTER(vu_ctrlr->intr_fd,
|
||||||
vfio_user_handle_intr,
|
vfio_user_ctrlr_intr, vu_ctrlr);
|
||||||
vu_ctrlr);
|
|
||||||
|
|
||||||
assert(vu_ctrlr->intr != NULL);
|
assert(vu_ctrlr->intr != NULL);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user