Skip to content

Commit

Permalink
migration/rdma: We can calculate the rioc from the QEMUFile
Browse files Browse the repository at this point in the history
Signed-off-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20230504114443.23891-4-quintela@redhat.com>
  • Loading branch information
Juan Quintela committed May 4, 2023
1 parent cf7fe0c commit 93dc710
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions migration/rdma.c
Original file line number Diff line number Diff line change
Expand Up @@ -3811,9 +3811,10 @@ static int qemu_rdma_registration_handle(QEMUFile *f)
* the source.
*/
static int
rdma_block_notification_handle(QIOChannelRDMA *rioc, const char *name)
rdma_block_notification_handle(QEMUFile *f, const char *name)
{
RDMAContext *rdma;
QIOChannelRDMA *rioc = QIO_CHANNEL_RDMA(qemu_file_get_ioc(f));
int curr;
int found = -1;

Expand Down Expand Up @@ -3846,10 +3847,9 @@ rdma_block_notification_handle(QIOChannelRDMA *rioc, const char *name)

static int rdma_load_hook(QEMUFile *f, uint64_t flags, void *data)
{
QIOChannelRDMA *rioc = QIO_CHANNEL_RDMA(qemu_file_get_ioc(f));
switch (flags) {
case RAM_CONTROL_BLOCK_REG:
return rdma_block_notification_handle(rioc, data);
return rdma_block_notification_handle(f, data);

case RAM_CONTROL_HOOK:
return qemu_rdma_registration_handle(f);
Expand Down

0 comments on commit 93dc710

Please sign in to comment.