aboutsummaryrefslogtreecommitdiff
path: root/migration-rdma.c
AgeCommit message (Collapse)Author
2013-09-01rdma: silly ipv6 bugfixMichael R. Hines
My bad - but it's very important for us to warn the user that IPv6 is broken on RoCE in linux right now, until linux releases a fixed version. Signed-off-by: Michael R. Hines <mrhines@us.ibm.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-09-01misc: Fix some typos in names and commentsStefan Weil
Most typos were found using a modified version of codespell: accross -> across issueing -> issuing TICNT_THRESHHOLD -> TICNT_THRESHOLD bandwith -> bandwidth VCARD_7816_PROPIETARY -> VCARD_7816_PROPRIETARY occured -> occurred gaurantee -> guarantee sofware -> software Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-08-12rdma: IPv6 over Ethernet (RoCE) is broken in linux - workaroundMichael R. Hines
We've gotten reports from multiple testers (including Frank Yangjie and myself) that RDMA IPv6 support over RocE (Ethernet) is broken in linux. A patch to Linux is still in review: http://comments.gmane.org/gmane.linux.drivers.rdma/16448 If the user is listening on '[::]', then we will not have a opened a device yet and have no way of verifying if the device is RoCE or not. In this case, the source VM will throw an error for ALL types of connections (both IPv4 and IPv6) if the destination machine does not have a regular infiniband network available for use. The only way to gaurantee that an error is thrown for broken kernels is for the management software to choose a *specific* interface at bind time and validate what time of hardware it is. Unfortunately, this puts the user in a fix: If the source VM connects with an IPv4 address without knowing that the destination has bound to '[::]' the migration will unconditionally fail unless the management software is not explicitly listening on the the IPv4 address while using a RoCE-based device. If the source VM connects with an IPv6 address, then we're OK because we can throw an error on the source (and similarly on the destination). But in mixed environments, this will be broken for a while until it is fixed inside linux. We do provide a *tiny* bit of help in mixed environments, though in this patch: We can list all of the devices in the system and check to see if all the devices are RoCE or Infiniband. If we detect that we have a *pure* RoCE environment, then we can safely thrown an error even if the management sofware has specified '[::]' as the bind address. However, if there is are multiple hetergeneous devices, then we cannot make this assumption and the user just has to be sure they know what they are doing. Signed-off-by: Michael R. Hines <mrhines@us.ibm.com> Message-id: 1376078746-24948-6-git-send-email-mrhines@linux.vnet.ibm.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-08-12rdma: proper getaddrinfo() handlingMichael R. Hines
getaddrinfo() already knows what it's doing, but it can potentially return multiple addresses. We need to handle that... Reviewed-by: Orit Wasserman <owasserm@redhat.com> Signed-off-by: Michael R. Hines <mrhines@us.ibm.com> Message-id: 1376078746-24948-5-git-send-email-mrhines@linux.vnet.ibm.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-08-12rdma: check if RDMAControlHeader::len match transferred byteIsaku Yamahata
RDMAControlHeader::len is provided from remote, so check if the value match the actual transferred byte_len. Reviewed-by: Orit Wasserman <owasserm@redhat.com> Reviewed-by: Michael R. Hines <mrhines@us.ibm.com> Signed-off-by: Isaku Yamahata <yamahata@private.email.ne.jp> Signed-off-by: Michael R. Hines <mrhines@us.ibm.com> Message-id: 1376078746-24948-4-git-send-email-mrhines@linux.vnet.ibm.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-08-12rdma: validate RDMAControlHeader::lenIsaku Yamahata
RMDAControlHeader::len is provided from remote, so validate it. Reviewed-by: Orit Wasserman <owasserm@redhat.com> Reviewed-by: Michael R. Hines <mrhines@us.ibm.com> Signed-off-by: Isaku Yamahata <yamahata@private.email.ne.jp> Signed-off-by: Michael R. Hines <mrhines@us.ibm.com> Message-id: 1376078746-24948-3-git-send-email-mrhines@linux.vnet.ibm.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-08-12rdma: use resp.len after validation in qemu_rdma_registration_stopIsaku Yamahata
resp.len is given from remote host. So should be validated before use. Otherwise memcpy can access beyond the buffer. Cc: Michael R. Hines <mrhines@us.ibm.com> Reviewed-by: Orit Wasserman <owasserm@redhat.com> Reviewed-by: Michael R. Hines <mrhines@us.ibm.com> Signed-off-by: Isaku Yamahata <yamahata@private.email.ne.jp> Signed-off-by: Michael R. Hines <mrhines@us.ibm.com> Message-id: 1376078746-24948-2-git-send-email-mrhines@linux.vnet.ibm.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-08-05rdma: memory leak RDMAContext::hostIsaku Yamahata
It is allocated by g_strdup(), so needs to be freed. Reviewed-by: Michael R. Hines <mrhines@us.ibm.com> Signed-off-by: Isaku Yamahata <yamahata@private.email.ne.jp> Signed-off-by: Michael R. Hines <mrhines@us.ibm.com> Message-id: 1375584894-9917-8-git-send-email-mrhines@linux.vnet.ibm.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-08-05rdma: use RDMA_WRID_READYIsaku Yamahata
Reviewed-by: Michael R. Hines <mrhines@us.ibm.com> Signed-off-by: Isaku Yamahata <yamahata@private.email.ne.jp> Signed-off-by: Michael R. Hines <mrhines@us.ibm.com> Message-id: 1375584894-9917-7-git-send-email-mrhines@linux.vnet.ibm.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-08-05rdma: qemu_rdma_post_send_control uses wrongly RDMA_WRID_MAXIsaku Yamahata
RDMA_WRID_CONTROL should be used. And remove related work around. Reviewed-by: Michael R. Hines <mrhines@us.ibm.com> Signed-off-by: Isaku Yamahata <yamahata@private.email.ne.jp> Signed-off-by: Michael R. Hines <mrhines@us.ibm.com> Message-id: 1375584894-9917-6-git-send-email-mrhines@linux.vnet.ibm.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-08-05rdma: don't use negative index to arrayIsaku Yamahata
Reviewed-by: Michael R. Hines <mrhines@us.ibm.com> Signed-off-by: Isaku Yamahata <yamahata@private.email.ne.jp> Signed-off-by: Michael R. Hines <mrhines@us.ibm.com> Message-id: 1375584894-9917-5-git-send-email-mrhines@linux.vnet.ibm.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-08-05rdma: correct newlines in error statementsMichael R. Hines
Don't print newlines on the error_setg() function, but still allow newlines on fprintf(). Signed-off-by: Michael R. Hines <mrhines@us.ibm.com> Message-id: 1375584894-9917-4-git-send-email-mrhines@linux.vnet.ibm.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-08-05rdma: forgot to turn off the debugging flagMichael R. Hines
Ooops. We forgot to turn off the flag. Signed-off-by: Michael R. Hines <mrhines@us.ibm.com> Message-id: 1375584894-9917-3-git-send-email-mrhines@linux.vnet.ibm.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-08-05rdma: bugfix: make IPv6 support workMichael R. Hines
RDMA does not use sockets, so we cannot use many of the socket helper functions, but we *do* use inet_parse() which gives RDMA all the necessary details of the connection parameters. However, when testing with libvirt, a simple IPv6 migration test failed because we were not using getaddrinfo() properly. This makes IPv6 migration over RDMA work. Signed-off-by: Michael R. Hines <mrhines@us.ibm.com> Message-id: 1375584894-9917-2-git-send-email-mrhines@linux.vnet.ibm.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-27misc: Fix new typos in comments and stringsStefan Weil
All these typos were found by codespell. sould -> should emperical -> empirical intialization -> initialization successfuly -> successfully gaurantee -> guarantee Fix also another error (before before) in the same context. Signed-off-by: Stefan Weil <sw@weilnetz.de> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-07-23rdma: core logicMichael R. Hines
Code that does need to be visible is kept well contained inside this file and this is the only new additional file to the entire patch. This file includes the entire protocol and interfaces required to perform RDMA migration. Also, the configure and Makefile modifications to link this file are included. Full documentation is in docs/rdma.txt Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Chegu Vinod <chegu_vinod@hp.com> Tested-by: Chegu Vinod <chegu_vinod@hp.com> Tested-by: Michael R. Hines <mrhines@us.ibm.com> Signed-off-by: Michael R. Hines <mrhines@us.ibm.com> Signed-off-by: Juan Quintela <quintela@redhat.com>