summaryrefslogtreecommitdiffstats
path: root/migration/rdma.c
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'remotes/stefanha/tags/net-pull-request' into ↵Peter Maydell2015-06-121-4/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | staging # gpg: Signature made Fri Jun 12 13:57:20 2015 BST using RSA key ID 81AB73C8 # gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>" # gpg: aka "Stefan Hajnoczi <stefanha@gmail.com>" * remotes/stefanha/tags/net-pull-request: qmp/hmp: add rocker device support rocker: bring link up/down on PHY enable/disable rocker: update tests using hw-derived interface names rocker: Add support for phys name iohandler: Change return type of qemu_set_fd_handler to "void" event-notifier: Always return 0 for posix implementation xen_backend: Remove unused error handling of qemu_set_fd_handler oss: Remove unused error handling of qemu_set_fd_handler alsaaudio: Remove unused error handling of qemu_set_fd_handler main-loop: Drop qemu_set_fd_handler2 Change qemu_set_fd_handler2(..., NULL, ...) to qemu_set_fd_handler tap: Drop tap_can_send net/socket: Drop net_socket_can_send netmap: Drop netmap_can_send l2tpv3: Drop l2tpv3_can_send stubs: Add qemu_set_fd_handler Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * Change qemu_set_fd_handler2(..., NULL, ...) to qemu_set_fd_handlerFam Zheng2015-06-121-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Done with following Coccinelle semantic patch, plus manual cosmetic changes in net/*.c. @@ expression E1, E2, E3, E4; @@ - qemu_set_fd_handler2(E1, NULL, E2, E3, E4); + qemu_set_fd_handler(E1, E2, E3, E4); Signed-off-by: Fam Zheng <famz@redhat.com> Message-id: 1433400324-7358-8-git-send-email-famz@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* | Remove unneeded memsetDr. David Alan Gilbert2015-06-121-1/+0
| | | | | | | | | | | | Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Michael R. Hines <mrhines@us.ibm.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
* | Rename RDMA structures to make destination clearDr. David Alan Gilbert2015-06-121-33/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RDMA has two data types that are named confusingly; RDMALocalBlock (pointed to indirectly by local_ram_blocks) RDMARemoteBlock (pointed to by block in RDMAContext) RDMALocalBlocks, as the name suggests is a data strucuture that represents the RDMAable RAM Blocks on the current side of the migration whichever that is. RDMARemoteBlocks is always the shape of the RAMBlocks on the destination, even on the destination. Rename: RDMARemoteBlock -> RDMADestBlock context->'block' -> context->dest_blocks Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Michael R. Hines <mrhines@us.ibm.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
* | qemu_ram_foreach_block: pass up error value, and down the ramblock nameDr. David Alan Gilbert2015-06-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | check the return value of the function it calls and error if it's non-0 Fixup qemu_rdma_init_one_block that is the only current caller, and rdma_add_block the only function it calls using it. Pass the name of the ramblock to the function; helps in debugging. Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Reviewed-by: Amit Shah <amit.shah@redhat.com> Reviewed-by: Michael R. Hines <mrhines@us.ibm.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
* | rdma: Fix qemu crash when IPv6 address is used for migrationPadmanabh Ratnakar2015-06-121-0/+7
|/ | | | | | | | | | Qemu crashes when IPv6 address is specified for migration and access to any RDMA uverbs device available on the system is blocked using cgroups. Fix the crash by checking the return value of ibv_open_device routine. Signed-off-by: Meghana Cheripady <meghana.cheripady@avagotech.com> Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@avagotech.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
* rdma: Fix cleanup in error pathsPadmanabh Ratnakar2015-03-261-14/+8
| | | | | | | | | | | | | | As part of commit e325b49a320b493cc5d69e263751ff716dc458fe, order in which resources are destroyed was changed for fixing a seg fault. Due to this change, CQ will never get destroyed as CQ should be destroyed after QP destruction. Seg fault is caused improper cleanup when connection fails. Fixing cleanup after connection failure and order in which resources are destroyed in qemu_rdma_cleanup() routine. Signed-off-by: Meghana Cheripady <meghana.cheripady@emulex.com> Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
* migration: Fix remaining 32 bit compiler errorsStefan Weil2015-03-171-24/+29
| | | | | | | | Fix type casts between pointers and 64 bit integers. Now 32 bit builds are possible again. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Juan Quintela <quintela@redhat.com>
* migration: Fix some 32 bit compiler errorsStefan Weil2015-03-171-12/+11
| | | | | | | | | | The current code won't compile on 32 bit hosts because there are lots of type casts between pointers and 64 bit integers. Fix some of them. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Juan Quintela <quintela@redhat.com>
* migration/rdma: clean up qemu_rdma_dest_init a bitMichael Tokarev2015-03-171-29/+22
| | | | | | | | | | | | | | | | | Do not check for rdma->host being empty twice. This removes a large "if" block, so code indentation is changed. While at it, remove an ugly goto from the loop, replacing it with a cleaner if logic. And finally, there's no need to initialize `ret' variable since is always has a value. Signed-off-by: Michael Tokarev <mjt@tls.msk.ru> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Tested-by: Dr. David Alan Gilbert <dgilbert@redhat.com> -- fixed space detected by Dave Signed-off-by: Juan Quintela <quintela@redhat.com>
* ram: make all save_page functions take a uint64_t parameterJuan Quintela2015-03-161-1/+1
| | | | | | | | It used to be an int, but then we can't pass directly the bytes_transferred parameter, that would happen later in the series. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Amit Shah <amit.shah@redhat.com>
* migration: Fix coding style (whitespace issues)Stefan Weil2015-03-101-10/+10
| | | | | | | | | | | * Remove trailing whitespace (fixes 9 errors from checkpatch.pl). One comment line was longer than 80 characters, so wrap it and fix a typo, too. * Replace tabs by blanks (fixes 1 error). Signed-off-by: Stefan Weil <sw@weilnetz.de> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
* Remove superfluous '\n' around error_report()Gonglei2015-03-101-1/+1
| | | | | | Signed-off-by: Gonglei <arei.gonglei@huawei.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
* unbreak dtrace tracing due to double _ in rdma namesDr. David Alan Gilbert2015-03-021-13/+11
| | | | | | | | | | | | | | | | It looks like the dtrace trace code gets upset if you have trace names with __ in, which the migration/rdma.c code does. Rename the functions and the associated traces. Fixes: 733252deb8b7d37beacda5976c2769e18642b2fa Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reported-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Tested-by: Andreas Färber <afaerber@suse.de> Message-id: 1424105885-12149-1-git-send-email-dgilbert@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* migration: Fix warnings caused by missing 'static' attributeStefan Weil2015-02-101-4/+4
| | | | | | | | | | | | | | | | | | Warnings from the Sparse static analysis tool: migration-rdma.c:151:12: warning: symbol 'wrid_desc' was not declared. Should it be static? migration-rdma.c:190:12: warning: symbol 'control_desc' was not declared. Should it be static? migration-rdma.c:3301:19: warning: symbol 'rdma_read_ops' was not declared. Should it be static? migration-rdma.c:3308:19: warning: symbol 'rdma_write_ops' was not declared. Should it be static? Cc: Juan Quintela <quintela@redhat.com> Cc: Amit Shah <amit.shah@redhat.com> Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
* rdma: g_malloc0() can't fail, bury dead error handlingMarkus Armbruster2015-02-101-3/+0
| | | | | | | Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Gonglei <arei.gonglei@huawei.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
* Tracify migration/rdma.cDr. David Alan Gilbert2015-02-051-189/+144
| | | | | | | | | Turn all the D/DD/DDDPRINTFs into trace events Turn most of the fprintf(stderr, into error_report Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
* Remove migration- pre/post fixes off files in migration/ dirDr. David Alan Gilbert2014-12-161-0/+3438
The general feeling is that having migration/migration-blah is overkill. Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: Amit Shah <amit.shah@redhat.com>
OpenPOWER on IntegriCloud