migration: Fix coding style (whitespace issues)
* 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>
This commit is contained in:
parent
2a0457bbba
commit
02942db798
@ -702,7 +702,7 @@ static void qemu_rdma_dump_id(const char *who, struct ibv_context *verbs)
|
|||||||
verbs->device->ibdev_path,
|
verbs->device->ibdev_path,
|
||||||
port.link_layer,
|
port.link_layer,
|
||||||
(port.link_layer == IBV_LINK_LAYER_INFINIBAND) ? "Infiniband" :
|
(port.link_layer == IBV_LINK_LAYER_INFINIBAND) ? "Infiniband" :
|
||||||
((port.link_layer == IBV_LINK_LAYER_ETHERNET)
|
((port.link_layer == IBV_LINK_LAYER_ETHERNET)
|
||||||
? "Ethernet" : "Unknown"));
|
? "Ethernet" : "Unknown"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -737,7 +737,7 @@ static void qemu_rdma_dump_gid(const char *who, struct rdma_cm_id *id)
|
|||||||
* and validate what time of hardware it is.
|
* and validate what time of hardware it is.
|
||||||
*
|
*
|
||||||
* Unfortunately, this puts the user in a fix:
|
* Unfortunately, this puts the user in a fix:
|
||||||
*
|
*
|
||||||
* If the source VM connects with an IPv4 address without knowing that the
|
* If the source VM connects with an IPv4 address without knowing that the
|
||||||
* destination has bound to '[::]' the migration will unconditionally fail
|
* destination has bound to '[::]' the migration will unconditionally fail
|
||||||
* unless the management software is explicitly listening on the the IPv4
|
* unless the management software is explicitly listening on the the IPv4
|
||||||
@ -745,13 +745,13 @@ static void qemu_rdma_dump_gid(const char *who, struct rdma_cm_id *id)
|
|||||||
*
|
*
|
||||||
* If the source VM connects with an IPv6 address, then we're OK because we can
|
* 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).
|
* 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
|
* But in mixed environments, this will be broken for a while until it is fixed
|
||||||
* inside linux.
|
* inside linux.
|
||||||
*
|
*
|
||||||
* We do provide a *tiny* bit of help in this function: We can list all of the
|
* We do provide a *tiny* bit of help in this function: We can list all of the
|
||||||
* devices in the system and check to see if all the devices are RoCE or
|
* devices in the system and check to see if all the devices are RoCE or
|
||||||
* Infiniband.
|
* Infiniband.
|
||||||
*
|
*
|
||||||
* If we detect that we have a *pure* RoCE environment, then we can safely
|
* If we detect that we have a *pure* RoCE environment, then we can safely
|
||||||
* thrown an error even if the management software has specified '[::]' as the
|
* thrown an error even if the management software has specified '[::]' as the
|
||||||
@ -770,17 +770,17 @@ static int qemu_rdma_broken_ipv6_kernel(Error **errp, struct ibv_context *verbs)
|
|||||||
/* This bug only exists in linux, to our knowledge. */
|
/* This bug only exists in linux, to our knowledge. */
|
||||||
#ifdef CONFIG_LINUX
|
#ifdef CONFIG_LINUX
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Verbs are only NULL if management has bound to '[::]'.
|
* Verbs are only NULL if management has bound to '[::]'.
|
||||||
*
|
*
|
||||||
* Let's iterate through all the devices and see if there any pure IB
|
* Let's iterate through all the devices and see if there any pure IB
|
||||||
* devices (non-ethernet).
|
* devices (non-ethernet).
|
||||||
*
|
*
|
||||||
* If not, then we can safely proceed with the migration.
|
* If not, then we can safely proceed with the migration.
|
||||||
* Otherwise, there are no guarantees until the bug is fixed in linux.
|
* Otherwise, there are no guarantees until the bug is fixed in linux.
|
||||||
*/
|
*/
|
||||||
if (!verbs) {
|
if (!verbs) {
|
||||||
int num_devices, x;
|
int num_devices, x;
|
||||||
struct ibv_device ** dev_list = ibv_get_device_list(&num_devices);
|
struct ibv_device ** dev_list = ibv_get_device_list(&num_devices);
|
||||||
bool roce_found = false;
|
bool roce_found = false;
|
||||||
bool ib_found = false;
|
bool ib_found = false;
|
||||||
@ -825,8 +825,8 @@ static int qemu_rdma_broken_ipv6_kernel(Error **errp, struct ibv_context *verbs)
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* If we have a verbs context, that means that some other than '[::]' was
|
* If we have a verbs context, that means that some other than '[::]' was
|
||||||
* used by the management software for binding. In which case we can actually
|
* used by the management software for binding. In which case we can
|
||||||
* warn the user about a potential broken kernel;
|
* actually warn the user about a potentially broken kernel.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* IB ports start with 1, not 0 */
|
/* IB ports start with 1, not 0 */
|
||||||
|
Loading…
Reference in New Issue
Block a user