qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Michael R. Hines" <mrhines@linux.vnet.ibm.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: aliguori@us.ibm.com, quintela@redhat.com, qemu-devel@nongnu.org,
	owasserm@redhat.com, abali@us.ibm.com, mrhines@us.ibm.com,
	gokul@us.ibm.com, pbonzini@redhat.com, chegu_vinod@hp.com,
	knoel@redhat.com
Subject: Re: [Qemu-devel] [PATCH 3/6] rdma: core logic
Date: Fri, 28 Jun 2013 09:23:16 -0400	[thread overview]
Message-ID: <51CD8E44.2090201@linux.vnet.ibm.com> (raw)
In-Reply-To: <CAFEAcA9zm9P+25Mje5tDVBKp9cR2_GrnKGpEsTfTyEP3PnYYEw@mail.gmail.com>

On 06/27/2013 07:16 PM, Peter Maydell wrote:
> On 27 June 2013 23:44,  <mrhines@linux.vnet.ibm.com> wrote:
>> +if test "$rdma" != "no" ; then
>> +  cat > $TMPC <<EOF
>> +#include <rdma/rdma_cma.h>
>> +int main(void) { return 0; }
>> +EOF
>> +  rdma_libs="-lrdmacm -libverbs"
>> +  if compile_prog "-Werror" "$rdma_libs" ; then
> Do you really need -Werror in your test's CFLAGS?
> If so, you need a comment explaining why (as with the
> couple of other tests which do this). If not, just use
> "" like the majority of our tests.
>
> Also, configure's not totally consistent about it but
> (especially given where in the file you've put this) you
> could add in a comment header like the one you can just see
> for VNC at the bottom of the context:

Will drop the -Werror, no problem. (I think I copied and pasted 99% of 
the configure changes),
can't even remember why I added it in the first place. Perhaps I was 
debugging something
and forgot to remove it....

>> +    rdma="yes"
>> +    libs_softmmu="$libs_softmmu $rdma_libs"
>> +  else
>> +    if test "$rdma" = "yes" ; then
>> +      feature_not_found "rdma"
>> +    fi
>> +    rdma="no"
>> +  fi
>> +fi
>> +
>>   ##########################################
>>   # VNC TLS/WS detection
>>   if test "$vnc" = "yes" -a \( "$vnc_tls" != "no" -o "$vnc_ws" != "no" \) ; then
> ...there.
>

Acknowledged.

>> @@ -3525,6 +3549,7 @@ echo "Linux AIO support $linux_aio"
>>   echo "ATTR/XATTR support $attr"
>>   echo "Install blobs     $blobs"
>>   echo "KVM support       $kvm"
>> +echo "RDMA support      $rdma"
>>   echo "TCG interpreter   $tcg_interpreter"
>>   echo "fdt support       $fdt"
>>   echo "preadv support    $preadv"
>> @@ -4464,6 +4489,10 @@ if [ "$pixman" = "internal" ]; then
>>     echo "config-host.h: subdir-pixman" >> $config_host_mak
>>   fi
>>
>> +if test "$rdma" = "yes" ; then
>> +echo "CONFIG_RDMA=y" >> $config_host_mak
>> +fi
>> +
> This is definitely completely the wrong place for this hunk:
> you've put it between the two "here's a submodule directory"
> stanzas. Put it further up with all the other simple "if
> thing then echo to $config_host_mak" checks (VNC and so on).
>
> Also, you need to indent the echo line.

Acknowledged.

>>   if [ "$dtc_internal" = "yes" ]; then
>>     echo "config-host.h: subdir-dtc" >> $config_host_mak
>>   fi
>> +const char *wrid_desc[] = {
>> +        [RDMA_WRID_NONE] = "NONE",
>> +        [RDMA_WRID_RDMA_WRITE] = "WRITE RDMA",
>> +        [RDMA_WRID_SEND_CONTROL] = "CONTROL SEND",
>> +        [RDMA_WRID_RECV_CONTROL] = "CONTROL RECV",
>> +};
> Weird indent (here and elsewhere).

Acknowledged.

>> +/*
>> + * Also represents a RAMblock, but only on the dest.
>> + * This gets transmitted by the dest during connection-time
>> + * to the source VM and then is used to populate the
>> + * corresponding RDMALocalBlock with
>> + * the information needed to perform the actual RDMA.
>> + */
>> +typedef struct QEMU_PACKED RDMARemoteBlock {
>> +    uint64_t remote_host_addr;
>> +    uint64_t offset;
>> +    uint64_t length;
>> +    uint32_t remote_rkey;
>> +    uint32_t padding;
>> +} QEMU_PACKED RDMARemoteBlock;
> I assume from the PACKED annotations (do we really need both,
> incidentally) that this is shared with either the guest or
> with another instance of QEMU. Are there definitely no
> endianness issues to deal with here?

I have ntohl()/htonl() on the protocol headers, but I did not
add them for the data portions of the protocol.


Is endianess for the data a big issue when you are assume the migration
is happening across identical CPU architectures?


>> +                DDPRINTF("Ungegistration request (%d): "
> Typo.

I have ntohl()/htonl() on the protocol headers, but I did not
add them for the data portions of the protocol.


>> --- a/migration.c
>> +++ b/migration.c
>> @@ -78,6 +78,10 @@ void qemu_start_incoming_migration(const char *uri, Error **errp)
>>
>>       if (strstart(uri, "tcp:", &p))
>>           tcp_start_incoming_migration(p, errp);
>> +#ifdef CONFIG_RDMA
>> +    else if (strstart(uri, "x-rdma:", &p))
>> +        rdma_start_incoming_migration(p, errp);
>> +#endif
>>   #if !defined(WIN32)
>>       else if (strstart(uri, "exec:", &p))
>>           exec_start_incoming_migration(p, errp);
>> @@ -407,6 +411,10 @@ void qmp_migrate(const char *uri, bool has_blk, bool blk,
>>
>>       if (strstart(uri, "tcp:", &p)) {
>>           tcp_start_outgoing_migration(s, p, &local_err);
>> +#ifdef CONFIG_RDMA
>> +    } else if (strstart(uri, "x-rdma:", &p)) {
>> +        rdma_start_outgoing_migration(s, p, &local_err);
>> +#endif
>>   #if !defined(WIN32)
>>       } else if (strstart(uri, "exec:", &p)) {
>>           exec_start_outgoing_migration(s, p, &local_err);
> This code is begging to be refactored into something
> table driven.
>
> -- PMM
>

  reply	other threads:[~2013-06-28 13:23 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-27 22:44 [Qemu-devel] [PATCH 0/6] rdma: core logic and unpin support mrhines
2013-06-27 22:44 ` [Qemu-devel] [PATCH 1/6] rdma: update documentation to reflect new " mrhines
2013-06-27 23:09   ` Eric Blake
2013-06-28 13:17     ` Michael R. Hines
2013-06-27 22:44 ` [Qemu-devel] [PATCH 2/6] rdma: introduce ram_handle_compressed() mrhines
2013-06-27 22:56   ` Peter Maydell
2013-06-28  7:17     ` Paolo Bonzini
2013-06-27 22:44 ` [Qemu-devel] [PATCH 3/6] rdma: core logic mrhines
2013-06-27 23:16   ` Peter Maydell
2013-06-28 13:23     ` Michael R. Hines [this message]
2013-06-28 13:28       ` Peter Maydell
2013-06-28 14:00         ` Michael R. Hines
2013-06-28 14:07           ` Peter Maydell
2013-06-28 14:22             ` Michael R. Hines
2013-06-28  7:33   ` Paolo Bonzini
2013-06-28 14:11     ` Michael R. Hines
2013-06-27 22:44 ` [Qemu-devel] [PATCH 4/6] rdma: allow state transitions between other states besides ACTIVE mrhines
2013-06-27 23:10   ` Eric Blake
2013-06-28  7:34     ` Paolo Bonzini
2013-06-27 22:44 ` [Qemu-devel] [PATCH 5/6] rdma: introduce MIG_STATE_NONE and change MIG_STATE_SETUP state transition mrhines
2013-06-27 22:44 ` [Qemu-devel] [PATCH 6/6] rdma: account for the time spent in MIG_STATE_SETUP through QMP mrhines

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51CD8E44.2090201@linux.vnet.ibm.com \
    --to=mrhines@linux.vnet.ibm.com \
    --cc=abali@us.ibm.com \
    --cc=aliguori@us.ibm.com \
    --cc=chegu_vinod@hp.com \
    --cc=gokul@us.ibm.com \
    --cc=knoel@redhat.com \
    --cc=mrhines@us.ibm.com \
    --cc=owasserm@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).