[ofa-general] Re: [PATCH] infiniband: modify ammasso driver to use send with invalidate
Steve Wise
swise at opengridcomputing.com
Wed May 2 10:46:50 PDT 2007
On Wed, 2007-05-02 at 13:39 -0400, mhagen at iol.unh.edu wrote:
> I believe that they are the same, thanks for the nice addition Michael.
> New patch follows.
>
> --- linux-2.6.21.1/drivers/infiniband/hw/amso1100/c2_qp.c 2007-04-30
> 13:12:54.000000000 -0400
> +++ linux-2.6.21.1/drivers/infiniband/hw/amso1100/c2_qp.c 2007-05-02
> 13:18:17.000000000 -0400
> @@ -810,16 +810,25 @@ int c2_post_send(struct ib_qp *ibqp, str
>
> switch (ib_wr->opcode) {
> case IB_WR_SEND:
> - if (ib_wr->send_flags & IB_SEND_SOLICITED) {
> + if (ib_wr->send_flags &
> + (IB_SEND_SOLICITED | IB_SEND_INVALIDATE)) {
this will set the opcde to SEND_SE_INV if either SEND_SOLICITED is set
-or- SEND_INV is set. That's incorrect. you want your older code...
> + c2_wr_set_id(&wr, C2_WR_TYPE_SEND_SE_INV);
> + wr.sqwr.send.remote_stag =
> + cpu_to_be32(ib_wr->wr.invalidate.rkey);
> + } else if (ib_wr->send_flags & IB_SEND_SOLICITED) {
> c2_wr_set_id(&wr, C2_WR_TYPE_SEND_SE);
> - msg_size = sizeof(struct c2wr_send_req);
> + wr.sqwr.send.remote_stag = 0;
> + } else if (ib_wr->send_flags & IB_SEND_INVALIDATE) {
> + c2_wr_set_id(&wr, C2_WR_TYPE_SEND_INV);
> + wr.sqwr.send.remote_stag =
> + cpu_to_be32(ib_wr->wr.invalidate.rkey);
> } else {
> c2_wr_set_id(&wr, C2_WR_TYPE_SEND);
> - msg_size = sizeof(struct c2wr_send_req);
> + wr.sqwr.send.remote_stag = 0;
> }
>
> - wr.sqwr.send.remote_stag = 0;
> - msg_size += sizeof(struct c2_data_addr) * ib_wr->num_sge;
> + msg_size = sizeof(struct c2wr_send_req) +
> + sizeof(struct c2_data_addr) * ib_wr->num_sge;
> if (ib_wr->num_sge > qp->send_sgl_depth) {
> err = -EINVAL;
> break;
>
>
More information about the general
mailing list