nvme: add spdk_ prefix to nvme_qpair_process_completions()
This will be exposed in the public API. This rename is in a separate commit to ease review. Change-Id: I1b7fef36f85265db27935ac4d22ceef3c7282502 Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
This commit is contained in:
parent
df26ab0583
commit
345d9a4da3
@ -96,7 +96,7 @@ static int nvme_ctrlr_set_intel_support_log_pages(struct spdk_nvme_ctrlr *ctrlr)
|
||||
nvme_completion_poll_cb,
|
||||
&status);
|
||||
while (status.done == false) {
|
||||
nvme_qpair_process_completions(&ctrlr->adminq, 0);
|
||||
spdk_nvme_qpair_process_completions(&ctrlr->adminq, 0);
|
||||
}
|
||||
if (spdk_nvme_cpl_is_error(&status.cpl)) {
|
||||
nvme_free(log_page_directory);
|
||||
@ -432,7 +432,7 @@ nvme_ctrlr_identify(struct spdk_nvme_ctrlr *ctrlr)
|
||||
}
|
||||
|
||||
while (status.done == false) {
|
||||
nvme_qpair_process_completions(&ctrlr->adminq, 0);
|
||||
spdk_nvme_qpair_process_completions(&ctrlr->adminq, 0);
|
||||
}
|
||||
if (spdk_nvme_cpl_is_error(&status.cpl)) {
|
||||
nvme_printf(ctrlr, "nvme_identify_controller failed!\n");
|
||||
@ -473,7 +473,7 @@ nvme_ctrlr_set_num_qpairs(struct spdk_nvme_ctrlr *ctrlr)
|
||||
}
|
||||
|
||||
while (status.done == false) {
|
||||
nvme_qpair_process_completions(&ctrlr->adminq, 0);
|
||||
spdk_nvme_qpair_process_completions(&ctrlr->adminq, 0);
|
||||
}
|
||||
if (spdk_nvme_cpl_is_error(&status.cpl)) {
|
||||
nvme_printf(ctrlr, "nvme_set_num_queues failed!\n");
|
||||
@ -521,7 +521,7 @@ nvme_ctrlr_create_qpairs(struct spdk_nvme_ctrlr *ctrlr)
|
||||
}
|
||||
|
||||
while (status.done == false) {
|
||||
nvme_qpair_process_completions(&ctrlr->adminq, 0);
|
||||
spdk_nvme_qpair_process_completions(&ctrlr->adminq, 0);
|
||||
}
|
||||
if (spdk_nvme_cpl_is_error(&status.cpl)) {
|
||||
nvme_printf(ctrlr, "nvme_create_io_cq failed!\n");
|
||||
@ -536,7 +536,7 @@ nvme_ctrlr_create_qpairs(struct spdk_nvme_ctrlr *ctrlr)
|
||||
}
|
||||
|
||||
while (status.done == false) {
|
||||
nvme_qpair_process_completions(&ctrlr->adminq, 0);
|
||||
spdk_nvme_qpair_process_completions(&ctrlr->adminq, 0);
|
||||
}
|
||||
if (spdk_nvme_cpl_is_error(&status.cpl)) {
|
||||
nvme_printf(ctrlr, "nvme_create_io_sq failed!\n");
|
||||
@ -694,7 +694,7 @@ nvme_ctrlr_configure_aer(struct spdk_nvme_ctrlr *ctrlr)
|
||||
}
|
||||
|
||||
while (status.done == false) {
|
||||
nvme_qpair_process_completions(&ctrlr->adminq, 0);
|
||||
spdk_nvme_qpair_process_completions(&ctrlr->adminq, 0);
|
||||
}
|
||||
if (spdk_nvme_cpl_is_error(&status.cpl)) {
|
||||
nvme_printf(ctrlr, "nvme_ctrlr_cmd_set_async_event_config failed!\n");
|
||||
@ -959,7 +959,7 @@ int32_t
|
||||
spdk_nvme_ctrlr_process_io_completions(struct spdk_nvme_ctrlr *ctrlr, uint32_t max_completions)
|
||||
{
|
||||
nvme_assert(nvme_thread_ioq_index >= 0, ("no ioq_index assigned for thread\n"));
|
||||
return nvme_qpair_process_completions(&ctrlr->ioq[nvme_thread_ioq_index], max_completions);
|
||||
return spdk_nvme_qpair_process_completions(&ctrlr->ioq[nvme_thread_ioq_index], max_completions);
|
||||
}
|
||||
|
||||
int32_t
|
||||
@ -968,7 +968,7 @@ spdk_nvme_ctrlr_process_admin_completions(struct spdk_nvme_ctrlr *ctrlr)
|
||||
int32_t num_completions;
|
||||
|
||||
nvme_mutex_lock(&ctrlr->ctrlr_lock);
|
||||
num_completions = nvme_qpair_process_completions(&ctrlr->adminq, 0);
|
||||
num_completions = spdk_nvme_qpair_process_completions(&ctrlr->adminq, 0);
|
||||
nvme_mutex_unlock(&ctrlr->ctrlr_lock);
|
||||
|
||||
return num_completions;
|
||||
|
@ -485,7 +485,8 @@ int nvme_qpair_construct(struct spdk_nvme_qpair *qpair, uint16_t id,
|
||||
void nvme_qpair_destroy(struct spdk_nvme_qpair *qpair);
|
||||
void nvme_qpair_enable(struct spdk_nvme_qpair *qpair);
|
||||
void nvme_qpair_disable(struct spdk_nvme_qpair *qpair);
|
||||
int32_t nvme_qpair_process_completions(struct spdk_nvme_qpair *qpair, uint32_t max_completions);
|
||||
int32_t spdk_nvme_qpair_process_completions(struct spdk_nvme_qpair *qpair,
|
||||
uint32_t max_completions);
|
||||
void nvme_qpair_submit_request(struct spdk_nvme_qpair *qpair,
|
||||
struct nvme_request *req);
|
||||
void nvme_qpair_reset(struct spdk_nvme_qpair *qpair);
|
||||
|
@ -124,7 +124,7 @@ nvme_ns_construct(struct spdk_nvme_ns *ns, uint16_t id,
|
||||
}
|
||||
|
||||
while (status.done == false) {
|
||||
nvme_qpair_process_completions(&ctrlr->adminq, 0);
|
||||
spdk_nvme_qpair_process_completions(&ctrlr->adminq, 0);
|
||||
}
|
||||
if (spdk_nvme_cpl_is_error(&status.cpl)) {
|
||||
nvme_printf(ctrlr, "nvme_identify_namespace failed\n");
|
||||
|
@ -462,7 +462,7 @@ nvme_qpair_check_enabled(struct spdk_nvme_qpair *qpair)
|
||||
* \sa nvme_cb_fn_t
|
||||
*/
|
||||
int32_t
|
||||
nvme_qpair_process_completions(struct spdk_nvme_qpair *qpair, uint32_t max_completions)
|
||||
spdk_nvme_qpair_process_completions(struct spdk_nvme_qpair *qpair, uint32_t max_completions)
|
||||
{
|
||||
struct nvme_tracker *tr;
|
||||
struct spdk_nvme_cpl *cpl;
|
||||
|
@ -102,7 +102,7 @@ nvme_qpair_submit_request(struct spdk_nvme_qpair *qpair, struct nvme_request *re
|
||||
}
|
||||
|
||||
int32_t
|
||||
nvme_qpair_process_completions(struct spdk_nvme_qpair *qpair, uint32_t max_completions)
|
||||
spdk_nvme_qpair_process_completions(struct spdk_nvme_qpair *qpair, uint32_t max_completions)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -484,7 +484,7 @@ static void test_nvme_qpair_process_completions(void)
|
||||
qpair.is_enabled = false;
|
||||
qpair.ctrlr->is_resetting = true;
|
||||
|
||||
nvme_qpair_process_completions(&qpair, 0);
|
||||
spdk_nvme_qpair_process_completions(&qpair, 0);
|
||||
cleanup_submit_request_test(&qpair);
|
||||
}
|
||||
|
||||
@ -506,15 +506,15 @@ test_nvme_qpair_process_completions_limit(void)
|
||||
ut_insert_cq_entry(&qpair, 3);
|
||||
|
||||
/* This should only process 2 completions, and 2 should be left in the queue */
|
||||
nvme_qpair_process_completions(&qpair, 2);
|
||||
spdk_nvme_qpair_process_completions(&qpair, 2);
|
||||
CU_ASSERT(qpair.cq_head == 2);
|
||||
|
||||
/* This should only process 1 completion, and 1 should be left in the queue */
|
||||
nvme_qpair_process_completions(&qpair, 1);
|
||||
spdk_nvme_qpair_process_completions(&qpair, 1);
|
||||
CU_ASSERT(qpair.cq_head == 3);
|
||||
|
||||
/* This should process the remaining completion */
|
||||
nvme_qpair_process_completions(&qpair, 5);
|
||||
spdk_nvme_qpair_process_completions(&qpair, 5);
|
||||
CU_ASSERT(qpair.cq_head == 4);
|
||||
|
||||
cleanup_submit_request_test(&qpair);
|
||||
@ -657,8 +657,9 @@ int main(int argc, char **argv)
|
||||
|| CU_add_test(suite, "ctrlr_failed", test_ctrlr_failed) == NULL
|
||||
|| CU_add_test(suite, "struct_packing", struct_packing) == NULL
|
||||
|| CU_add_test(suite, "nvme_qpair_fail", test_nvme_qpair_fail) == NULL
|
||||
|| CU_add_test(suite, "nvme_qpair_process_completions", test_nvme_qpair_process_completions) == NULL
|
||||
|| CU_add_test(suite, "nvme_qpair_process_completions_limit",
|
||||
|| CU_add_test(suite, "spdk_nvme_qpair_process_completions",
|
||||
test_nvme_qpair_process_completions) == NULL
|
||||
|| CU_add_test(suite, "spdk_nvme_qpair_process_completions_limit",
|
||||
test_nvme_qpair_process_completions_limit) == NULL
|
||||
|| CU_add_test(suite, "nvme_qpair_destroy", test_nvme_qpair_destroy) == NULL
|
||||
|| CU_add_test(suite, "nvme_completion_is_retry", test_nvme_completion_is_retry) == NULL
|
||||
|
Loading…
Reference in New Issue
Block a user