[ofa-general] Re: [PATCH] infiniband: modify ammasso driver to use send with invalidate
mhagen at iol.unh.edu
mhagen at iol.unh.edu
Wed May 2 10:39:35 PDT 2007
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)) {
+ 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;
--
Mikkel Hagen
Project Assistant - Fibre Channel/SAS/SATA Consortiums
Research and Development Engineer - iWARP Consortium
FC/SAS/SATA:1-603-862-0701 iWARP:1-603-862-5083 Fax:1-603-862-4181
UNH-IOL
121 Technology Drive, Suite 2
Durham, NH 03824
More information about the general
mailing list