[openib-general] create several RC QPs with the same init attributes structure cau ses the init attribute structure to be changed

Dotan Barak dotanb at mellanox.co.il
Wed Aug 3 08:25:27 PDT 2005


I work with gen2 with svn rev 2946 on Mellanox HCA 23108.

When i try to create several RC QPs with the same init attributes structure,

i can see that this structure is being changed by the verb.

here is the test code:


        {
                struct ibv_qp_init_attr attr = {
                        .send_cq = cq,
                        .recv_cq = cq,
                        .cap     = {
                                .max_send_wr  = 1,
                                .max_recv_wr  = 1,
                                .max_send_sge = 1,
                                .max_recv_sge = 1,
                                .max_inline_data = 0,
                        },
                        .qp_type = 2,
                };

                for (i = 0; i < num_qp; ++i) {
                        printf("s_wr %u, r_wr %u, s_sge %u, r_sge %u,
max_inline %u\n",
                               attr.cap.max_send_wr, attr.cap.max_recv_wr,
attr.cap.max_send_sge, attr.cap.max_recv_sge, attr.cap.max_inline_data);
                        qp[i] = ibv_create_qp(pd, &attr);
                        CHECK_STRUCT("ibv_create_qp", qp[i], printf("%d
\n",i); getchar(); return -1);
                }
        }

here is the test output:

s_wr 1, r_wr 1, s_sge 1, r_sge 1, max_inline 0
s_wr 1, r_wr 1, s_sge 1, r_sge 1, max_inline 28
s_wr 1, r_wr 1, s_sge 2, r_sge 1, max_inline 92
s_wr 1, r_wr 1, s_sge 6, r_sge 1, max_inline 220
s_wr 1, r_wr 1, s_sge 14, r_sge 1, max_inline 476
line 91, Error in ibv_create_qp, NULL pointer returned
4



When i try execute the same code with UD/UC QPs everything is just fine and
the init attributes structure is not being changed by the verb.


Dotan Barak
Software Verification Engineer
Mellanox Technologies LTD
mailto:dotanb at mellanox.co.il
Tel: +972-4-9097200 Ext: 231 Fax: +972-4-9593245
P.O. Box 86 Yokneam 20692 ISRAEL.
Home: +972-4-8289408  Cell: 052-4222383

[ May the fork be with you ]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openfabrics.org/pipermail/general/attachments/20050803/5a2f637c/attachment.html>


More information about the general mailing list