From acd8f452908c553f22e47133dbda28df03094596 Mon Sep 17 00:00:00 2001 From: Roland Dreier Date: Tue, 25 Oct 2005 23:00:45 +0000 Subject: [PATCH] Fix QP attr masks in ibv_uc_pingpong Fix QP attribute masks used in ibv_uc_pingpong -- now that mthca correctly fails if we try to set RDMA/atomic capabilities for UC QPs, the examples need to be fixed as well. Signed-off-by: Roland Dreier --- ChangeLog | 5 +++++ examples/uc_pingpong.c | 8 ++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index e90e01c..521fbfc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2005-10-25 Roland Dreier + * examples/uc_pingpong.c (pp_connect_ctx): Fix QP attribute masks + used to modify QP to RTR and RTS -- we should not be setting + RDMA/atomic attributes for UC QPs. Now that the mthca kernel + driver bug is fixed, the error is exposed here. + * examples/rc_pingpong.c, examples/srq_pingpong.c, examples/uc_pingpong.c, examples/ud_pingpong.c: Keep track of whether send and/or receive is pending. This avoids failures when diff --git a/examples/uc_pingpong.c b/examples/uc_pingpong.c index 5f25245..a18cc4f 100644 --- a/examples/uc_pingpong.c +++ b/examples/uc_pingpong.c @@ -97,7 +97,6 @@ static int pp_connect_ctx(struct pingpong_context *ctx, int port, int my_psn, .path_mtu = IBV_MTU_1024, .dest_qp_num = dest->qpn, .rq_psn = dest->psn, - .max_dest_rd_atomic = 1, .ah_attr = { .is_global = 0, .dlid = dest->lid, @@ -111,19 +110,16 @@ static int pp_connect_ctx(struct pingpong_context *ctx, int port, int my_psn, IBV_QP_AV | IBV_QP_PATH_MTU | IBV_QP_DEST_QPN | - IBV_QP_RQ_PSN | - IBV_QP_MAX_DEST_RD_ATOMIC)) { + IBV_QP_RQ_PSN)) { fprintf(stderr, "Failed to modify QP to RTR\n"); return 1; } attr.qp_state = IBV_QPS_RTS; attr.sq_psn = my_psn; - attr.max_rd_atomic = 1; if (ibv_modify_qp(ctx->qp, &attr, IBV_QP_STATE | - IBV_QP_SQ_PSN | - IBV_QP_MAX_QP_RD_ATOMIC)) { + IBV_QP_SQ_PSN)) { fprintf(stderr, "Failed to modify QP to RTS\n"); return 1; } -- 2.41.0