public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
* max_inline_data in ibv_rc_pingpong
@ 2016-12-25 11:48 Amrani, Ram
       [not found] ` <SN1PR07MB22079DB9A8D87699539DBB01F8970-mikhvbZlbf8TSoR2DauN2+FPX92sqiQdvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Amrani, Ram @ 2016-12-25 11:48 UTC (permalink / raw)
  To: Doug Ledford, Yishai Hadas
  Cc: Elior, Ariel, linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org

Hi Yishay, Doug,
I've noticed something irregular in ibv_rc_pingpong and I see that you are listed as the maintainers of libibverbs.
It seems that max_inline_data isn't configured prior to invoking ibv_create_qp(), but it is queried directly after.
This means that for a value of zero it will always be zero, or very small, depending on the vendor implementation.
Is there some background I'm missing?

        {
                struct ibv_qp_attr attr;
                struct ibv_qp_init_attr init_attr = {
                        .send_cq = ctx->cq,
                        .recv_cq = ctx->cq,
                        .cap     = {
                                .max_send_wr  = 1,
                                .max_recv_wr  = rx_depth,
                                .max_send_sge = 1,
                                .max_recv_sge = 1
                        },
                        .qp_type = IBV_QPT_RC
                };

                ctx->qp = ibv_create_qp(ctx->pd, &init_attr);
                if (!ctx->qp)  {
                        fprintf(stderr, "Couldn't create QP\n");
                        goto clean_cq;
                }

                ibv_query_qp(ctx->qp, &attr, IBV_QP_CAP, &init_attr);
                if (init_attr.cap.max_inline_data >= size) {
                        ctx->send_flags |= IBV_SEND_INLINE;
                }
        }


Thanks,
Ram

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-12-28 12:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-25 11:48 max_inline_data in ibv_rc_pingpong Amrani, Ram
     [not found] ` <SN1PR07MB22079DB9A8D87699539DBB01F8970-mikhvbZlbf8TSoR2DauN2+FPX92sqiQdvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2016-12-25 15:51   ` Yishai Hadas
     [not found]     ` <a412a47f-74ad-cc09-4003-11b93e59f5f8-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2016-12-28  9:45       ` Amrani, Ram
     [not found]         ` <SN1PR07MB220732025C454D5E5EF69527F8680-mikhvbZlbf8TSoR2DauN2+FPX92sqiQdvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2016-12-28 12:37           ` Leon Romanovsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox