[openib-general] [librdmacm] a question about the cma code

Dotan Barak dotanb at mellanox.co.il
Tue Aug 8 00:06:21 PDT 2006


Hi.

I noticed the following code in the librdmacm (in gen2_linux-20060807-1730 (REV=8840)):



static void ucma_copy_conn_param_to_kern(struct ucma_abi_conn_param *dst,
                                         struct rdma_conn_param *src,
                                         uint32_t qp_num,
                                         enum ibv_qp_type qp_type, uint8_t srq)
{
        dst->qp_num = qp_num;
        dst->qp_type = qp_type;
        dst->srq = srq;
        dst->responder_resources = src->responder_resources;
        dst->initiator_depth = src->initiator_depth;
        dst->flow_control = src->flow_control;
        dst->retry_count = src->retry_count;
        dst->rnr_retry_count = src->rnr_retry_count;
        dst->valid = 1;

        if (src->private_data && src->private_data_len) {
                memcpy(dst->private_data, src->private_data,
                       src->private_data_len);
                dst->private_data_len = src->private_data_len;
        } else
                src->private_data_len = 0;
}


What is the purpose of the following code line:
 src->private_data_len = 0;


Thanks
Dotan




More information about the general mailing list