[ofa-general] [PATCH] infiniband: modify ammasso driver to use send with invalidate
mhagen at iol.unh.edu
mhagen at iol.unh.edu
Tue May 1 07:20:53 PDT 2007
Modification to the ammasso driver to use the iWARP verbs SEND with INV
and SEND with SE and INV.
--- 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-04-30
16:24:38.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_wr->send_flags & 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);
+ msg_size += 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