All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Orit Wasserman <owasserm@redhat.com>
Cc: aliguori@us.ibm.com, quintela@redhat.com, mst@redhat.com,
	qemu-devel@nongnu.org, mrhines@linux.vnet.ibm.com,
	abali@us.ibm.com, mrhines@us.ibm.com, gokul@us.ibm.com
Subject: Re: [Qemu-devel] [PULL v3 4/7] rdma: core logic
Date: Wed, 17 Apr 2013 16:09:27 +0200	[thread overview]
Message-ID: <516EAD17.3080202@redhat.com> (raw)
In-Reply-To: <516E856B.7040003@redhat.com>

Il 17/04/2013 13:20, Orit Wasserman ha scritto:
>> +/*
>> + * Virtual address of the above structures used for transmitting
>> + * the RAMBlock descriptions at connection-time.
>> + */
>> +typedef struct RDMALocalBlocks {
>> +    int num_blocks;
>> +    RDMALocalBlock *block;
>> +} RDMALocalBlocks;
>> +
> 
> Why not use some glib container?
> If you need to find a block by offset it will be more simple and efficient.

I think it's okay, the num_blocks is small and static.

>> +static int qemu_rdma_connect(RDMAContext *rdma, Error **errp)
>> +{
>> +    RDMAControlHeader head;
>> +    RDMACapabilities cap = {
>> +                                .version = RDMA_CONTROL_VERSION_CURRENT,
>> +                                .flags = 0,
>> +                           };
>> +    struct rdma_conn_param conn_param = { .initiator_depth = 2,
>> +                                          .retry_count = 5,
>> +                                          .private_data = &cap,
>> +                                          .private_data_len = sizeof(cap),
>> +                                        };
>> +    struct rdma_cm_event *cm_event;
>> +    int ret;
>> +    int idx = 0;
>> +    int x;
>> +
>> +    if (rdma->chunk_register_destination) {
>> +        printf("Server dynamic registration requested.\n");
> 
> Debug ?

Right, please remove.

>> +        cap.flags |= RDMA_CAPABILITY_CHUNK_REGISTER;
>> +    }
>> +
>> +    caps_to_network(&cap);
>> +
>> +    ret = rdma_connect(rdma->cm_id, &conn_param);
>> +    if (ret) {
>> +        perror("rdma_connect");
> 
> Please use errp and set it ...

All good catches with errp, I completely missed it in my review!

Thanks,

Paolo

  reply	other threads:[~2013-04-17 14:09 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-17  4:20 [Qemu-devel] [PULL v3 0/7] rdma: migration support mrhines
2013-04-17  4:20 ` [Qemu-devel] [PULL v3 1/7] rdma: introduce qemu_ram_foreach_block mrhines
2013-04-17  4:20 ` [Qemu-devel] [PULL v3 2/7] rdma: new QEMUFileOps hooks mrhines
2013-04-17 10:13   ` Orit Wasserman
2013-04-17 10:17     ` Paolo Bonzini
2013-04-17 10:29       ` Orit Wasserman
2013-04-17 16:02     ` Michael R. Hines
2013-04-17  4:20 ` [Qemu-devel] [PULL v3 3/7] rdma: introduce capability for chunk registration mrhines
2013-04-17 15:44   ` Eric Blake
2013-04-17 16:00     ` Michael R. Hines
2013-04-17  4:20 ` [Qemu-devel] [PULL v3 4/7] rdma: core logic mrhines
2013-04-17  9:16   ` Paolo Bonzini
2013-04-17 18:44     ` Michael R. Hines
2013-04-17 11:20   ` Orit Wasserman
2013-04-17 14:09     ` Paolo Bonzini [this message]
2013-04-17 19:54     ` Michael R. Hines
2013-04-17  4:20 ` [Qemu-devel] [PULL v3 5/7] rdma: send pc.ram mrhines
2013-04-17  9:35   ` Paolo Bonzini
2013-04-17  4:20 ` [Qemu-devel] [PULL v3 6/7] rdma: print throughput while debugging mrhines
2013-04-17  4:20 ` [Qemu-devel] [PULL v3 7/7] rdma: add documentation mrhines
2013-04-17 15:52   ` Eric Blake
2013-04-17 16:01     ` Michael R. Hines

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=516EAD17.3080202@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=abali@us.ibm.com \
    --cc=aliguori@us.ibm.com \
    --cc=gokul@us.ibm.com \
    --cc=mrhines@linux.vnet.ibm.com \
    --cc=mrhines@us.ibm.com \
    --cc=mst@redhat.com \
    --cc=owasserm@redhat.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.