[openib-general] mthca_modify_qp : acquiring Send/Receive Q locks while modifying qp
Devesh Sharma
devesh28 at gmail.com
Fri Sep 8 05:01:01 PDT 2006
Hello all,
In mthca_modify_qp function, to read current qp state both send and
receive queues are locked, why locking both WQ is required? Is there
any dependency on other qp operations?
if (attr_mask & IB_QP_CUR_STATE) {
cur_state = attr->cur_qp_state;
} else {
spin_lock_irq(&qp->sq.lock);
spin_lock(&qp->rq.lock);
cur_state = qp->state;
spin_unlock(&qp->rq.lock);
spin_unlock_irq(&qp->sq.lock);
}
Devesh
More information about the general
mailing list