mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
migration/rdma: Remove qemu_ prefix from exported functions
Functions are long enough even without this. Reviewed-by: Peter Xu <peterx@redhat.com> Reviewed-by: Li Zhijian <lizhijian@fujitsu.com> Signed-off-by: Juan Quintela <quintela@redhat.com> Message-ID: <20231011203527.9061-10-quintela@redhat.com>
This commit is contained in:
parent
10cb3336b1
commit
b1b3838722
4 changed files with 46 additions and 48 deletions
|
@ -3540,7 +3540,7 @@ static int dest_ram_sort_func(const void *a, const void *b)
|
|||
*
|
||||
* Keep doing this until the source tells us to stop.
|
||||
*/
|
||||
int qemu_rdma_registration_handle(QEMUFile *f)
|
||||
int rdma_registration_handle(QEMUFile *f)
|
||||
{
|
||||
RDMAControlHeader reg_resp = { .len = sizeof(RDMARegisterResult),
|
||||
.type = RDMA_CONTROL_REGISTER_RESULT,
|
||||
|
@ -3586,7 +3586,7 @@ int qemu_rdma_registration_handle(QEMUFile *f)
|
|||
|
||||
local = &rdma->local_ram_blocks;
|
||||
do {
|
||||
trace_qemu_rdma_registration_handle_wait();
|
||||
trace_rdma_registration_handle_wait();
|
||||
|
||||
ret = qemu_rdma_exchange_recv(rdma, &head, RDMA_CONTROL_NONE, &err);
|
||||
|
||||
|
@ -3606,9 +3606,9 @@ int qemu_rdma_registration_handle(QEMUFile *f)
|
|||
comp = (RDMACompress *) rdma->wr_data[idx].control_curr;
|
||||
network_to_compress(comp);
|
||||
|
||||
trace_qemu_rdma_registration_handle_compress(comp->length,
|
||||
comp->block_idx,
|
||||
comp->offset);
|
||||
trace_rdma_registration_handle_compress(comp->length,
|
||||
comp->block_idx,
|
||||
comp->offset);
|
||||
if (comp->block_idx >= rdma->local_ram_blocks.nb_blocks) {
|
||||
error_report("rdma: 'compress' bad block index %u (vs %d)",
|
||||
(unsigned int)comp->block_idx,
|
||||
|
@ -3624,11 +3624,11 @@ int qemu_rdma_registration_handle(QEMUFile *f)
|
|||
break;
|
||||
|
||||
case RDMA_CONTROL_REGISTER_FINISHED:
|
||||
trace_qemu_rdma_registration_handle_finished();
|
||||
trace_rdma_registration_handle_finished();
|
||||
return 0;
|
||||
|
||||
case RDMA_CONTROL_RAM_BLOCKS_REQUEST:
|
||||
trace_qemu_rdma_registration_handle_ram_blocks();
|
||||
trace_rdma_registration_handle_ram_blocks();
|
||||
|
||||
/* Sort our local RAM Block list so it's the same as the source,
|
||||
* we can do this since we've filled in a src_index in the list
|
||||
|
@ -3667,7 +3667,7 @@ int qemu_rdma_registration_handle(QEMUFile *f)
|
|||
rdma->dest_blocks[i].length = local->block[i].length;
|
||||
|
||||
dest_block_to_network(&rdma->dest_blocks[i]);
|
||||
trace_qemu_rdma_registration_handle_ram_blocks_loop(
|
||||
trace_rdma_registration_handle_ram_blocks_loop(
|
||||
local->block[i].block_name,
|
||||
local->block[i].offset,
|
||||
local->block[i].length,
|
||||
|
@ -3690,7 +3690,7 @@ int qemu_rdma_registration_handle(QEMUFile *f)
|
|||
|
||||
break;
|
||||
case RDMA_CONTROL_REGISTER_REQUEST:
|
||||
trace_qemu_rdma_registration_handle_register(head.repeat);
|
||||
trace_rdma_registration_handle_register(head.repeat);
|
||||
|
||||
reg_resp.repeat = head.repeat;
|
||||
registers = (RDMARegister *) rdma->wr_data[idx].control_curr;
|
||||
|
@ -3704,7 +3704,7 @@ int qemu_rdma_registration_handle(QEMUFile *f)
|
|||
|
||||
reg_result = &results[count];
|
||||
|
||||
trace_qemu_rdma_registration_handle_register_loop(count,
|
||||
trace_rdma_registration_handle_register_loop(count,
|
||||
reg->current_index, reg->key.current_addr, reg->chunks);
|
||||
|
||||
if (reg->current_index >= rdma->local_ram_blocks.nb_blocks) {
|
||||
|
@ -3752,8 +3752,7 @@ int qemu_rdma_registration_handle(QEMUFile *f)
|
|||
|
||||
reg_result->host_addr = (uintptr_t)block->local_host_addr;
|
||||
|
||||
trace_qemu_rdma_registration_handle_register_rkey(
|
||||
reg_result->rkey);
|
||||
trace_rdma_registration_handle_register_rkey(reg_result->rkey);
|
||||
|
||||
result_to_network(reg_result);
|
||||
}
|
||||
|
@ -3767,7 +3766,7 @@ int qemu_rdma_registration_handle(QEMUFile *f)
|
|||
}
|
||||
break;
|
||||
case RDMA_CONTROL_UNREGISTER_REQUEST:
|
||||
trace_qemu_rdma_registration_handle_unregister(head.repeat);
|
||||
trace_rdma_registration_handle_unregister(head.repeat);
|
||||
unreg_resp.repeat = head.repeat;
|
||||
registers = (RDMARegister *) rdma->wr_data[idx].control_curr;
|
||||
|
||||
|
@ -3775,7 +3774,7 @@ int qemu_rdma_registration_handle(QEMUFile *f)
|
|||
reg = ®isters[count];
|
||||
network_to_register(reg);
|
||||
|
||||
trace_qemu_rdma_registration_handle_unregister_loop(count,
|
||||
trace_rdma_registration_handle_unregister_loop(count,
|
||||
reg->current_index, reg->key.chunk);
|
||||
|
||||
block = &(rdma->local_ram_blocks.block[reg->current_index]);
|
||||
|
@ -3791,8 +3790,7 @@ int qemu_rdma_registration_handle(QEMUFile *f)
|
|||
|
||||
rdma->total_registrations--;
|
||||
|
||||
trace_qemu_rdma_registration_handle_unregister_success(
|
||||
reg->key.chunk);
|
||||
trace_rdma_registration_handle_unregister_success(reg->key.chunk);
|
||||
}
|
||||
|
||||
ret = qemu_rdma_post_send_control(rdma, NULL, &unreg_resp, &err);
|
||||
|
@ -3859,7 +3857,7 @@ int rdma_block_notification_handle(QEMUFile *f, const char *name)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int qemu_rdma_registration_start(QEMUFile *f, uint64_t flags)
|
||||
int rdma_registration_start(QEMUFile *f, uint64_t flags)
|
||||
{
|
||||
if (!migrate_rdma() || migration_in_postcopy()) {
|
||||
return 0;
|
||||
|
@ -3876,7 +3874,7 @@ int qemu_rdma_registration_start(QEMUFile *f, uint64_t flags)
|
|||
return -1;
|
||||
}
|
||||
|
||||
trace_qemu_rdma_registration_start(flags);
|
||||
trace_rdma_registration_start(flags);
|
||||
qemu_put_be64(f, RAM_SAVE_FLAG_HOOK);
|
||||
qemu_fflush(f);
|
||||
|
||||
|
@ -3887,7 +3885,7 @@ int qemu_rdma_registration_start(QEMUFile *f, uint64_t flags)
|
|||
* Inform dest that dynamic registrations are done for now.
|
||||
* First, flush writes, if any.
|
||||
*/
|
||||
int qemu_rdma_registration_stop(QEMUFile *f, uint64_t flags)
|
||||
int rdma_registration_stop(QEMUFile *f, uint64_t flags)
|
||||
{
|
||||
QIOChannelRDMA *rioc;
|
||||
Error *err = NULL;
|
||||
|
@ -3923,7 +3921,7 @@ int qemu_rdma_registration_stop(QEMUFile *f, uint64_t flags)
|
|||
int reg_result_idx, i, nb_dest_blocks;
|
||||
|
||||
head.type = RDMA_CONTROL_RAM_BLOCKS_REQUEST;
|
||||
trace_qemu_rdma_registration_stop_ram();
|
||||
trace_rdma_registration_stop_ram();
|
||||
|
||||
/*
|
||||
* Make sure that we parallelize the pinning on both sides.
|
||||
|
@ -3987,7 +3985,7 @@ int qemu_rdma_registration_stop(QEMUFile *f, uint64_t flags)
|
|||
}
|
||||
}
|
||||
|
||||
trace_qemu_rdma_registration_stop(flags);
|
||||
trace_rdma_registration_stop(flags);
|
||||
|
||||
head.type = RDMA_CONTROL_REGISTER_FINISHED;
|
||||
ret = qemu_rdma_exchange_send(rdma, &head, NULL, NULL, NULL, NULL, &err);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue