[ofa-general] Re: [PATCH] core/iwcm: remove IB_ACCESS_LOCAL_WRITE in remote QP attributes
Roland Dreier
rdreier at cisco.com
Mon Jul 21 09:47:08 PDT 2008
> - qp_attr->qp_access_flags = IB_ACCESS_LOCAL_WRITE |
> - IB_ACCESS_REMOTE_WRITE|
> + qp_attr->qp_access_flags = IB_ACCESS_REMOTE_WRITE|
> IB_ACCESS_REMOTE_READ;
makes sense, applied. Steve, this patch is correct, right?
This nes code looks really strange:
if (attr_mask & IB_QP_ACCESS_FLAGS) {
if (attr->qp_access_flags & IB_ACCESS_LOCAL_WRITE) {
nesqp->nesqp_context->misc |= cpu_to_le32(NES_QPCONTEXT_MISC_RDMA_WRITE_EN |
NES_QPCONTEXT_MISC_RDMA_READ_EN);
issue_modify_qp = 1;
}
if (attr->qp_access_flags & IB_ACCESS_REMOTE_WRITE) {
nesqp->nesqp_context->misc |= cpu_to_le32(NES_QPCONTEXT_MISC_RDMA_WRITE_EN);
issue_modify_qp = 1;
}
if (attr->qp_access_flags & IB_ACCESS_REMOTE_READ) {
nesqp->nesqp_context->misc |= cpu_to_le32(NES_QPCONTEXT_MISC_RDMA_READ_EN);
issue_modify_qp = 1;
}
if (attr->qp_access_flags & IB_ACCESS_MW_BIND) {
nesqp->nesqp_context->misc |= cpu_to_le32(NES_QPCONTEXT_MISC_WBIND_EN);
issue_modify_qp = 1;
}
if (nesqp->user_mode) {
nesqp->nesqp_context->misc |= cpu_to_le32(NES_QPCONTEXT_MISC_RDMA_WRITE_EN |
NES_QPCONTEXT_MISC_RDMA_READ_EN);
issue_modify_qp = 1;
}
}
should it just be rewritten to:
if (attr->qp_access_flags & IB_ACCESS_REMOTE_WRITE) {
nesqp->nesqp_context->misc |= cpu_to_le32(NES_QPCONTEXT_MISC_RDMA_WRITE_EN);
issue_modify_qp = 1;
}
if (attr->qp_access_flags & IB_ACCESS_REMOTE_READ) {
nesqp->nesqp_context->misc |= cpu_to_le32(NES_QPCONTEXT_MISC_RDMA_READ_EN);
issue_modify_qp = 1;
}
if (attr->qp_access_flags & IB_ACCESS_MW_BIND) {
nesqp->nesqp_context->misc |= cpu_to_le32(NES_QPCONTEXT_MISC_WBIND_EN);
issue_modify_qp = 1;
}
I don't see why setting LOCAL_WRITE should imply both RDMA permissions,
or why you always want to set those permissions for usermode QPs ??
- R.
More information about the general
mailing list