[openib-general] modify UD QP error

amith rajith mamidala mamidala at cse.ohio-state.edu
Fri Jan 27 14:47:55 PST 2006


I was trying to modify a UD QP to init state and the modify call
was failing with an error code of 22, I am including the code snippet
which does create/ modify of the QP:

    memset (&qp_init_attr, 0, sizeof (qp_init_attr));
    qp_init_attr.cap.max_recv_wr = 100;
    qp_init_attr.cap.max_send_wr = 100;
    qp_init_attr.cap.max_recv_sge = 10;
    qp_init_attr.cap.max_send_sge = 10;
    qp_init_attr.cap.max_inline_data = 0;
    qp_init_attr.recv_cq = ud_rcq_hndl;  /* Created earlier */
    qp_init_attr.send_cq = ud_scq_hndl;  /* Created earlier */
    qp_init_attr.sq_sig_all = 0;
    qp_init_attr.qp_type = IBV_QPT_UD;

    ud_qp_hndl= ibv_create_qp (ptag, &qp_init_attr);  /* ptag allocated
								earlier */

    memset (&qp_attr, 0, sizeof (qp_attr));
    qp_attr.qp_state = IBV_QPS_INIT;
    qp_attr.pkey_index = 0;
    qp_attr.port_num   = 0;
    qp_attr.qkey = 0;
    if (ret = ibv_modify_qp(ud_qp_hndl, &qp_attr,
                IBV_QP_STATE        |
                IBV_QP_PKEY_INDEX   |
                IBV_QP_PORT     |
                IBV_QP_QKEY))

error : 22

Thanks,
Amith





More information about the general mailing list