Patchwork [3/3] rdma: use RDMA_WRID_READY

login
register
mail settings
Submitter Isaku Yamahata
Date Aug. 2, 2013, 3:56 a.m.
Message ID <3d7c209918e388c331add55b2552379852fab96a.1375415452.git.yamahata@private.email.ne.jp>
Download mbox | patch
Permalink /patch/264178/
State New
Headers show

Comments

Isaku Yamahata - Aug. 2, 2013, 3:56 a.m.
Cc: Michael R. Hines <mrhines@us.ibm.com>
Signed-off-by: Isaku Yamahata <yamahata@private.email.ne.jp>
---
 migration-rdma.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
mrhines@linux.vnet.ibm.com - Aug. 2, 2013, 1:40 p.m.
On 08/01/2013 11:56 PM, Isaku Yamahata wrote:
> Cc: Michael R. Hines <mrhines@us.ibm.com>
> Signed-off-by: Isaku Yamahata <yamahata@private.email.ne.jp>
> ---
>   migration-rdma.c |    4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/migration-rdma.c b/migration-rdma.c
> index 67069d2..871f9cd 100644
> --- a/migration-rdma.c
> +++ b/migration-rdma.c
> @@ -2221,7 +2221,7 @@ static int qemu_rdma_connect(RDMAContext *rdma, Error **errp)
>
>       rdma_ack_cm_event(cm_event);
>
> -    ret = qemu_rdma_post_recv_control(rdma, 0);
> +    ret = qemu_rdma_post_recv_control(rdma, RDMA_WRID_READY);
>       if (ret) {
>           ERROR(errp, "posting second control recv!\n");
>           goto err_rdma_source_connect;
> @@ -2726,7 +2726,7 @@ static int qemu_rdma_accept(RDMAContext *rdma)
>
>       rdma_ack_cm_event(cm_event);
>
> -    ret = qemu_rdma_post_recv_control(rdma, 0);
> +    ret = qemu_rdma_post_recv_control(rdma, RDMA_WRID_READY);
>       if (ret) {
>           fprintf(stderr, "rdma migration: error posting second control recv!\n");
>           goto err_rdma_dest_wait;

Good catch too.

Reviewed-by: Michael R. Hines <mrhines@us.ibm.com>

Patch

diff --git a/migration-rdma.c b/migration-rdma.c
index 67069d2..871f9cd 100644
--- a/migration-rdma.c
+++ b/migration-rdma.c
@@ -2221,7 +2221,7 @@  static int qemu_rdma_connect(RDMAContext *rdma, Error **errp)
 
     rdma_ack_cm_event(cm_event);
 
-    ret = qemu_rdma_post_recv_control(rdma, 0);
+    ret = qemu_rdma_post_recv_control(rdma, RDMA_WRID_READY);
     if (ret) {
         ERROR(errp, "posting second control recv!\n");
         goto err_rdma_source_connect;
@@ -2726,7 +2726,7 @@  static int qemu_rdma_accept(RDMAContext *rdma)
 
     rdma_ack_cm_event(cm_event);
 
-    ret = qemu_rdma_post_recv_control(rdma, 0);
+    ret = qemu_rdma_post_recv_control(rdma, RDMA_WRID_READY);
     if (ret) {
         fprintf(stderr, "rdma migration: error posting second control recv!\n");
         goto err_rdma_dest_wait;